update docs and examples for pyproject

setup.py -> pyproject.toml
venv -> .venv
This commit is contained in:
David Lord 2023-01-18 10:21:37 -08:00
parent 6d6d986fc5
commit 8f13f5b6d6
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
24 changed files with 153 additions and 195 deletions

View file

@ -1,4 +1,4 @@
venv/
.venv/
*.pyc
__pycache__/
instance/

View file

@ -23,8 +23,8 @@ Install
.. code-block:: text
$ python3 -m venv venv
$ . venv/bin/activate
$ python3 -m venv .venv
$ . .venv/bin/activate
$ pip install -e .

View file

@ -0,0 +1,26 @@
[project]
name = "js_example"
version = "1.1.0"
description = "Demonstrates making AJAX requests to Flask."
readme = "README.rst"
license = {text = "BSD-3-Clause"}
maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]
dependencies = ["flask"]
[project.urls]
Documentation = "https://flask.palletsprojects.com/patterns/jquery/"
[project.optional-dependencies]
test = ["pytest", "blinker"]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = ["error"]
[tool.coverage.run]
branch = true
source = ["js_example", "tests"]

View file

@ -1,29 +0,0 @@
[metadata]
name = js_example
version = 1.1.0
url = https://flask.palletsprojects.com/patterns/jquery/
license = BSD-3-Clause
maintainer = Pallets
maintainer_email = contact@palletsprojects.com
description = Demonstrates making AJAX requests to Flask.
long_description = file: README.rst
long_description_content_type = text/x-rst
[options]
packages = find:
include_package_data = true
install_requires =
Flask
[options.extras_require]
test =
pytest
blinker
[tool:pytest]
testpaths = tests
[coverage:run]
branch = True
source =
js_example

View file

@ -1,3 +0,0 @@
from setuptools import setup
setup()

View file

@ -1,4 +1,4 @@
venv/
.venv/
*.pyc
__pycache__/
instance/

View file

@ -23,13 +23,13 @@ default Git version is the main branch. ::
Create a virtualenv and activate it::
$ python3 -m venv venv
$ . venv/bin/activate
$ python3 -m venv .venv
$ . .venv/bin/activate
Or on Windows cmd::
$ py -3 -m venv venv
$ venv\Scripts\activate.bat
$ py -3 -m venv .venv
$ .venv\Scripts\activate.bat
Install Flaskr::

View file

@ -0,0 +1,28 @@
[project]
name = "flaskr"
version = "1.0.0"
description = "The basic blog app built in the Flask tutorial."
readme = "README.rst"
license = {text = "BSD-3-Clause"}
maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]
dependencies = [
"flask",
]
[project.urls]
Documentation = "https://flask.palletsprojects.com/tutorial/"
[project.optional-dependencies]
test = ["pytest"]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = ["error"]
[tool.coverage.run]
branch = true
source = ["flaskr", "tests"]

View file

@ -1,28 +0,0 @@
[metadata]
name = flaskr
version = 1.0.0
url = https://flask.palletsprojects.com/tutorial/
license = BSD-3-Clause
maintainer = Pallets
maintainer_email = contact@palletsprojects.com
description = The basic blog app built in the Flask tutorial.
long_description = file: README.rst
long_description_content_type = text/x-rst
[options]
packages = find:
include_package_data = true
install_requires =
Flask
[options.extras_require]
test =
pytest
[tool:pytest]
testpaths = tests
[coverage:run]
branch = True
source =
flaskr

View file

@ -1,3 +0,0 @@
from setuptools import setup
setup()