-
Notifications
You must be signed in to change notification settings - Fork 39
Update build process to current standards #84
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: develop
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
__pycache__/ | ||
/.env | ||
/MANIFEST | ||
/_meta.py | ||
/build/ | ||
/dist/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
git-props | ||
pytest >=3.7.0 | ||
setuptools | ||
build | ||
pip | ||
sphinx-copybutton | ||
sphinx_rtd_theme |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
include CHANGES.rst | ||
include LICENSE.txt | ||
include MANIFEST.in | ||
include README.rst | ||
include _meta.py | ||
recursive-exclude .github * | ||
exclude .gitignore | ||
exclude .readthedocs.yaml | ||
exclude .rtd-require | ||
recursive-exclude doc * | ||
include doc/examples/*.py | ||
include tests/conftest.py | ||
include tests/pytest.ini | ||
include tests/test_*.py | ||
exclude Makefile | ||
exclude python-pytest-dependency.spec |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools-scm"] | ||
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. Installing a plain Python package is such a trivial task that I don't like to to add extra requirements just for this. setuptools (without version constraint) is an exception that I'm willing to take, but I prefer not to go beyond that. 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. Requiring a (not so much) recent setuptools at build time is not a strong requirement. Besides, even at installation time, setuptools needs to be current. From the Python Packaging User Guide:
I can understand why you want to remove All Python packages are moving to recent versions of setuptools, that's the direction taken by the whole community. I don't understand arguments such as "I prefer not to". |
||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "pytest-dependency" | ||
description = "Manage dependencies of tests" | ||
authors = [{name = "Rolf Krahl", email = "[email protected]"}] | ||
readme = "README.rst" | ||
requires-python = ">=3.4" | ||
dependencies = [ | ||
"pytest>=3.7.0", | ||
] | ||
dynamic = ["version"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Framework :: Pytest", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
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 prefer to explicitly list the Python version the respective release supports. It makes it easier when you browse PyPI and to answer questions like "what was the last release that did support Python X.Y?" And, before you ask: yes before making any release I do test with all officially supported Python versions. I'm not relying on the GitHub workflow alone for that. 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. That's what |
||
"Topic :: Software Development :: Testing", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/RKrahl/pytest-dependency" | ||
Documentation = "https://pytest-dependency.readthedocs.io" | ||
Source = "https://github.com/RKrahl/pytest-dependency.git" | ||
Download = "https://github.com/RKrahl/pytest-dependency/releases/" | ||
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. The current This has the advantage that this link always matches the version you are looking at and remains valid also if I publish new releases. 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. Yes, but it requires to execute code at installation time, which is to be avoided. |
||
Changelog = "https://pytest-dependency.readthedocs.io/en/latest/changelog.html" | ||
|
||
[project.entry-points.pytest11] | ||
dependency = "pytest_dependency" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
"""$DOC""" | ||
|
||
__version__ = "$VERSION" | ||
|
||
import logging | ||
import pytest | ||
|
||
|
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.
This will discover the version of the currently installed version. Not the version of the package that the current document build is running from.
Uh oh!
There was an error while loading. Please reload this page.
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.
We can write to
pytest_dependency.__version__
, no problem, but need to make surepytest_dependency.__version__
is written before building the documentation.