Migrate to pyproject.toml

No need to define the package in two config files.
This commit is contained in:
Karolina Surma
2024-10-01 09:34:10 +02:00
parent 661fb9b770
commit 540738c257
2 changed files with 56 additions and 55 deletions
+56 -2
View File
@@ -1,3 +1,57 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "pyp2spec"
version = "0.9.0"
description = "Generate a valid Fedora specfile from Python package from PyPI"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "Karolina Surma", email = "ksurma@redhat.com" }
]
license = { text = "MIT AND MIT-0" }
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: POSIX :: Linux",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: MIT No Attribution License (MIT-0)",
"Development Status :: 3 - Alpha"
]
dependencies = [
"click",
"jinja2",
"license-expression",
"packaging",
"requests",
'tomli; python_version < "3.11"',
"tomli-w"
]
[project.urls]
homepage = "https://github.com/befeleme/pyp2spec/"
[project.optional-dependencies]
test = [
"pytest",
"pytest-regressions",
"betamax"
]
[project.scripts]
pyp2spec = "pyp2spec.pyp2spec:main"
conf2spec = "pyp2spec.conf2spec:main"
pyp2conf = "pyp2spec.pyp2conf:main"
[tool.setuptools.package-data]
pyp2spec = [
"template.spec",
"classifiers_to_fedora.json"
]
-53
View File
@@ -1,53 +0,0 @@
[metadata]
name = pyp2spec
version = 0.9.0
author = Karolina Surma
author_email = ksurma@redhat.com
description = Generate a valid Fedora specfile from Python package from PyPI
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT, MIT-0
license_files =
LICENSE-MIT
LICENSE-MIT-0
url = https://github.com/befeleme/pyp2spec/
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Operating System :: POSIX :: Linux
License :: OSI Approved :: MIT License
License :: OSI Approved :: MIT No Attribution License (MIT-0)
Development Status :: 3 - Alpha
[options]
packages = find:
python_requires = >=3.9
install_requires =
click
jinja2
license-expression
packaging
requests
tomli;python_version<"3.11"
tomli-w
include_package_data = True
[options.package_data]
pyp2spec =
template.spec
classifiers_to_fedora.json
[options.extras_require]
test =
pytest
pytest-regressions
betamax
[options.entry_points]
console_scripts =
pyp2spec = pyp2spec.pyp2spec:main
conf2spec = pyp2spec.conf2spec:main
pyp2conf = pyp2spec.pyp2conf:main