diff options
Diffstat (limited to 'setuptools/tests/test_develop.py')
-rw-r--r-- | setuptools/tests/test_develop.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index c52072ac..0dd60342 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -5,12 +5,10 @@ import os import sys import subprocess import platform -import pathlib from setuptools.command import test import pytest -import pip_run.launch from setuptools.command.develop import develop from setuptools.dist import Distribution @@ -165,45 +163,3 @@ class TestNamespaces: ] with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(pkg_resources_imp) - - @pytest.mark.xfail( - platform.python_implementation() == 'PyPy', - reason="Workaround fails on PyPy (why?)", - ) - def test_editable_prefix(self, tmp_path, sample_project): - """ - Editable install to a prefix should be discoverable. - """ - prefix = tmp_path / 'prefix' - - # figure out where pip will likely install the package - site_packages = prefix / next( - pathlib.Path(path).relative_to(sys.prefix) - for path in sys.path - if 'site-packages' in path and path.startswith(sys.prefix) - ) - site_packages.mkdir(parents=True) - - # install workaround - pip_run.launch.inject_sitecustomize(str(site_packages)) - - env = dict(os.environ, PYTHONPATH=str(site_packages)) - cmd = [ - sys.executable, - '-m', - 'pip', - 'install', - '--editable', - str(sample_project), - '--prefix', - str(prefix), - '--no-build-isolation', - ] - subprocess.check_call(cmd, env=env) - - # now run 'sample' with the prefix on the PYTHONPATH - bin = 'Scripts' if platform.system() == 'Windows' else 'bin' - exe = prefix / bin / 'sample' - if sys.version_info < (3, 8) and platform.system() == 'Windows': - exe = str(exe) - subprocess.check_call([exe], env=env) |