During a build of extension module within `pip wheel` the source directory is
recursively copied in a temporary directory.
See https://github.com/pypa/pip/issues/7555
When the temporary directory is inside the source directory
(for example by setting `TMPDIR=$PWD/tmp`) this caused an infinite recursion
that ended in:
[Errno 36] File name too long
We prevent that buy never copying the target to the target in _copy_source_tree.
Fixes https://github.com/pypa/pip/issues/7872
- check build requirements for conflicts
- better isolation (ignore system site packages)
- support 2 prefixes: a "normal" one, and an "overlay" one
(with higher priority over "normal")
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.
Setup build environment before first invocation of setup.py and improve test to actually make check that build requirements are installed upon invocation.
It seems pip distinguishes paths with .. or extra / for constraints.
For example, the following directories are considered different.
/path/to/dir
/path/to//dir
/path/to/dir/subdir/..
It can lead "Could not satisfy constraints for 'xxxx':
installation from path or url cannot be constrained to a version"
error, whose cause is not obvious to users. [1]
This commit tries to normalize the given directory name to avoid
the error.
[1] https://bugs.launchpad.net/devstack/+bug/1542545