feat: dynamic versioning

This commit is contained in:
Hazel 2024-04-09 10:43:07 +02:00
parent fc2414dc68
commit 7d98769b5e
4 changed files with 8 additions and 71 deletions

View File

@ -9,6 +9,8 @@ from rich.console import Console
from .utils.shared import DEBUG, DEBUG_LOGGING from .utils.shared import DEBUG, DEBUG_LOGGING
from .utils.config import logging_settings, main_settings, read_config from .utils.config import logging_settings, main_settings, read_config
__version__ = "1.3.0"
read_config() read_config()
console: Console = Console() console: Console = Console()

View File

@ -14,9 +14,11 @@ packages = ["music_kraken"]
[project.scripts] [project.scripts]
music-kraken = "music_kraken.__main__:cli" music-kraken = "music_kraken.__main__:cli"
[tool.hatch.version]
path = "music_kraken/__init__.py"
[project] [project]
name = "music-kraken" 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." 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" }] authors = [{ name = "Hellow2", email = "hazel_is_cute@proton.me" }]
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
@ -34,7 +36,6 @@ classifiers = [
"Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio",
"Topic :: Utilities", "Topic :: Utilities",
] ]
dependencies = [ dependencies = [
"requests~=2.31.0", "requests~=2.31.0",
"responses~=0.24.1", "responses~=0.24.1",
@ -58,7 +59,6 @@ dependencies = [
"sponsorblock~=0.1.3", "sponsorblock~=0.1.3",
"youtube_dl", "youtube_dl",
] ]
dynamic = [
"version"
[tool.setuptools.entry_points] ]
music-kraken = "music_kraken:cli"

View File

@ -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']),

BIN
test.db

Binary file not shown.