summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_develop.py
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-09 12:06:32 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-06-15 16:43:49 +0100
commit73c65b2d79a54635370d5fb734711768aef5fabc (patch)
treeb1851b4bb0fb31ec581cd32eba9145d2a493c8a6 /setuptools/tests/test_develop.py
parent8cb134491569b8800e7f4e20763428258a5f65a8 (diff)
downloadpython-setuptools-git-73c65b2d79a54635370d5fb734711768aef5fabc.tar.gz
Move test from test_develop to test_editable_install
Diffstat (limited to 'setuptools/tests/test_develop.py')
-rw-r--r--setuptools/tests/test_develop.py44
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)