Skip to content
Myr

use flit_core as build backend (#5177)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents d67c47b, 6b9acd5 · Browse files · 13 files+51 added−54 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

13 files+51 added−54 removed

  • other:+51 added−54 removed

13 files+51 added−54 removed

modified:.devcontainer/on-create-command.sh+1 added-1 removed
modified:docs/patterns/packages.rst+2 added-2 removed
52 unmodified lines
53 "flask",54 ]5556 [build-system]57 requires = ["setuptools"]58 build-backend = "setuptools.build_meta"57 requires = ["flit_core<4"]58 build-backend = "flit_core.buildapi"5960Install your application so it is importable:6162.. code-block:: text
71 unmodified lines
modified:docs/tutorial/install.rst+4 added-23 removed
38 unmodified lines
39 "flask",40 ]4142 [build-system]43 requires = ["setuptools"]44 build-backend = "setuptools.build_meta"43 requires = ["flit_core<4"]44 build-backend = "flit_core.buildapi"4546See the official `Packaging tutorial <packaging tutorial_>`_ for more47explanation of the files and options used.4847The setuptools build backend needs another file named ``MANIFEST.in`` to tell it about48non-Python files to include.4950.. code-block:: none51 :caption: ``MANIFEST.in``5253 include flaskr/schema.sql54 graft flaskr/static55 graft flaskr/templates56 global-exclude *.pyc5758This tells the build to copy everything in the ``static`` and ``templates`` directories,59and the ``schema.sql`` file, but to exclude all bytecode files.6061See the official `Packaging tutorial <packaging tutorial_>`_ and62`detailed guide <packaging guide_>`_ for more explanation of the files63and options used.6449.. _packaging tutorial: https://packaging.python.org/tutorials/packaging-projects/66.. _packaging guide: https://packaging.python.org/guides/distributing-packages-using-setuptools/505152Install the Project53-------------------
23 unmodified lines
77 itsdangerous 0.2478 Jinja2 2.1079 MarkupSafe 1.080 pip 9.0.398 setuptools 39.0.181 Werkzeug 0.14.1100 wheel 0.30.08283Nothing changes from how you've been running your project so far.84``--app`` is still set to ``flaskr`` and ``flask run`` still runs85the application, but you can call it from anywhere, not just the
3 unmodified lines
modified:examples/celery/pyproject.toml+5 added-2 removed
deleted:examples/javascript/MANIFEST.in-4 removed
1include LICENSE.rst2graft js_example/templates3graft tests4global-exclude *.pyc
modified:examples/javascript/pyproject.toml+6 added-3 removed
deleted:examples/tutorial/MANIFEST.in-6 removed
1include LICENSE.rst2include flaskr/schema.sql3graft flaskr/static4graft flaskr/templates5graft tests6global-exclude *.pyc
modified:examples/tutorial/pyproject.toml+10 added-2 removed
modified:requirements/typing.in-1 removed
1mypy2types-contextvars3types-dataclasses4types-setuptools4cryptography
modified:requirements/typing.txt+1 added-3 removed
1# SHA1:7cc3f64d4e78db89d81680ac81503d5ac35d31a91# SHA1:6a354b832686fd3ec017455769a0270953a1e2252#3# This file is autogenerated by pip-compile-multi4# To update, run:5#
12 unmodified lines
18types-contextvars==2.4.7.219 # via -r requirements/typing.in20types-dataclasses==0.6.621 # via -r requirements/typing.in22types-setuptools==68.0.0.023 # via -r requirements/typing.in22typing-extensions==4.6.323 # via mypy
modified:CHANGES.rst+2 added-1 removed
3 unmodified lines
4Unreleased56- Python 3.12 compatibility.7- Require Werkzeug >= 2.3.6.8- Use ``flit_core`` instead of ``setuptools`` as build backend.9- Refactor how an app's root and instance paths are determined. :issue:`5160`101112Version 2.3.2
295 unmodified lines
308- The ``RequestContext.g`` property is deprecated. Use ``g`` directly309 or ``AppContext.g`` instead. :issue:`3898`310- ``copy_current_request_context`` can decorate async functions.311 :pr:`4303`311- The CLI uses ``importlib.metadata`` instead of ``setuptools`` to312- The CLI uses ``importlib.metadata`` instead of ``pkg_resources`` to313 load command entry points. :issue:`4419`314- Overriding ``FlaskClient.open`` will not cause an error on redirect.315 :issue:`3396`316- Add an ``--exclude-patterns`` option to the ``flask run`` CLI
1200 unmodified lines
modified:CONTRIBUTING.rst+1 added-1 removed
125 unmodified lines
126- Install the development dependencies, then install Flask in editable mode.127128 .. code-block:: text129130 $ python -m pip install -U pip setuptools wheel130 $ python -m pip install -U pip131 $ pip install -r requirements/dev.txt && pip install -e .132133- Install the pre-commit hooks.134
104 unmodified lines
modified:pyproject.toml+19 added-5 removed
1[project]2name = "Flask"3description = "A simple framework for building complex web applications."4readme = "README.rst"5license = {text = "BSD-3-Clause"}5license = {file = "LICENSE.rst"}6maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]7classifiers = [8 "Development Status :: 5 - Production/Stable",9 "Environment :: Web Environment",
33 unmodified lines
43[project.scripts]44flask = "flask.cli:main"4546[build-system]47requires = ["setuptools"]48build-backend = "setuptools.build_meta"47requires = ["flit_core<4"]48build-backend = "flit_core.buildapi"4950[tool.setuptools.dynamic]51version = {attr = "flask.__version__"}50[tool.flit.module]51name = "flask"5253[tool.flit.sdist]54include = [55 "docs/",56 "examples/",57 "requirements/",58 "tests/",59 "CHANGES.rst",60 "CONTRIBUTING.rst",61 "tox.ini",62]63exclude = [64 "docs/_build/",65]6667[tool.pytest.ini_options]68testpaths = ["tests"]69filterwarnings = [70 "error",
38 unmodified lines