diff --git a/pyproject.toml b/pyproject.toml index a1fb8fe..6f5a61f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=64", "setuptools-scm"] +requires = ["setuptools>=77.0.3", "setuptools-scm"] build-backend = "setuptools.build_meta" [project] @@ -7,7 +7,8 @@ name = "apiprober" version = "0.1.0" description = "Passive API discovery and documentation CLI for undocumented REST services" readme = "README.md" -license = {text = "MIT"} +license = "MIT" +license-files = ["LICENSE"] requires-python = ">=3.8" authors = [ {name = "Lukas Geiger", email = "lukisch@users.noreply.github.com"}, @@ -16,7 +17,6 @@ keywords = ["api", "api-discovery", "rest-api", "openapi", "documentation", "pas classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/test_smoke.py b/test_smoke.py index e3ca15b..1e9bd7e 100644 --- a/test_smoke.py +++ b/test_smoke.py @@ -534,6 +534,19 @@ def test_readme_exists(self): assert "ApiProber" in content or "API Prober" in content +class TestPackagingMetadata: + """Regressionstest für den PEP-639-Lizenzvertrag.""" + + def test_license_metadata_uses_spdx_and_includes_license_file(self): + """MIT bleibt explizit, maschinenlesbar und im Paket enthalten.""" + pyproject = (API_PROBER_DIR / "pyproject.toml").read_text(encoding="utf-8") + + assert 'requires = ["setuptools>=77.0.3", "setuptools-scm"]' in pyproject + assert 'license = "MIT"' in pyproject + assert 'license-files = ["LICENSE"]' in pyproject + assert "License ::" not in pyproject + + # ============================================================================ # MAIN (für direktes Ausführen) # ============================================================================