-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build to use exclusively pyproject.toml
- consolidates all of `setuptools` metadata and configuration as well as `coverage` configuration within `pyproject.toml`. - removes deprecated `setup.cfg` and `setup.py`. - updates `run-tests.sh` to use `pyproject.toml` instead of `setup.cfg` for `coverage` configuration.
- Loading branch information
1 parent
c4b3eab
commit a426132
Showing
5 changed files
with
207 additions
and
159 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% if top_line %} | ||
{{ top_line }} | ||
{{ top_underline * ((top_line)|length)}} | ||
{% elif versiondata.name %} | ||
{{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }}) | ||
{{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}} | ||
{% else %} | ||
{{ versiondata.version }} ({{ versiondata.date }}) | ||
{{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} | ||
{% endif %} | ||
|
||
{% for section in sections %} | ||
{% set underline = "-" %} | ||
{% if section %} | ||
{{section}}: | ||
{{ underline * section|length }}{% set underline = "~" %} | ||
|
||
{% endif %} | ||
{% if sections[section] %} | ||
{% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %} | ||
|
||
{{ definitions[category]['name'] }} | ||
{{ underline * definitions[category]['name']|length }} | ||
|
||
{% if definitions[category]['showcontent'] %} | ||
{% for text, values in sections[section][category]|dictsort(by='value') %} | ||
- {{ text }} {% if category != 'process' %}{{ values|sort|join(',\n ') }}{% endif %} | ||
|
||
{% endfor %} | ||
{% else %} | ||
- {{ sections[section][category]['']|sort|join(', ') }} | ||
|
||
|
||
{% endif %} | ||
{% if sections[section][category]|length == 0 %} | ||
|
||
Updates build to use exclusively ``pyproject.toml`` | ||
|
||
{% else %} | ||
{% endif %} | ||
{% endfor %} | ||
{% else %} | ||
|
||
Modernizes the build process by consolidating all of ``setuptools`` metadata within ``pyproject.toml`` and removing deprecated ``setup.cfg`` and ``setup.py``. | ||
|
||
{% endif %} | ||
{% endfor %} |
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,7 +1,93 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
requires = ["setuptools>=67.0.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[project] | ||
name = "pipenv" | ||
authors = [ | ||
{name = "Pipenv maintainer team", email = "[email protected]"}, | ||
] | ||
description = "Python Development Workflow for Humans." | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
license = {file = "LICENSE"} | ||
classifiers=[ | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [ | ||
"certifi", | ||
"setuptools>=67.0.0", | ||
"virtualenv>=20.24.2", | ||
] | ||
dynamic = ["version"] | ||
|
||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"towncrier", | ||
"beautifulsoup4", | ||
"sphinx", | ||
"flake8>=3.3.0,<4.0", | ||
"black==23.3.0", | ||
"parver", | ||
"invoke", | ||
] | ||
tests = [ | ||
"pytest>=5.0", | ||
"pytest-timeout", | ||
"pytest-xdist", | ||
"flaky", | ||
"mock", | ||
] | ||
|
||
|
||
[project.scripts] | ||
pipenv = "pipenv:cli" | ||
pipenv-resolver = "pipenv.resolver:main" | ||
|
||
|
||
[project.urls] | ||
Homepage = "https://github.com/pypa/pipenv" | ||
Documentation = "https://pipenv.pypa.io/en/latest/" | ||
Source = "https://github.com/pypa/pipenv.git" | ||
|
||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
exclude = ["tests*", "tests.*", "tasks*", "tasks.*"] | ||
|
||
|
||
[tool.setuptools.package-data] | ||
"*" = ["LICENSE", "NOTICES"] | ||
"pipenv.patched.safety" = ["VERSION", "safety-policy-template.yml"] | ||
"pipenv.patched.pip._vendor.certifi" = ["*.pem"] | ||
"pipenv.patched.pip._vendor.requests" = ["*.pem"] | ||
"pipenv.patched.pip._vendor.distlib._backport" = ["sysconfig.cfg"] | ||
"pipenv.patched.pip._vendor.distlib" = [ | ||
"t32.exe", | ||
"t64.exe", | ||
"w32.exe", | ||
"w64.exe", | ||
] | ||
"pipenv.vendor.ruamel" = ["yaml"] | ||
|
||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "pipenv.__version__"} | ||
|
||
|
||
## TESTING AND DEVELOPER CONFIGURATION BELOW ## | ||
|
||
[tool.black] | ||
line-length = 90 | ||
include = '\.pyi?$' | ||
|
@@ -28,106 +114,117 @@ exclude = ''' | |
) | ||
''' | ||
|
||
|
||
[tool.coverage.run] | ||
parallel = true | ||
|
||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
follow_imports = "skip" | ||
html_report = "mypyhtml" | ||
python_version = "3.7" | ||
mypy_path = "typeshed/pyi:typeshed/imports" | ||
|
||
|
||
[tool.pytest.ini_options] | ||
addopts = "-ra" | ||
plugins = "xdist" | ||
testpaths = ["tests"] | ||
# Add vendor and patched in addition to the default list of ignored dirs | ||
# Additionally, ignore tasks, news, test subdirectories and peeps directory | ||
norecursedirs = [ | ||
".*", "build", | ||
"dist", | ||
"CVS", | ||
"_darcs", | ||
"{arch}", | ||
"*.egg", | ||
"vendor", | ||
"patched", | ||
"news", | ||
"tasks", | ||
"docs", | ||
"tests/test_artifacts", | ||
"tests/pypi", | ||
"peeps", | ||
".*", | ||
"build", | ||
"dist", | ||
"CVS", | ||
"_darcs", | ||
"{arch}", | ||
"*.egg", | ||
"vendor", | ||
"patched", | ||
"news", | ||
"tasks", | ||
"docs", | ||
"tests/test_artifacts", | ||
"tests/pypi", | ||
"peeps", | ||
] | ||
filterwarnings = [] | ||
# These are not all the custom markers, but most of the ones with repeat uses | ||
# `pipenv run pytest --markers` will list all markers including these | ||
markers = [ | ||
"install: tests having to do with `pipenv install`", | ||
"update: tests having to do with `pipenv update`", | ||
"needs_internet: integration tests that require internet to pass", | ||
"basic: basic pipenv tests grouping", | ||
"dev: tests having to do with dev and dev packages", | ||
"system: related or interacting with the os", | ||
"utils: grouping of pipenv utility functions", | ||
"cli: test grouping that relate to command line like `pipenv --flag args`", | ||
"requirements: tests that save and alter pip requirements", | ||
"run: tests that run or execute python through pipenv", | ||
"script: grouping of tests that execute scripts", | ||
"keep_outdated: when an activity is supposed to keep something out of date", | ||
"lock: tests that interact with pipenv lock", | ||
"markers: pipenv environment markers", | ||
"vcs: tests integration with pipenv and vertsion control systems", | ||
"project: tests with the project object", | ||
"sync: related to `pipenv sync`", | ||
"rrule: relating to rrules (as in recurring time)", | ||
"tzoffset: timezone offset", | ||
"gettz: tests with gettz (get timezone) from dateutil lib", | ||
"tzstr: timezone string", | ||
"extras", | ||
"extended", | ||
"ext: extra non-categorized tests", | ||
"install: tests having to do with `pipenv install`", | ||
"update: tests having to do with `pipenv update`", | ||
"needs_internet: integration tests that require internet to pass", | ||
"basic: basic pipenv tests grouping", | ||
"dev: tests having to do with dev and dev packages", | ||
"system: related or interacting with the os", | ||
"utils: grouping of pipenv utility functions", | ||
"cli: test grouping that relate to command line like `pipenv --flag args`", | ||
"requirements: tests that save and alter pip requirements", | ||
"run: tests that run or execute python through pipenv", | ||
"script: grouping of tests that execute scripts", | ||
"keep_outdated: when an activity is supposed to keep something out of date", | ||
"lock: tests that interact with pipenv lock", | ||
"markers: pipenv environment markers", | ||
"vcs: tests integration with pipenv and vertsion control systems", | ||
"project: tests with the project object", | ||
"sync: related to `pipenv sync`", | ||
"rrule: relating to rrules (as in recurring time)", | ||
"tzoffset: timezone offset", | ||
"gettz: tests with gettz (get timezone) from dateutil lib", | ||
"tzstr: timezone string", | ||
"extras", | ||
"extended", | ||
"ext: extra non-categorized tests", | ||
] | ||
|
||
|
||
[tool.ruff] | ||
exclude = [ | ||
"pipenv/patched/*", | ||
"pipenv/vendor/*", | ||
"pipenv/patched/*", | ||
"pipenv/vendor/*", | ||
] | ||
select = [ | ||
"ASYNC", | ||
"B", | ||
"C9", | ||
"E", | ||
"F", | ||
"FLY", | ||
"G", | ||
"I", | ||
"ISC", | ||
"PIE", | ||
"PL", | ||
"TID", | ||
"UP", | ||
"W", | ||
"YTT" | ||
"ASYNC", | ||
"B", | ||
"C9", | ||
"E", | ||
"F", | ||
"FLY", | ||
"G", | ||
"I", | ||
"ISC", | ||
"PIE", | ||
"PL", | ||
"TID", | ||
"UP", | ||
"W", | ||
"YTT" | ||
] | ||
ignore = [ | ||
"B904", | ||
"PIE790", | ||
"PLR5501", | ||
"PLW2901", | ||
"B904", | ||
"PIE790", | ||
"PLR5501", | ||
"PLW2901", | ||
] | ||
line-length = 137 | ||
target-version = "py37" | ||
|
||
|
||
[tool.ruff.mccabe] | ||
max-complexity = 44 | ||
|
||
|
||
[tool.ruff.pylint] | ||
allow-magic-value-types = ["int", "str"] | ||
max-args = 20 | ||
max-branches = 38 | ||
max-returns = 9 | ||
max-statements = 155 | ||
|
||
|
||
[tool.ruff.per-file-ignores] | ||
"docs/conf.py" = ["E402", "E501"] | ||
"get-pipenv.py" = ["E402"] | ||
|
@@ -142,6 +239,7 @@ max-statements = 155 | |
"tests/unit/test_funktools.py" = ["B015"] | ||
"tests/unit/test_utils.py" = ["F811"] | ||
|
||
|
||
[tool.towncrier] | ||
package = "pipenv" | ||
filename = "CHANGELOG.rst" | ||
|
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
Oops, something went wrong.