Merge pull request #4999 from xoviat/pep518-editable

Run setup.py develop inside of PEP 518 build environment
This commit is contained in:
Paul Moore 2018-03-02 08:40:17 +00:00 committed by GitHub
commit 34cc364903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 12 deletions

1
news/4999.feature Normal file
View File

@ -0,0 +1 @@
Run 'setup.py develop' inside pep518 build environment.

View File

@ -897,19 +897,20 @@ class InstallRequirement(object):
with indent_log():
# FIXME: should we do --install-headers here too?
call_subprocess(
[
sys.executable,
'-c',
SETUPTOOLS_SHIM % self.setup_py
] +
list(global_options) +
['develop', '--no-deps'] +
list(install_options),
with self.build_env:
call_subprocess(
[
sys.executable,
'-c',
SETUPTOOLS_SHIM % self.setup_py
] +
list(global_options) +
['develop', '--no-deps'] +
list(install_options),
cwd=self.setup_py_dir,
show_stdout=False,
)
cwd=self.setup_py_dir,
show_stdout=False,
)
self.install_succeeded = True

View File

@ -300,6 +300,14 @@ def test_constraints_local_editable_install_causes_error(script, data):
assert 'Could not satisfy constraints for' in result.stderr
def test_constraints_local_editable_install_pep518(script, data):
to_install = data.src.join("pep518-3.0")
script.pip('download', 'setuptools', 'wheel', '-d', data.packages)
script.pip(
'install', '--no-index', '-f', data.find_links, '-e', to_install)
def test_constraints_local_install_causes_error(script, data):
script.scratch_path.join("constraints.txt").write(
"singlemodule==0.0.0"