Skip to content

Commit

Permalink
Merge pull request #4999 from xoviat/pep518-editable
Browse files Browse the repository at this point in the history
Run setup.py develop inside of PEP 518 build environment
  • Loading branch information
pfmoore authored Mar 2, 2018
2 parents 1cb99c1 + 2025f7f commit 34cc364
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions news/4999.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Run 'setup.py develop' inside pep518 build environment.
27 changes: 14 additions & 13 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,19 +897,20 @@ def install_editable(self, install_options,

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),

cwd=self.setup_py_dir,
show_stdout=False,
)
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,
)

self.install_succeeded = True

Expand Down
8 changes: 8 additions & 0 deletions tests/functional/test_install_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 34cc364

Please sign in to comment.