From 4038aa7b57e5f228ef5a93ff35627cb87cc357c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 16 Sep 2025 10:22:43 +0200 Subject: [PATCH 1/4] setup: remove setup.cfg in favour of pyproject.toml The option zip_safe is dropped is dropped, since it is considered obselete by setuptools and no longer supposed to do anything [1]. The option bdist_wheel.universal is dropped as well, since this flag used to show that a wheel was compatible with both Python 2 and 3 [2] and support for Python 2 has been dropped. More project urls are added, since pyproject.toml uses a richer section there instead of the previous single url field. The license classifier is switched to the SPDX identifier for the Apache 2.0 license and a license-files array linking to the respective file is added. The license classifier is removed, because at least some build backends refuse to build the package with both it and other license metadata at the same time in the file. [1] https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html [2] https://wheel.readthedocs.io/en/stable/quickstart.html debug --- pyproject.toml | 36 ++++++++++++++++++++++++++++++++++++ setup.cfg | 37 ------------------------------------- 2 files changed, 36 insertions(+), 37 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index d18bfe5..4e93229 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,42 @@ requires = [ ] build-backend = 'setuptools.build_meta' +[project] +name = "varlink" +description = "Python implementation of the Varlink protocol" +readme = "README.md" +requires-python = ">=3.9" +dynamic = ["version"] +authors = [ + {name = "Lars Karlitski", email = "lars@karlitski.net"}, + {name = "Harald Hoyer", email = "harald@hoyer.xyz"} +] +keywords = ["ipc", "varlink", "rpc"] +license = "Apache-2.0" +license-files = ["LICENSE.txt"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python", + "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", + "Topic :: System :: Networking", +] + +[project.urls] +Homepage = "https://varlink.org/" +Repository = "https://github.com/varlink/python" +Issues = "https://github.com/varlink/python/issues" + +[tool.setuptools.package-data] +varlink = [ + "*.varlink" +] + [tool.setuptools_scm] local_scheme = "no-local-version" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ef2e2bb..0000000 --- a/setup.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[metadata] -name = varlink -description = Python implementation of the Varlink protocol -long_description = file: README.md -long_description_content_type = text/markdown -author = Lars Karlitski, Harald Hoyer -author_email = harald@hoyer.xyz -url = https://github.com/varlink/python -keywords = ipc, varlink, rpc -license = ASL 2.0 -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: Apache Software License - Programming Language :: Python - 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 - Topic :: System :: Networking - -[options] -zip_safe = False -python_requires=>=3.9 -include_package_data = True -packages = varlink -setup_requires = - setuptools_scm - -[options.package_data] -varlink = *.varlink - -[bdist_wheel] -universal = 1 - From cff7f8c42307a104bde28b531fc5fb82c6eaa151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 16 Sep 2025 10:30:24 +0200 Subject: [PATCH 2/4] setup: remove setup.py --- setup.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 07b902d..0000000 --- a/setup.py +++ /dev/null @@ -1,15 +0,0 @@ -from setuptools import setup - - -def local_scheme(_): - """Enables a version format so that upload to TestPyPI is successful. - For example: 2.6.2.dev8 - See https://github.com/pypa/setuptools_scm/issues/342. - """ - return "" - - -setup( - use_scm_version={"local_scheme": "no-local-version"}, - setup_requires=["setuptools_scm"], -) From fb60d994a266afb63a3d5aab85bc02d92f2ce6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 16 Sep 2025 10:37:04 +0200 Subject: [PATCH 3/4] Revert "ci: temporary pin tox to 4.29.x" Since setup.py and setup.cfg have been removed, the pin should no longer be necessary. This reverts commit 53a25fb7ab6ee55443b35bec6cfef7f01fe54a58. --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1734f3f..a4e25ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,8 +33,7 @@ jobs: with: fetch-depth: 0 - name: Install tox - # https://github.com/tox-dev/tox/issues/3602 - run: python -m pip install 'tox<4.30' + run: python -m pip install tox - name: Run ruff format run: | tox -e ruff-format From 5b45f222c2f599c9cfc31ce187207475266debc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 16 Sep 2025 11:07:10 +0200 Subject: [PATCH 4/4] setup: remove MANIFEST.in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accoring to [1] […] More precisely, the following files are included in a source distribution by default: […] - All files specified by the license-files configuration parameter in pyproject.toml and/or equivalent in setup.cfg/setup.py; note that if you don’t explicitly set this parameter, setuptools will include any files that match the following glob patterns: LICEN[CS]E*, COPYING*, NOTICE*, AUTHORS**; - README, README.txt, README.rst or README.md; […] Rendering this file unnecessary. [1] https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 046a397..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include README.md LICENSE.txt