refactor: transition to pyproject.toml#2444
Open
Dev-iL wants to merge 1 commit intodpgaspar:masterfrom
Open
Conversation
This was referenced Mar 22, 2026
d9a73e0 to
71a875c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2444 +/- ##
==========================================
- Coverage 79.91% 79.56% -0.36%
==========================================
Files 81 81
Lines 9183 9250 +67
==========================================
+ Hits 7339 7360 +21
- Misses 1844 1890 +46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrate Flask-AppBuilder's packaging from legacy
setup.pyto modernpyproject.toml(PEP 621), using the same setuptools backend.What changes:
pyproject.tomlwith[build-system],[project](all metadata, 21 dependencies, 4 optional-dependency groups, entry-point),[tool.setuptools](include-package-data, package-data patterns, dynamic version viaattr),[tool.mypy](global settings + 7 per-module overrides), and[tool.coverage.run].setup.py— replaced entirely by pyproject.toml.MANIFEST.in— replaced by explicit[tool.setuptools.package-data]patterns for static/templates/translations.setup.cfg— removed all[mypy]and[mypy-*]sections (moved to pyproject.toml). Retained[unittest],[coverage](nose2 plugin), and[flake8]sections.flask_appbuilder/__init__.py— addedimportlib.metadata.version()as the primary version source with the hardcoded string as fallback, ensuring bothflask_appbuilder.__version__andimportlib.metadata.version('Flask-AppBuilder')return consistent values..github/workflows/ci.yml— removedsetup.pyfrom the black formatting check.tox.ini— removedsetup.pyfrom the black check target.release.sh— replacedpython setup.py clean --all sdist bdist_wheelwithpython -m build; cleans both./distand./builddirectories.RELEASE.rst— step 8 now usespython -m build && twine upload dist/*.requirements/dev.in— addedbuildpackage as an explicit dev dependency.Key design decisions:
requires-pythonupdated from~=3.7to>=3.9(3.7 and 3.8 are EOL; matches CI matrix).license = "BSD-3-Clause"expression).[tool.setuptools.packages.find] include = ["flask_appbuilder*"]instead ofexclude = ["tests*"]to prevent unintended discovery of top-level directories (bin/, examples/, docs/).[tool.setuptools.package-data]for static/templates/translations ensures reliable inclusion in isolated builds where VCS access may be unavailable.__version__kept as a simple top-level string assignment for setuptoolsattrstatic analysis compatibility, with runtime override fromimportlib.metadata.Verified:
pip install -e .) and regular install (pip install .) both succeed.ADDITIONAL INFORMATION