From f8d05babd77d7209b085b25c800ed3bfafac5e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Sun, 29 Jun 2025 20:39:23 +0200 Subject: [PATCH 1/5] Migrate to PEP 621 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juan Luis Cano Rodríguez --- pyproject.toml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 5 +---- setup.py | 49 ------------------------------------------ 3 files changed, 59 insertions(+), 53 deletions(-) delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index b46cac5..0c5aa2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,61 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools"] + +[project] +name = "podman-compose" +authors = [ + { email = "alsadi@gmail.com", name = "Muayyad Alsadi" }, +] +description = "A script to run docker-compose.yml using podman" +dependencies = [ + "python-dotenv", + "pyyaml", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Operating System :: OS Independent", + "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 :: Software Development :: Build Tools", +] +keywords = [ + "podman", + "podman-compose", +] +dynamic = ["version", "readme"] + +[project.urls] +homepage = "https://github.com/containers/podman-compose" + +[project.license] +text = "GPL-2.0-only" + +[project.optional-dependencies] +devel = [ + "coverage", + "parameterized", + "pre-commit", + "ruff", +] + +[project.scripts] +podman-compose = "podman_compose:main" + +[tool.setuptools] +py-modules = ["podman_compose"] + +[tool.setuptools.dynamic] +readme = {file = ["README.md"], content-type = "text/markdown"} +version = {attr = "podman_compose.__version__"} + [tool.ruff] line-length = 100 target-version = "py38" diff --git a/setup.cfg b/setup.cfg index f0e43ff..7e502cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,8 @@ [bdist_wheel] universal = 1 -[metadata] -version = attr: podman_compose.__version__ - [flake8] # The GitHub editor is 127 chars wide max-line-length=127 # These are not being followed yet -ignore=E222,E231,E272,E713,W503 \ No newline at end of file +ignore=E222,E231,E272,E713,W503 diff --git a/setup.py b/setup.py deleted file mode 100644 index 383e2e1..0000000 --- a/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 - -import os - -from setuptools import setup - -try: - README = open(os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8").read() -except: # noqa: E722 # pylint: disable=bare-except - README = "" - -setup( - name="podman-compose", - description="A script to run docker-compose.yml using podman", - long_description=README, - long_description_content_type="text/markdown", - classifiers=[ - "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", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Development Status :: 3 - Alpha", - "Topic :: Software Development :: Build Tools", - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", - ], - keywords="podman, podman-compose", - author="Muayyad Alsadi", - author_email="alsadi@gmail.com", - url="https://github.com/containers/podman-compose", - py_modules=["podman_compose"], - entry_points={"console_scripts": ["podman-compose = podman_compose:main"]}, - include_package_data=True, - license="GPL-2.0-only", - install_requires=[ - "pyyaml", - "python-dotenv", - ], - extras_require={"devel": ["ruff", "pre-commit", "coverage", "parameterized"]}, - # test_suite='tests', - # tests_require=[ - # 'coverage', - # 'tox', - # ] -) From 05f341b3c5b27fbe36237077b27d41d7901e2ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Sun, 29 Jun 2025 20:50:21 +0200 Subject: [PATCH 2/5] Python 2 is EOL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juan Luis Cano Rodríguez --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7e502cf..2cdad61 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[bdist_wheel] -universal = 1 - [flake8] # The GitHub editor is 127 chars wide max-line-length=127 From d7cd02e3e975bba650dd65e3abc2ac265e5f707c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Sun, 29 Jun 2025 20:52:06 +0200 Subject: [PATCH 3/5] Migrate to SPDX identifier for the license MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juan Luis Cano Rodríguez --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0c5aa2b..6756ba8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ dependencies = [ classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -30,14 +29,12 @@ keywords = [ "podman", "podman-compose", ] +license = "GPL-2.0-only" dynamic = ["version", "readme"] [project.urls] homepage = "https://github.com/containers/podman-compose" -[project.license] -text = "GPL-2.0-only" - [project.optional-dependencies] devel = [ "coverage", From 3918f7e5f854e53b5c658ad308a4ff366c5f89a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Sun, 29 Jun 2025 20:52:52 +0200 Subject: [PATCH 4/5] Add requires-python lower boundary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juan Luis Cano Rodríguez --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 6756ba8..44a6ac4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ dependencies = [ "python-dotenv", "pyyaml", ] +requires-python = ">=3.9" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", From 0e37b31e45ad72ee2956ce8aef9f6b20c60d41b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Sun, 29 Jun 2025 20:54:49 +0200 Subject: [PATCH 5/5] Adapt release script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juan Luis Cano Rodríguez --- scripts/make_release_upload.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/make_release_upload.sh b/scripts/make_release_upload.sh index 507bbee..520d50a 100755 --- a/scripts/make_release_upload.sh +++ b/scripts/make_release_upload.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash ./scripts/uninstall.sh ./scripts/clean_up.sh -python3 setup.py register -python3 setup.py sdist bdist_wheel +pyproject-build twine upload dist/*