From 7d98769b5ec213c3200e274e2b478a15eb2b87ce Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Tue, 9 Apr 2024 10:43:07 +0200 Subject: [PATCH] feat: dynamic versioning --- music_kraken/__init__.py | 2 ++ pyproject.toml | 12 ++++---- setup.py | 65 --------------------------------------- test.db | Bin 65536 -> 0 bytes 4 files changed, 8 insertions(+), 71 deletions(-) delete mode 100644 setup.py delete mode 100644 test.db diff --git a/music_kraken/__init__.py b/music_kraken/__init__.py index a787571..b886ca6 100644 --- a/music_kraken/__init__.py +++ b/music_kraken/__init__.py @@ -9,6 +9,8 @@ from rich.console import Console from .utils.shared import DEBUG, DEBUG_LOGGING from .utils.config import logging_settings, main_settings, read_config +__version__ = "1.3.0" + read_config() console: Console = Console() diff --git a/pyproject.toml b/pyproject.toml index 2304274..88f01ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,9 +14,11 @@ packages = ["music_kraken"] [project.scripts] music-kraken = "music_kraken.__main__:cli" +[tool.hatch.version] +path = "music_kraken/__init__.py" + [project] name = "music-kraken" -version = "1.2.1" description = "An extensive music downloader crawling the internet. It gets its metadata from a couple of metadata providers, and it scrapes the audiofiles." authors = [{ name = "Hellow2", email = "hazel_is_cute@proton.me" }] license = "AGPL-3.0-or-later" @@ -34,7 +36,6 @@ classifiers = [ "Topic :: Multimedia :: Sound/Audio", "Topic :: Utilities", ] - dependencies = [ "requests~=2.31.0", "responses~=0.24.1", @@ -58,7 +59,6 @@ dependencies = [ "sponsorblock~=0.1.3", "youtube_dl", ] - - -[tool.setuptools.entry_points] -music-kraken = "music_kraken:cli" +dynamic = [ + "version" +] diff --git a/setup.py b/setup.py deleted file mode 100644 index 772a81f..0000000 --- a/setup.py +++ /dev/null @@ -1,65 +0,0 @@ -try: - from setuptools import setup, Command, find_packages - setuptools_available = True -except ImportError: - from distutils.core import setup, Command, find_packages - setuptools_available = False - -# packages=['music_kraken'], - -#packages = find_packages(where="src") -packages = ['music_kraken', 'music_kraken.lyrics', 'music_kraken.not_used_anymore', 'music_kraken.target', 'music_kraken.metadata', 'music_kraken.tagging', 'music_kraken.utils', 'music_kraken.not_used_anymore.sources', 'music_kraken.database', 'music_kraken.static_files'] - -print("packages") -print(packages) -# packages.extend(["music_kraken.database"]) - -with open("README.md", "r") as readme_file: - long_description = readme_file.read() - -install_requires = [ - "requests~=2.28.1", - "mutagen~=1.46.0", - "musicbrainzngs~=0.7.1", - "jellyfish~=0.9.0", - "pydub~=0.25.1", - "youtube_dl", - "beautifulsoup4~=4.11.1", - "pycountry~=22.3.5" -] - -with open("requirements.txt", "r") as requirements_txt: - install_requires = [] - for requirement in requirements_txt: - requirement = requirement.strip() - install_requires.append(requirement) - print(requirement) - -version = '1.2.1' -with open('version', 'r') as version_file: - version = version_file.read() - print(f"version: {version}") - -setup( - name='music-kraken', - version=version, - description='An extensive music downloader crawling the internet. It gets its metadata from a couple of metadata ' - 'providers, and it scrapes the audiofiles.', - long_description=long_description, - long_description_content_type='text/markdown', - author='Hellow2', - author_email='Hellow2@outlook.de', - url='https://github.com/HeIIow2/music-downloader', - packages=packages, - package_dir={'': 'src', 'music_kraken': 'src/music_kraken'}, - install_requires=install_requires, - entry_points={'_scripts': ['music-kraken = music_kraken:cli']}, - include_package_data=True, - package_data={'music_kraken': ['*.sql']}, - data_files=[ - ('', ['requirements.txt', 'README.md', 'version']) - ] -) - -# ('music_kraken', ['static_files/database_structure.sql']), - diff --git a/test.db b/test.db deleted file mode 100644 index b941c19337cdb85a6d0599e214c03cb7e2d6d967..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeI*?Qh#e90zc_PTC}E>q%1;ReQmW2hoao%~SIL8jwOZ%1R1tA{c^27eAyHZqmgL zqY?~#CJ4cjw`)oSljkEEs3k}ONl6Cz2{8TNac{RUHn&4hwK*t0w|f7I+5>B8$TY% z>hv{f{!{h)+3)7BoqBxs^XOl(-(z1#{)m1bxf=Oq<|12-2?7v+00bTyf$m%CO#HFO zVX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