From: Fredrik Tolf Date: Wed, 8 Apr 2026 01:36:30 +0000 (+0200) Subject: python: Replace setup.py with a pyproject.toml. X-Git-Url: http://www.dolda2000.com/gitweb/?a=commitdiff_plain;h=HEAD;p=ashd.git python: Replace setup.py with a pyproject.toml. --- diff --git a/python/.gitignore b/python/.gitignore index 21e5002..ed38e69 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -1,3 +1,5 @@ *.pyc /build +/dist +/ashd_py3.egg-info /ashd/htlib.so diff --git a/python/pyproject.toml b/python/pyproject.toml new file mode 100644 index 0000000..86beffd --- /dev/null +++ b/python/pyproject.toml @@ -0,0 +1,21 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "ashd-py3" +version = "0.6" +description = "Python module for handling ashd requests" +license = "GPL-3.0-or-later" +authors = [{name = "Fredrik Tolf", email = "fredrik@dolda2000.com"}] + +[project.urls] +Homepage = "https://www.dolda2000.com/~fredrik/ashd/" +Repository = "git://git.dolda2000.com/ashd" + +[tool.setuptools] +packages = ["ashd"] +script-files = ["ashd-wsgi3", "scgi-wsgi3", "serve-ssi"] +ext-modules = [ + {name = "ashd.htlib", sources=["htp.c"], libraries=["ht"]} +] diff --git a/python/setup.py b/python/setup.py deleted file mode 100755 index 6c6e16c..0000000 --- a/python/setup.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python3 - -from distutils.core import setup, Extension - -htlib = Extension("ashd.htlib", ["htp.c"], - libraries = ["ht"]) - -setup(name = "ashd-py3", - version = "0.6", - description = "Python module for handling ashd requests", - author = "Fredrik Tolf", - author_email = "fredrik@dolda2000.com", - url = "http://www.dolda2000.com/~fredrik/ashd/", - ext_modules = [htlib], - packages = ["ashd"], - scripts = ["ashd-wsgi3", "scgi-wsgi3", "serve-ssi"], - license = "GPL-3")