Move to pyproject.toml

This commit is contained in:
~noodlez1232 2024-04-13 15:45:20 -07:00
parent bdfd8da17c
commit b965f74a10
3 changed files with 69 additions and 62 deletions

View file

@ -22,7 +22,8 @@ check_lint:
&& black . --check \ && black . --check \
&& pylint src/ && pylint src/
wheel: clean wheel: clean
$(shell echo "__pypi_version__ = \"$(PYPI_VERSION)\"\n__local_version__ = \"$(LOCAL_VERSION)\"" > src/ytdl_sub/__init__.py) $(shell echo "__pypi_version__ = \"$(PYPI_VERSION)\"" > src/ytdl_sub/__init__.py)
$(shell echo "__local_version__ = \"$(LOCAL_VERSION)\"" >> src/ytdl_sub/__init__.py)
cat src/ytdl_sub/__init__.py cat src/ytdl_sub/__init__.py
pip3 install build pip3 install build
python3 -m build python3 -m build

View file

@ -1,3 +1,69 @@
[project]
name ="ytdl-sub"
dynamic = [ "version" ]
authors = [ { name = "Jesse Bannon" } ]
description = "Automate downloading metadata generation with YoutubeDL"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
classifiers = [
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"License :: Public Domain",
"Environment :: Console",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"yt-dlp==2024.*",
"colorama==0.4.*",
"mergedeep==1.3.*",
"mediafile==0.12.*",
"PyYAML==6.0.*",
]
urls = { Homepage = "https://github.com/jmbannon/ytdl-sub" }
[build-system]
requires = [ "setuptools >= 67.0" ]
build-backend = "setuptools.build_meta"
[tool.setuptools]
platforms = [ "Unix" ]
[tool.setuptools.dynamic]
version = { attr = "ytdl_sub.__pypi_version__" }
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.package-data]
"*" = ["*.yaml"]
[tool.setuptools.packages.find]
where = ["src"]
[project.optional-dependencies]
test = [
"coverage[toml]==6.3.*",
"pytest==7.1.*",
"pytest-rerunfailures==14.0",
]
lint = [
"black==23.*",
"isort==5.*",
"pylint==2.*",
]
docs = [
"sphinx==7.*",
"sphinx-rtd-theme==2.*",
"sphinx-book-theme==1.*",
]
build = [
"build",
"twine",
"pyinstaller",
]
[project.scripts]
ytdl-sub = "ytdl_sub.main:main"
[tool.isort] [tool.isort]
profile = "black" profile = "black"
line_length = 100 line_length = 100
@ -30,4 +96,4 @@ include = [
[tool.coverage.report] [tool.coverage.report]
exclude_also = [ exclude_also = [
"raise UNREACHABLE.*", "raise UNREACHABLE.*",
] ]

View file

@ -1,60 +0,0 @@
[metadata]
name = ytdl-sub
version = attr:ytdl_sub.__pypi_version__
author = Jesse Bannon
description = Automate downloading and metadata generation with YoutubeDL
long_description = file: README.md
long_description_content_type= text/markdown
author_email = use_github_issues@nope.com
url = https://github.com/jmbannon/ytdl-sub
license = GNUv3
platforms = Unix
classifiers =
Topic :: Multimedia :: Sound/Audio
Topic :: Multimedia :: Video
License :: Public Domain
Environment :: Console
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
[options.entry_points]
console_scripts =
ytdl-sub = ytdl_sub.main:main
[options]
package_dir =
= src
packages=find:
install_requires =
yt-dlp==2024.3.10
# argparse==1.4.0
colorama==0.4.6
mergedeep==1.3.4
mediafile==0.12.0
PyYAML==6.0.1
[options.package_data]
* = *.yaml
[options.packages.find]
where=src
[options.extras_require]
test =
coverage[toml]==6.3.2
pytest==7.1.1
pytest-rerunfailures==12.0
lint =
black==22.3.0
isort==5.10.1
pylint==2.13.5
docs =
sphinx==7.2.6
sphinx-rtd-theme==2.0.0
sphinx-book-theme==1.1.0
build =
build
twine
pyinstaller