Skip to content

Instantly share code, notes, and snippets.

@genadyp
Forked from althonos/setup.cfg
Created May 19, 2021 15:13
Show Gist options
  • Save genadyp/5e9d30bd5717c5a16f17f0ad64f15834 to your computer and use it in GitHub Desktop.
Save genadyp/5e9d30bd5717c5a16f17f0ad64f15834 to your computer and use it in GitHub Desktop.
A `setup.cfg` template for my Python projects
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
[metadata]
name = {name}
version = file: {name}/_version.txt
author = Martin Larralde
author_email = [email protected]
url = https://github.com/althonos/{name}
description = {description}
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT
license_file = COPYING
platform = any
keywords = {keywords}
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: Software Development :: Libraries :: Python Modules
project_urls =
Bug Tracker = https://github.com/althonos/{name}/issues
Changelog = https://github.com/althonos/{name}/blob/master/CHANGELOG.md
[options]
zip_safe = false
include_package_data = true
python_requires = >= 2.7, != 3.0.*, != 3.1.*, != 3.2.*
packages = {name}
test_suite = tests
setup_requires =
setuptools
# setuptools >=30.3.0 # minimal version for `setup.cfg`
# setuptools >=38.3.0 # version with most `setup.cfg` bugfixes
# setuptools >=46.4.0 # let's you use attr: to extract version from a module
install_requires =
{install_requires}
tests_require =
{tests_require}
[options.package_data]
{name} = py.typed, _version.txt, *.pyi
[bdist_wheel]
universal = true
[sdist]
formats = zip, gztar
[coverage:report]
show_missing = true
exclude_lines =
pragma: no cover
if False
# @abc.abstractmethod
# @abc.abstractproperty
# raise NotImplementedError
# return NotImplemented
# except ImportError
# raise MemoryError
# if __name__ == .__main__.:
# if typing.TYPE_CHECKING:
[green]
file-pattern = test_*.py
verbose = 2
no-skip-report = true
quiet-stdout = true
run-coverage = true
[pydocstyle]
match-dir = (?!tests)(?!resources)(?!docs)[^\.].*
match = (?!test)(?!setup)[^\._].*\.py
inherit = false
ignore = D200, D203, D213, D406, D407 # Google conventions
[flake8]
max-line-length = 99
doctests = True
exclude = .git, .eggs, __pycache__, tests/, docs/, build/, dist/
[mypy]
disallow_any_decorated = true
disallow_any_generics = true
disallow_any_unimported = false
disallow_subclassing_any = false
disallow_untyped_calls = true
disallow_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_return_any = true
@genadyp
Copy link
Author

genadyp commented Jun 9, 2021

# https://github.com/Pylons/waitress/blob/master/setup.cfg

[metadata]
name = waitress
version = 2.0.0
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 :: 3
    Programming Language :: Python :: 3.6
    Programming Language :: Python :: 3.7
    Programming Language :: Python :: 3.8
    Programming Language :: Python :: 3.9
    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
project_urls =
    Documentation = https://docs.pylonsproject.org/projects/waitress/en/latest/index.html
    Changelog = https://docs.pylonsproject.org/projects/waitress/en/latest/index.html#change-history
    Issue Tracker = https://github.com/Pylons/waitress/issues

author = Zope Foundation and Contributors
author_email = [email protected]
maintainer = Pylons Project
maintainer_email = [email protected]

[options]
package_dir=
    =src
packages=find:
python_requires = >=3.6.0

[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

[tool:pytest]
python_files = test_*.py
# For the benefit of test_wasyncore.py
python_classes = Test_*
testpaths =
    tests
addopts = --cov -W always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment