From a9a57727377453d82a81edbe21186e2e0b4742fd Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Thu, 12 Mar 2026 23:48:20 +0000
Subject: [PATCH] Modernize build process

---
 /dev/null                     |   29 --------------
 .github/workflows/publish.yml |    9 +++-
 pyproject.toml                |   25 ++++++++++++
 3 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 53f3352..ca1a1c3 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -21,13 +21,16 @@
 
       - name: Install dependencies
         run: |
-          pip install setuptools wheel twine
+          python -m venv venv
+          ./venv/bin/pip install build twine
 
       - name: Build package
-        run: python setup.py sdist bdist_wheel
+        run: |
+          ./venv/bin/python -m build
 
       - name: Publish package
         env:
           TWINE_USERNAME: '__token__'
           TWINE_PASSWORD: '${{ secrets.PYPI_TOKEN }}'
-        run: twine upload dist/* 
+        run:
+          ./venv/bin/python -m twine upload dist/*
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..8199f3a
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,25 @@
+[build-system]
+build-backend = "setuptools.build_meta"
+requires = ["setuptools>=80", "setuptools-scm>=8"]
+
+[project]
+name = "docker-plugin-api"
+dynamic = ["version"]
+authors = [
+  { name="Jacek Kowalski", email="Jacek@jacekk.info"},
+]
+description = "Python interface to Docker Plugin API"
+readme = "README.md"
+requires-python = ">=3.9"
+dependencies = ["Flask"]
+classifiers = [
+    "Intended Audience :: Developers",
+    "Operating System :: OS Independent",
+]
+license = "BSD-3-Clause"
+license-files = ["LICENSE"]
+
+[project.urls]
+Homepage = "https://github.com/jacekkow/docker-plugin-api"
+
+[tool.setuptools_scm]
diff --git a/setup.py b/setup.py
deleted file mode 100644
index ff6e6da..0000000
--- a/setup.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python3
-
-from setuptools import setup
-
-with open('README.md', 'r') as fh:
-    long_description = fh.read()
-
-setup(
-    name='docker-plugin-api',
-    version='0.0-git',
-    use_scm_version=True,
-    description='Python interface to Docker Plugin API',
-    long_description=long_description,
-    long_description_content_type='text/markdown',
-    author='Jacek Kowalski',
-    author_email='Jacek@jacekk.info',
-    url='https://github.com/jacekkow/docker-plugin-api',
-    license='BSD',
-    setup_requires=['setuptools_scm', 'wheel'],
-    install_requires=['Flask'],
-    packages=['docker_plugin_api'],
-    classifiers=[
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: BSD License',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python :: 3 :: Only',
-    ],
-    python_requires='>=3.6',
-)

--
Gitblit v1.10.0