Prevent distutils option error target prefix conflict by jaraco · Pull Request #6008 · pypa/pip (original) (raw)
Here is a test:
tests/functional/test_install.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git i/tests/functional/test_install.py w/tests/functional/test_install.py index 40504a18..d93d68c7 100644 --- i/tests/functional/test_install.py +++ w/tests/functional/test_install.py @@ -1444,3 +1444,19 @@ def test_install_conflict_warning_can_be_suppressed(script, data): 'install', '--no-index', pkgB_path, '--no-warn-conflicts' ) assert "Successfully installed pkgB-2.0" in result2.stdout, str(result2) + + +def test_target_install_ignores_distutils_config_install_prefix(script):
- prefix = script.scratch_path / 'prefix'
- Path(os.environ['HOME'], '.pydistutils.cfg').write(textwrap.dedent(
'''
[install]
prefix=%s
''' % str(prefix)))
- target = script.scratch_path / 'target'
- result = script.pip_install_local('simplewheel', '-t', target)
- assert (
"Successfully installed simplewheel" in result.stdout and
(target - script.base_path) in result.files_created and
(prefix - script.base_path) not in result.files_created
- ), str(result)