From fd623755cad7ee9fc1492029f4ebdde8ae6b1c1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 04:03:42 -0500 Subject: pip can't accept -e and -t --- setuptools/tests/test_develop.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'setuptools/tests') diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index bf162d8d..8e905357 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -160,6 +160,19 @@ class TestNamespaces: tmpl = '__import__("site").addsitedir({target_str!r})' sc.write_text(tmpl.format(**locals()), encoding='utf-8') + @staticmethod + def install_develop(src_dir, target): + + develop_cmd = [ + sys.executable, + 'setup.py', + 'develop', + '--install-dir', str(target), + ] + env = dict(PYTHONPATH=str(target)) + with src_dir.as_cwd(): + subprocess.check_call(develop_cmd, env=env) + def test_namespace_package_importable(self, tmpdir): """ Installing two packages sharing the same namespace, one installed @@ -174,11 +187,11 @@ class TestNamespaces: install_cmd = [ 'pip', 'install', - '-e', str(pkg_B), str(pkg_A), '-t', str(target), ] subprocess.check_call(install_cmd) + self.install_develop(pkg_B, target) self.make_site_dir(target) try_import = [ sys.executable, -- cgit v1.2.3