Document run-time deps
This commit is contained in:
parent
aca2f6a0c4
commit
03316d81e7
23
README.md
23
README.md
@ -34,6 +34,28 @@ And install the wheel in `%install` with `%pyproject_install`:
|
|||||||
%pyproject_install
|
%pyproject_install
|
||||||
|
|
||||||
|
|
||||||
|
Adding run-time and test-time dependencies
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
To run tests in the `%check` section, the package's runtime dependencies
|
||||||
|
often need to also be included as build requirements.
|
||||||
|
If the project's build system supports the [`prepare-metadata-for-build-wheel`
|
||||||
|
hook](https://www.python.org/dev/peps/pep-0517/#prepare-metadata-for-build-wheel),
|
||||||
|
this can be done using the `-r` flag:
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires -r
|
||||||
|
|
||||||
|
For projects that specify test requirements using an [`extra`
|
||||||
|
provide](https://packaging.python.org/specifications/core-metadata/#provides-extra-multiple-use),
|
||||||
|
these can be added using the `-x` flag.
|
||||||
|
For example, if upstream suggests installing test dependencies with
|
||||||
|
`pip install mypackage[testing]`, the test deps would be generated by:
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires -r -x testing
|
||||||
|
|
||||||
|
|
||||||
Limitations
|
Limitations
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
@ -49,6 +71,7 @@ Extras are currently ignored.
|
|||||||
|
|
||||||
Some valid Python version specifiers are not supported.
|
Some valid Python version specifiers are not supported.
|
||||||
|
|
||||||
|
The `-x` flag does not yet support multiple (comma-separated) extras.
|
||||||
|
|
||||||
[PEP 517]: https://www.python.org/dev/peps/pep-0517/
|
[PEP 517]: https://www.python.org/dev/peps/pep-0517/
|
||||||
[PEP 518]: https://www.python.org/dev/peps/pep-0518/
|
[PEP 518]: https://www.python.org/dev/peps/pep-0518/
|
||||||
|
Loading…
Reference in New Issue
Block a user