From 58fe88f4d44d590ebdd4d1e1f6c2fecfb063261f Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Sat, 17 Oct 2026 01:21:56 -0500 Subject: [PATCH] Convert from setuptools to flit-core --- CHANGELOG.rst | 1 + MANIFEST.in | 34 ---------------------------------- pyproject.toml | 26 ++++++++++++++++++-------- 3 files changed, 19 insertions(+), 42 deletions(-) delete mode 100644 MANIFEST.in diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 621f04b6e..4612b45ca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,7 @@ Unreleased - Added support for Python 3.15 . - Removed support for Python 3.10 . +- The build backend has been updated from setuptools to flit. 0.38.2 ------ diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 82bd5c5c1..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,34 +0,0 @@ -## Core Package Requirements - -# data files in the distribution -include src/check_jsonschema/builtin_schemas/vendor/* -include src/check_jsonschema/builtin_schemas/vendor/licenses/* -include src/check_jsonschema/builtin_schemas/vendor/sha256/* -include src/check_jsonschema/builtin_schemas/custom/*.json - -## Testing Requirements - -# include all test files and test data files -recursive-include tests *.py *.json *.yaml *.yml *.json5 *.toml *.cff - -# the test runner -include tox.ini - -# needed as a data file for the tests (several tests check integrity -# against this file) -include .pre-commit-hooks.yaml - -# tools, automation, and project maintenance -include CHANGELOG.rst -include CONTRIBUTING.md -include justfile -include scripts/*.py -include .coveragerc -include .flake8 - - -## Final Cleanup -# remove files which may be accidentally introduced by `*` and recursive patterns - -prune **/__pycache__ -global-exclude *.py[cod] diff --git a/pyproject.toml b/pyproject.toml index 5b0f29eaa..09729cd45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools>=61.2"] -build-backend = "setuptools.build_meta" +requires = ["flit-core>=3.12.0"] +build-backend = "flit_core.buildapi" [dependency-groups] dev = [ @@ -55,12 +55,22 @@ Homepage = "https://github.com/python-jsonschema/check-jsonschema" [project.scripts] check-jsonschema = "check_jsonschema:main" -[tool.setuptools] -include-package-data = true - -[tool.setuptools.packages.find] -where = ["src"] -namespaces = false +[tool.flit.sdist] +include = [ + "CHANGELOG.rst", + ".github/CONTRIBUTING.md", + ".github/AI_POLICY.md.md", + "tests/**/*", + # needed as a data file for the tests (several tests check integrity + # against this file) + ".pre-commit-hooks.yaml", + ".flake8", + ".coveragerc", + "justfile", + "tox.ini", + "toxfile.py", +] +exclude = ["**/*/.*", "**/*.egg-info", "**/__pycache__", "scripts/*"] [tool.check-sdist] git-only = ["RELEASING.md", ".gitignore", "docs/*"]