diff --git a/MANIFEST.in b/MANIFEST.in index b2c37b97..1743c84b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include CHANGES.rst include CONTRIBUTING.rst +include LICENSE.rst include tox.ini graft artwork graft docs diff --git a/examples/javascript/LICENSE b/examples/javascript/LICENSE deleted file mode 100644 index 8f9252f4..00000000 --- a/examples/javascript/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Copyright © 2010 by the Pallets team. - -Some rights reserved. - -Redistribution and use in source and binary forms of the software as -well as documentation, with or without modification, are permitted -provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/examples/javascript/LICENSE.rst b/examples/javascript/LICENSE.rst new file mode 100644 index 00000000..9d227a0c --- /dev/null +++ b/examples/javascript/LICENSE.rst @@ -0,0 +1,28 @@ +Copyright 2010 Pallets + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/examples/javascript/MANIFEST.in b/examples/javascript/MANIFEST.in index 0ba3d5b8..c730a34e 100644 --- a/examples/javascript/MANIFEST.in +++ b/examples/javascript/MANIFEST.in @@ -1,4 +1,4 @@ -include LICENSE +include LICENSE.rst graft js_example/templates graft tests global-exclude *.pyc diff --git a/examples/javascript/setup.cfg b/examples/javascript/setup.cfg index a14fa80e..c4a3efad 100644 --- a/examples/javascript/setup.cfg +++ b/examples/javascript/setup.cfg @@ -1,8 +1,24 @@ [metadata] -license_file = LICENSE +name = js_example +version = 1.0.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 -[bdist_wheel] -universal = True +[options] +packages = find: +include_package_data = true +install_requires = + Flask + +[options.extras_require] +test = + pytest + blinker [tool:pytest] testpaths = tests diff --git a/examples/javascript/setup.py b/examples/javascript/setup.py index 9cebbff2..60684932 100644 --- a/examples/javascript/setup.py +++ b/examples/javascript/setup.py @@ -1,21 +1,3 @@ -from setuptools import find_packages from setuptools import setup -with open("README.rst", encoding="utf8") as f: - readme = f.read() - -setup( - name="js_example", - version="1.0.0", - url="https://flask.palletsprojects.com/patterns/jquery/", - license="BSD", - maintainer="Pallets team", - maintainer_email="contact@palletsprojects.com", - description="Demonstrates making Ajax requests to Flask.", - long_description=readme, - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=["flask"], - extras_require={"test": ["pytest", "coverage", "blinker"]}, -) +setup() diff --git a/examples/tutorial/LICENSE b/examples/tutorial/LICENSE deleted file mode 100644 index 8f9252f4..00000000 --- a/examples/tutorial/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Copyright © 2010 by the Pallets team. - -Some rights reserved. - -Redistribution and use in source and binary forms of the software as -well as documentation, with or without modification, are permitted -provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/examples/tutorial/LICENSE.rst b/examples/tutorial/LICENSE.rst new file mode 100644 index 00000000..9d227a0c --- /dev/null +++ b/examples/tutorial/LICENSE.rst @@ -0,0 +1,28 @@ +Copyright 2010 Pallets + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/examples/tutorial/MANIFEST.in b/examples/tutorial/MANIFEST.in index a73511ed..97d55d51 100644 --- a/examples/tutorial/MANIFEST.in +++ b/examples/tutorial/MANIFEST.in @@ -1,4 +1,4 @@ -include LICENSE +include LICENSE.rst include flaskr/schema.sql graft flaskr/static graft flaskr/templates diff --git a/examples/tutorial/setup.cfg b/examples/tutorial/setup.cfg index 3e47794e..d001093b 100644 --- a/examples/tutorial/setup.cfg +++ b/examples/tutorial/setup.cfg @@ -1,8 +1,23 @@ [metadata] -license_file = LICENSE +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 -[bdist_wheel] -universal = True +[options] +packages = find: +include_package_data = true +install_requires = + Flask + +[options.extras_require] +test = + pytest [tool:pytest] testpaths = tests diff --git a/examples/tutorial/setup.py b/examples/tutorial/setup.py index a2598880..60684932 100644 --- a/examples/tutorial/setup.py +++ b/examples/tutorial/setup.py @@ -1,21 +1,3 @@ -from setuptools import find_packages from setuptools import setup -with open("README.rst", encoding="utf8") as f: - readme = f.read() - -setup( - name="flaskr", - version="1.0.0", - url="https://flask.palletsprojects.com/tutorial/", - license="BSD", - maintainer="Pallets team", - maintainer_email="contact@palletsprojects.com", - description="The basic blog app built in the Flask tutorial.", - long_description=readme, - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=["flask"], - extras_require={"test": ["pytest", "coverage"]}, -) +setup() diff --git a/setup.cfg b/setup.cfg index 9da2ec43..eb582ed5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,44 @@ +[metadata] +name = Flask +# Version needs regex in setup.py. +url = https://palletsprojects.com/p/flask +project_urls = + Documentation = https://flask.palletsprojects.com/ + Code = https://github.com/pallets/flask + Issue tracker = https://github.com/pallets/flask/issues +license = BSD-3-Clause +maintainer = Pallets +maintainer_email = contact@palletsprojects.com +description = A simple framework for building complex web applications. +long_description = file: README.rst +long_description_content_type = text/x-rst +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Web Environment + Framework :: Flask + Intended Audience :: Developers + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Topic :: Internet :: WWW/HTTP :: Dynamic Content + Topic :: Internet :: WWW/HTTP :: WSGI + Topic :: Internet :: WWW/HTTP :: WSGI :: Application + Topic :: Software Development :: Libraries :: Application Frameworks + +[options] +packages = find: +package_dir = = src +include_package_data = true +python_requires = >= 3.6 +# Dependencies are in setup.py for GitHub's dependency graph. + +[options.packages.find] +where = src + +[options.entry_points] +console_scripts = + flask = flask.cli:main + [tool:pytest] testpaths = tests filterwarnings = diff --git a/setup.py b/setup.py index fea38130..37f91346 100644 --- a/setup.py +++ b/setup.py @@ -1,47 +1,14 @@ import re -from setuptools import find_packages from setuptools import setup -with open("README.rst", encoding="utf8") as f: - readme = f.read() - with open("src/flask/__init__.py", encoding="utf8") as f: version = re.search(r'__version__ = "(.*?)"', f.read()).group(1) +# Metadata goes in setup.cfg. These are here for GitHub's dependency graph. setup( name="Flask", version=version, - url="https://palletsprojects.com/p/flask/", - project_urls={ - "Documentation": "https://flask.palletsprojects.com/", - "Code": "https://github.com/pallets/flask", - "Issue tracker": "https://github.com/pallets/flask/issues", - }, - license="BSD-3-Clause", - author="Armin Ronacher", - author_email="armin.ronacher@active-4.com", - maintainer="Pallets", - maintainer_email="contact@palletsprojects.com", - description="A simple framework for building complex web applications.", - long_description=readme, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Framework :: Flask", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - "Topic :: Software Development :: Libraries :: Application Frameworks", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - packages=find_packages("src"), - package_dir={"": "src"}, - include_package_data=True, - python_requires=">=3.6", install_requires=[ "Werkzeug>=0.15", "Jinja2>=2.10.1", @@ -59,12 +26,5 @@ setup( "sphinxcontrib-log-cabinet", "sphinx-issues", ], - "docs": [ - "sphinx", - "pallets-sphinx-themes", - "sphinxcontrib-log-cabinet", - "sphinx-issues", - ], }, - entry_points={"console_scripts": ["flask = flask.cli:main"]}, ) diff --git a/src/flask/__init__.py b/src/flask/__init__.py index ab2a9cd4..1f503544 100644 --- a/src/flask/__init__.py +++ b/src/flask/__init__.py @@ -1,5 +1,5 @@ -from jinja2 import escape -from jinja2 import Markup +from markupsafe import escape +from markupsafe import Markup from werkzeug.exceptions import abort from werkzeug.utils import redirect