From 46b328854a1ec1e892da02f523b2ed0745fe69e2 Mon Sep 17 00:00:00 2001 From: David Lord Date: Tue, 27 Jun 2023 14:03:41 -0700 Subject: [PATCH] switch examples to flit --- examples/celery/pyproject.toml | 7 +++++-- examples/javascript/MANIFEST.in | 4 ---- examples/javascript/pyproject.toml | 9 ++++++--- examples/tutorial/MANIFEST.in | 6 ------ examples/tutorial/pyproject.toml | 12 ++++++++++-- 5 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 examples/javascript/MANIFEST.in delete mode 100644 examples/tutorial/MANIFEST.in diff --git a/examples/celery/pyproject.toml b/examples/celery/pyproject.toml index e480aebc..cd394678 100644 --- a/examples/celery/pyproject.toml +++ b/examples/celery/pyproject.toml @@ -7,5 +7,8 @@ requires-python = ">=3.8" dependencies = ["flask>=2.2.2", "celery[redis]>=5.2.7"] [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +requires = ["flit_core<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.module] +name = "task_app" diff --git a/examples/javascript/MANIFEST.in b/examples/javascript/MANIFEST.in deleted file mode 100644 index c730a34e..00000000 --- a/examples/javascript/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include LICENSE.rst -graft js_example/templates -graft tests -global-exclude *.pyc diff --git a/examples/javascript/pyproject.toml b/examples/javascript/pyproject.toml index e74415b8..6c4d7def 100644 --- a/examples/javascript/pyproject.toml +++ b/examples/javascript/pyproject.toml @@ -3,7 +3,7 @@ name = "js_example" version = "1.1.0" description = "Demonstrates making AJAX requests to Flask." readme = "README.rst" -license = {text = "BSD-3-Clause"} +license = {file = "LICENSE.rst"} maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}] dependencies = ["flask"] @@ -14,8 +14,11 @@ Documentation = "https://flask.palletsprojects.com/patterns/jquery/" test = ["pytest"] [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +requires = ["flit_core<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.module] +name = "js_example" [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/examples/tutorial/MANIFEST.in b/examples/tutorial/MANIFEST.in deleted file mode 100644 index 97d55d51..00000000 --- a/examples/tutorial/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include LICENSE.rst -include flaskr/schema.sql -graft flaskr/static -graft flaskr/templates -graft tests -global-exclude *.pyc diff --git a/examples/tutorial/pyproject.toml b/examples/tutorial/pyproject.toml index c86eb61f..2c806b15 100644 --- a/examples/tutorial/pyproject.toml +++ b/examples/tutorial/pyproject.toml @@ -16,8 +16,16 @@ Documentation = "https://flask.palletsprojects.com/tutorial/" test = ["pytest"] [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +requires = ["flit_core<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.module] +name = "flaskr" + +[tool.flit.sdist] +include = [ + "tests/", +] [tool.pytest.ini_options] testpaths = ["tests"]