From 25584e71658f694e79452ea22e6c4f902edfaefd Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 29 Jun 2026 13:40:26 +0200 Subject: [PATCH 1/2] migrate static data from setup.py to setup.cfg --- setup.cfg | 19 ++++++++++++++++--- setup.py | 20 +++++--------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/setup.cfg b/setup.cfg index bd5b5ed8..614a073d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,16 @@ -[bdist_rpm] -doc_files = python.lua LICENSE -use_bzip2 = 1 +-[bdist_rpm] +-doc_files = python.lua LICENSE +-use_bzip2 = 1 + +[metadata] +name = lunatic-python +version = 1.0 +author = Gustavo Niemeyer +author_email = gustavo@niemeyer.net +license = LGPL +description = Two-way bridge between Python and Lua +url = http://labix.org/lunatic-python +long_description = Lunatic Python is a two-way bridge between Python and Lua, allowing these + languages to intercommunicate. Being two-way means that it allows Lua inside + Python, Python inside Lua, Lua inside Python inside Lua, Python inside Lua + inside Python, and so on. diff --git a/setup.py b/setup.py index 93d6cf0f..8ab08e0e 100755 --- a/setup.py +++ b/setup.py @@ -12,9 +12,12 @@ import subprocess as commands else: import commands -from distutils.core import setup, Extension +from setuptools import setup, Extension from distutils.sysconfig import get_config_var, get_python_lib, get_python_version +if not os.environ.get("PKG_CONFIG_PATH"): # set this if needed on macOS + os.environ["PKG_CONFIG_PATH"] = get_config_var("LIBPC") + if os.path.isfile("MANIFEST"): os.unlink("MANIFEST") @@ -71,20 +74,7 @@ def pkgconfig(*packages): lua_pkgconfig = pkgconfig('lua' + LUAVERSION, 'python-' + PYTHONVERSION) lua_pkgconfig['extra_compile_args'] = ['-I/usr/include/lua'+LUAVERSION, '-DPYTHON_LIBRT="' + str(PYTHON_LIBRT) + '"'] -setup(name="lunatic-python", - version="1.0", - description="Two-way bridge between Python and Lua", - author="Gustavo Niemeyer", - author_email="gustavo@niemeyer.net", - url="http://labix.org/lunatic-python", - license="LGPL", - long_description="""\ -Lunatic Python is a two-way bridge between Python and Lua, allowing these -languages to intercommunicate. Being two-way means that it allows Lua inside -Python, Python inside Lua, Lua inside Python inside Lua, Python inside Lua -inside Python, and so on. -""", - ext_modules=[ +setup(ext_modules=[ Extension("lua-python", ["src/pythoninlua.c", "src/luainpython.c"], **lua_pkgconfig), From 0a9d58c4e41e3dc07d4c2c3254e360434838d333 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 29 Jun 2026 13:49:56 +0200 Subject: [PATCH 2/2] migrate static data from setup.cfg to pyproject.toml --- pyproject.toml | 32 ++++++++++++++++++++++++++++++++ setup.cfg | 16 ---------------- 2 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..22606428 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=61.2", +] + +[project] +name = "lunatic-python" +version = "1.0" +description = "Two-way bridge between Python and Lua" +readme = "README.md" +license.text = "LGPL" +authors = [ + { name = "Gustavo Niemeyer", email = "gustavo@niemeyer.net" }, +] +requires-python = ">=3.10" +classifiers = [ + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +urls.Homepage = "http://labix.org/lunatic-python" + +[tool.setuptools] +include-package-data = false + +[tool.distutils] +bdist_rpm.doc-files = "python.lua LICENSE" +bdist_rpm.use-bzip2 = 2 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 614a073d..00000000 --- a/setup.cfg +++ /dev/null @@ -1,16 +0,0 @@ --[bdist_rpm] --doc_files = python.lua LICENSE --use_bzip2 = 1 - -[metadata] -name = lunatic-python -version = 1.0 -author = Gustavo Niemeyer -author_email = gustavo@niemeyer.net -license = LGPL -description = Two-way bridge between Python and Lua -url = http://labix.org/lunatic-python -long_description = Lunatic Python is a two-way bridge between Python and Lua, allowing these - languages to intercommunicate. Being two-way means that it allows Lua inside - Python, Python inside Lua, Lua inside Python inside Lua, Python inside Lua - inside Python, and so on.