Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run setup.py develop inside of PEP 518 build environment #4999

Merged
merged 22 commits into from Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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