Offload more work to the underlying pip command used to install the
build requirements, so there's no need to duplicate code to handle
environment markers/extras. This is done by setting the correct options
from the finder passed in argument to `_install_build_reqs`.
- avoid hitting the index: use `common_wheels`/`script.pip_install_local`
- use `script.pip(..., use_module=True)` to simplify some tests
- improve `test_pep518_uses_build_env` parametrization
- simplify `test_pep518_with_user_pip`: we only need to check build
requirements can be installed, so no need for testing with both
`install` and `wheel` command
- fix `test_pip_wheel_with_pep518_build_reqs_no_isolation`: building
pep518-3.0 without isolation should fail if the build requirements
are not installed.
* fix build environment handling when using PyPy
* do use the build environment for all build commands
* allow installing and building a wheel of a PEP 518 enabled
package without prior installation of setuptools and/or wheels
* fix check for minimum supported requirements for PEP 518 support:
- correctly handle complex requirements
- both setuptools and wheels are needed
This test relies on buggy setuptools behaviour (keeping
requirements with environment markers in install_requires,
rather than moving them to extras_require) which has been
fixed in recent setuptools versions.
The use of environment markers implies that the user expects the
packages to not be installed in some cases (eg depending on version
of Python), so the log output shouldn't be classed as a warning,
particularly since this results in it being sent to `stderr` rather
than `stdout`.
Fixes#4876.
This essentially allows me to do an overall check general check by running the tests using pytest's `-k basic` syntax. Given that I like running tests often and that, in general, I make typos more often than changes that break core functionality, I think this will reduce cycle times for me.
Installed files are recorded by Pip in the order the underlying tool
(Distutils, Setuptools, ...) recorded them.
Unfortunately, at least Setuptools doesn't record them in a
deterministic order in the case of a directory being installed, as it
uses os.walk to find the list of files.
We could fix all those underlying tools to record their files in a
deterministic order in all situations. But fixing it once here in Pip
for all tools is certainly simpler and more future-proof.
This makes the installation more reproducible, and therefore more
verifiable.
* fix test not using temporary directory
* avoid creating a `cache_dir` directory in the source tree
* drop `data` fixture from tests that don't use it
* tests: fix pytest warning
Also, reduce the number of test cases because these tests take too long.
The issue is that the setup and teardown of the test environment takes a
long time, and in order to reuse the same test environment, we must
perform install/uninstall cycles to test different URL and path formats.
A better approach might be to generate `FSPkg` using a function that
writes the `setup.py` and `__init__.py` files to a new directory. The
test packages would be easy to generate and save the uninstall time.
For now, we reduce the number of URL/path formats tested, since the
previous test coverage was even more limited.
Tests are timing out and also not following requirements/install test
factorization. Split to conform to test organization and to prevent
test timeout.