From 6c4f87af3cc6e252d413ec6b7c5ce576aa55d355 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Fri, 26 Sep 2025 00:28:36 -0400 Subject: [PATCH] Migrate to hatchling - Fixes #155 - Fixes #123 --- MANIFEST.in | 1 - crossenv/__init__.py | 2 +- pyproject.toml | 33 +++++++++++++++------------------ tests/testutils.py | 2 +- 4 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 42eb410..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include LICENSE.txt diff --git a/crossenv/__init__.py b/crossenv/__init__.py index f72b262..7937dff 100644 --- a/crossenv/__init__.py +++ b/crossenv/__init__.py @@ -129,7 +129,7 @@ def __init__( host_sysconfigdata_file=None, manylinux_tags=(), platform_tags=(), - host_machine=None + host_machine=None, ): self.host_sysroot = host_sysroot self.host_cc = None diff --git a/pyproject.toml b/pyproject.toml index b7400dd..f744301 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,22 +1,16 @@ [build-system] -requires = ["setuptools==74.1.2"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] dynamic = ["version"] name = "crossenv" description = "A cross-compiling tool for Python extension modules" readme = { file = "README.rst", content-type = "text/x-rst"} -requires-python = ">=3.5" +requires-python = ">=3.6" license = { file = "LICENSE.txt" } -authors = [ - { name = "Benjamin Fogle", email = "benfogle@gmail.com" } -] -maintainers = [ - { name = "Benjamin Fogle", email = "benfogle@gmail.com" } -] classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Topic :: Software Development :: Build Tools", "License :: OSI Approved :: MIT License", @@ -26,17 +20,20 @@ dependencies = [ "wheel" ] -[project.urls] -Homepage = "https://github.com/benfogle/crossenv" +[[project.authors]] +name = "Benjamin Fogle" +email = "benfogle@gmail.com" -[tool.setuptools] -packages = ["crossenv"] +[[project.maintainers]] +name = "Dustin Spicuzza" +email = "dustin@virtualroadside.com" + +[project.urls] +Homepage = "https://github.com/robotpy/crossenv" -[tool.setuptools.dynamic] -version = { attr = "crossenv.__version__" } +[tool.hatch.version] +path = "crossenv/__init__.py" -[tool.setuptools.package-data] -crossenv = ["scripts/*"] [tool.black] include = ''' diff --git a/tests/testutils.py b/tests/testutils.py index 86fd026..efbd822 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -132,7 +132,7 @@ def make_crossenv( host_python: Resource, build_python: Resource, *args, - **kwargs + **kwargs, ): cmdline = [build_python.binary, "-m", "crossenv", host_python.binary, crossenv_dir] cmdline.extend(args)