-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from Pylons/bestpractices
Updates Waitress to best practices surrounding packaging
- Loading branch information
Showing
57 changed files
with
255 additions
and
225 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Recommended flake8 settings while editing, we use Black for the final linting/say in how code is formatted | ||
# | ||
# pip install flake8 flake8-bugbear | ||
# | ||
# This will warn/error on things that black does not fix, on purpose. | ||
# | ||
# Run: | ||
# | ||
# tox -e run-flake8 | ||
# | ||
# To have it automatically create and install the appropriate tools, and run | ||
# flake8 across the source code/tests | ||
|
||
[flake8] | ||
# max line length is set to 88 in black, here it is set to 80 and we enable bugbear's B950 warning, which is: | ||
# | ||
# B950: Line too long. This is a pragmatic equivalent of pycodestyle’s E501: it | ||
# considers “max-line-length” but only triggers when the value has been | ||
# exceeded by more than 10%. You will no longer be forced to reformat code due | ||
# to the closing parenthesis being one character too far to satisfy the linter. | ||
# At the same time, if you do significantly violate the line length, you will | ||
# receive a message that states what the actual limit is. This is inspired by | ||
# Raymond Hettinger’s “Beyond PEP 8” talk and highway patrol not stopping you | ||
# if you drive < 5mph too fast. Disable E501 to avoid duplicate warnings. | ||
max-line-length = 80 | ||
max-complexity = 12 | ||
select = E,F,W,C,B,B9 | ||
ignore = | ||
# E123 closing bracket does not match indentation of opening bracket’s line | ||
E123 | ||
# E203 whitespace before ‘:’ (Not PEP8 compliant, Python Black) | ||
E203 | ||
# E501 line too long (82 > 79 characters) (replaced by B950 from flake8-bugbear, https://github.com/PyCQA/flake8-bugbear) | ||
E501 | ||
# W503 line break before binary operator (Not PEP8 compliant, Python Black) | ||
W503 |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
graft src/waitress | ||
graft tests | ||
graft docs | ||
graft .github | ||
|
||
include README.rst | ||
include CHANGES.txt | ||
include HISTORY.txt | ||
include RELEASING.txt | ||
include LICENSE.txt | ||
include contributing.md | ||
include CONTRIBUTORS.txt | ||
include COPYRIGHT.txt | ||
|
||
include pyproject.toml setup.cfg | ||
include .coveragerc .flake8 | ||
include tox.ini rtd.txt | ||
|
||
exclude TODO.txt | ||
|
||
recursive-exclude * __pycache__ *.py[cod] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[build-system] | ||
requires = ["setuptools >= 41"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
py36 = false | ||
exclude = ''' | ||
/( | ||
\.git | ||
| .tox | ||
)/ | ||
''' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,67 @@ | ||
[easy_install] | ||
zip_ok = false | ||
[metadata] | ||
name = waitress | ||
version = 1.4.4a0 | ||
description = Waitress WSGI server | ||
long_description = file: README.rst, CHANGES.txt | ||
long_description_content_type = text/x-rst | ||
keywords = waitress wsgi server http | ||
license = ZPL 2.1 | ||
classifiers = | ||
Development Status :: 6 - Mature | ||
Environment :: Web Environment | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: Zope Public License | ||
Programming Language :: Python | ||
Programming Language :: Python :: 2 | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Programming Language :: Python :: Implementation :: PyPy | ||
Operating System :: OS Independent | ||
Topic :: Internet :: WWW/HTTP | ||
Topic :: Internet :: WWW/HTTP :: WSGI | ||
url = https://github.com/Pylons/waitress | ||
author = Zope Foundation and Contributors | ||
author_email = zope-dev@zope.org | ||
maintainer = Pylons Project | ||
maintainer_email = pylons-discuss@googlegroups.com | ||
|
||
[nosetests] | ||
match=^test | ||
nocapture=1 | ||
cover-package=waitress | ||
cover-erase=1 | ||
[options] | ||
package_dir= | ||
=src | ||
packages=find: | ||
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* | ||
|
||
[options.entry_points] | ||
paste.server_runner = | ||
main = waitress:serve_paste | ||
console_scripts = | ||
waitress-serve = waitress.runner:run | ||
|
||
[options.packages.find] | ||
where=src | ||
|
||
[options.extras_require] | ||
testing = | ||
pytest | ||
pytest-cover | ||
coverage>=5.0 | ||
|
||
docs = | ||
Sphinx>=1.8.1 | ||
docutils | ||
pylons-sphinx-themes>=1.0.9 | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[aliases] | ||
dev = develop easy_install waitress[testing] | ||
docs = develop easy_install waitress[docs] | ||
[tool:pytest] | ||
python_files = test_*.py | ||
# For the benefit of test_wasyncore.py | ||
python_classes = Test_* | ||
testpaths = | ||
tests | ||
addopts = -W always --cov --cov-report=term-missing |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,3 @@ | ||
############################################################################## | ||
# | ||
# Copyright (c) 2006 Zope Foundation and Contributors. | ||
# All Rights Reserved. | ||
# | ||
# This software is subject to the provisions of the Zope Public License, | ||
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
# FOR A PARTICULAR PURPOSE. | ||
# | ||
############################################################################## | ||
import os | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
try: | ||
README = open(os.path.join(here, "README.rst")).read() | ||
CHANGES = open(os.path.join(here, "CHANGES.txt")).read() | ||
except IOError: | ||
README = CHANGES = "" | ||
|
||
docs_extras = [ | ||
"Sphinx>=1.8.1", | ||
"docutils", | ||
"pylons-sphinx-themes>=1.0.9", | ||
] | ||
|
||
testing_extras = [ | ||
"nose", | ||
"coverage>=5.0", | ||
] | ||
|
||
setup( | ||
name="waitress", | ||
version="1.4.3", | ||
author="Zope Foundation and Contributors", | ||
author_email="zope-dev@zope.org", | ||
maintainer="Pylons Project", | ||
maintainer_email="pylons-discuss@googlegroups.com", | ||
description="Waitress WSGI server", | ||
long_description=README + "\n\n" + CHANGES, | ||
license="ZPL 2.1", | ||
keywords="waitress wsgi server http", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Zope Public License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI", | ||
], | ||
url="https://github.com/Pylons/waitress", | ||
packages=find_packages(), | ||
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", | ||
extras_require={"testing": testing_extras, "docs": docs_extras}, | ||
include_package_data=True, | ||
test_suite="waitress", | ||
zip_safe=False, | ||
entry_points=""" | ||
[paste.server_runner] | ||
main = waitress:serve_paste | ||
[console_scripts] | ||
waitress-serve = waitress.runner:run | ||
""", | ||
) | ||
setup() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.