-
Notifications
You must be signed in to change notification settings - Fork 216
Replace setuptools
build backend with hatchling
#551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-fancy-pypi-readme"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "pytest-cov" | ||
dynamic = ["readme"] | ||
version = "3.0.0" | ||
description = "Pytest plugin for measuring coverage." | ||
license = "MIT" | ||
requires-python = ">=3.7" | ||
authors = [ | ||
{ name = "Marc Schlaich", email = "[email protected]" }, | ||
] | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not directly related to the conversion but perhaps, a |
||
keywords = [ | ||
"cover", | ||
"coverage", | ||
"distributed", | ||
"parallel", | ||
"py.test", | ||
"pytest", | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Framework :: Pytest", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX", | ||
"Operating System :: Unix", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Software Development :: Testing", | ||
"Topic :: Utilities", | ||
] | ||
dependencies = [ | ||
"coverage[toml]>=5.2.1", | ||
"pytest>=4.6", | ||
] | ||
|
||
[project.optional-dependencies] | ||
testing = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This works as the "testing" extra right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if nowadays this could be turned into a dependency group finally.. |
||
"fields", | ||
"hunter", | ||
"process-tests", | ||
"pytest-xdist", | ||
"six", | ||
"virtualenv", | ||
] | ||
|
||
[project.entry-points.pytest11] | ||
pytest_cov = "pytest_cov.plugin" | ||
|
||
[project.urls] | ||
Changelog = "https://pytest-cov.readthedocs.io/en/latest/changelog.html" | ||
Documentation = "https://pytest-cov.readthedocs.io/" | ||
Homepage = "https://github.com/pytest-dev/pytest-cov" | ||
"Issue Tracker" = "https://github.com/pytest-dev/pytest-cov/issues" | ||
|
||
[tool.hatch.metadata.hooks.fancy-pypi-readme] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the fancy pypi readme do the ref tag stripping automatically? The ol setup.py had a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, but as I mentioned in the OP it was doing nothing: Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib, re
>>>
>>> before = pathlib.Path('CHANGELOG.rst').read_text(encoding='utf-8')
>>> after = re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', before)
>>>
>>> before == after
True |
||
content-type = "text/x-rst" | ||
fragments = [ | ||
{ path = "README.rst" }, | ||
{ path = "CHANGELOG.rst" }, | ||
] | ||
|
||
[tool.hatch.build.targets.wheel.hooks.autorun] | ||
dependencies = ["hatch-autorun"] | ||
file = "src/pytest-cov.embed" |
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NOTE: Looks like this is replaced by |
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,9 +10,9 @@ passenv = | |||||
; a generative tox configuration, see: https://tox.readthedocs.io/en/latest/config.html#generative-envlist | ||||||
|
||||||
[tox] | ||||||
isolated_build = true | ||||||
envlist = | ||||||
check | ||||||
py{36}-pytest{70}-xdist250-coverage{62} | ||||||
py{37,38,39,310,py37,py38}-pytest{71}-xdist250-coverage{64} | ||||||
docs | ||||||
|
||||||
|
@@ -87,16 +87,17 @@ commands = | |||||
|
||||||
[testenv:check] | ||||||
deps = | ||||||
build | ||||||
twine | ||||||
docutils | ||||||
check-manifest | ||||||
flake8 | ||||||
readme-renderer | ||||||
pygments | ||||||
isort | ||||||
skip_install = true | ||||||
usedevelop = false | ||||||
commands = | ||||||
python setup.py check --strict --metadata --restructuredtext | ||||||
check-manifest {toxinidir} | ||||||
flake8 src tests setup.py | ||||||
isort --check-only --diff src tests setup.py | ||||||
python -m build | ||||||
twine check dist/* | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should probably include
Suggested change
|
||||||
flake8 src tests | ||||||
isort --check-only --diff src tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, this could be replaced by a
git clean
which is cross-platform.