From 816aed64c3523f1ef77920c054ba2c81dfd26573 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 29 Sep 2026 09:53:07 -0400 Subject: [PATCH] Use exclusively pyproject.toml for packaging metadata Remove get-current-version Packit key entirely. I believe that git-describe will obtain the current version well enough. Signed-off-by: mulhern --- .packit.yaml | 2 -- pyproject.toml | 41 ++++++++++++++++++++++++++++++++++++++++- setup.cfg | 34 ---------------------------------- setup.py | 7 ------- 4 files changed, 40 insertions(+), 44 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.packit.yaml b/.packit.yaml index bdc01fa..f2ee10d 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -10,8 +10,6 @@ actions: post-upstream-clone: - "mkdir ../distro" - "bash -c '(cd ../distro; wget https://src.fedoraproject.org/rpms/python-dbus-python-client-gen/raw/rawhide/f/python-dbus-python-client-gen.spec)'" - get-current-version: - - "python3 setup.py --version" srpm_build_deps: - wget2 diff --git a/pyproject.toml b/pyproject.toml index 7db6fb6..4c5ead3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,46 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" +[project] +name = "dbus-python-client-gen" +authors = [{name = "Anne Mulhern", email = "amulhern@redhat.com"}] +description = "transforms values into properly wrapped dbus-python objects" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", +] +requires-python = ">=3.12" +license = "MPL-2.0" +dependencies = [ + "dbus-python", + "into-dbus-python>=0.8", +] +dynamic = ["version"] + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" + +[project.urls] +Homepage = "https://github.com/stratis-storage/dbus-python-client-gen" + +[tool.setuptools] +package-dir = {"" = "src"} +packages = ["dbus_python_client_gen"] +platforms = ["Linux"] +include-package-data = false + +[tool.setuptools.dynamic] +version = {attr = "dbus_python_client_gen._version.__version__"} + [tool.ruff] target-version = "py312" line-length = 88 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index c868229..0000000 --- a/setup.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[metadata] -name = dbus-python-client-gen -author = Anne Mulhern -author_email = amulhern@redhat.com -url = https://github.com/stratis-storage/dbus-python-client-gen -description = transforms values into properly wrapped dbus-python objects -license = MPL-2.0 -long_description = file: README.rst -long_description_content_type = text/x-rst -version = attr: dbus_python_client_gen._version.__version__ -platforms = - Linux -classifiers= - Development Status :: 4 - Beta - Intended Audience :: Developers - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Software Development :: Libraries - Topic :: Software Development :: Libraries :: Python Modules - -[options] -python_requires = >=3.12 -install_requires = - dbus-python - into-dbus-python>=0.8 - -package_dir = - =src - -packages = - dbus_python_client_gen diff --git a/setup.py b/setup.py deleted file mode 100644 index 17fb511..0000000 --- a/setup.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -Python packaging file for setup tools. -""" - -import setuptools - -setuptools.setup()