-
Notifications
You must be signed in to change notification settings - Fork 3.1k
improve handling of PEP 518 build requirements #5286
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
Merged
pradyunsg
merged 7 commits into
pypa:master
from
benoit-pierre:improve_pep518_build_requirements_handling
May 19, 2018
+161
−126
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3de9bdb
tests: tweak `simplewheel` test distribution
benoit-pierre 04874e2
tests: improve PEP 518 tests
benoit-pierre ca4e2ad
improve handling of PEP 518 build requirements
benoit-pierre 7b4790d
cleanup PEP 518 implementation
benoit-pierre 1ac5f09
tweak output when installing PEP 518 build dependencies
benoit-pierre 77f6ac6
forward verbose flag to build dependencies installs
benoit-pierre 92e6e19
minor cleanup
benoit-pierre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve handling of PEP 518 build requirements: support environment markers and extras. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve handling of PEP 518 build requirements: support environment markers and extras. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
from pip._vendor.pkg_resources import RequirementParseError, parse_requirements | ||
|
||
from pip._internal import wheel | ||
from pip._internal.build_env import BuildEnvironment | ||
from pip._internal.build_env import NoOpBuildEnvironment | ||
from pip._internal.compat import native_str | ||
from pip._internal.download import ( | ||
is_archive_file, is_url, path_to_url, url_to_path, | ||
|
@@ -127,7 +127,7 @@ def __init__(self, req, comes_from, source_dir=None, editable=False, | |
self.is_direct = False | ||
|
||
self.isolated = isolated | ||
self.build_env = BuildEnvironment(no_clean=True) | ||
self.build_env = NoOpBuildEnvironment() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice idea. :) |
||
|
||
@classmethod | ||
def from_editable(cls, editable_req, comes_from=None, isolated=False, | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+118 Bytes
(110%)
tests/data/packages/simplewheel-2.0-1-py2.py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
[egg_info] | ||
tag_build = | ||
tag_date = 0 | ||
tag_svn_revision = 0 | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env python | ||
from setuptools import find_packages, setup | ||
from setuptools import setup | ||
|
||
import simple # ensure dependency is installed | ||
import simplewheel # ensure dependency is installed | ||
|
||
setup(name='pep518', | ||
version='3.0', | ||
packages=find_packages() | ||
py_modules=['pep518'], | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include pyproject.toml |
1 change: 1 addition & 0 deletions
1
tests/data/src/pep518_with_extra_and_markers-1.0/pep518_with_extra_and_markers.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#dummy |
7 changes: 7 additions & 0 deletions
7
tests/data/src/pep518_with_extra_and_markers-1.0/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[build-system] | ||
requires=[ | ||
"requires_simple_extra[extra]", | ||
"simplewheel==1.0; python_version < '3'", | ||
"simplewheel==2.0; python_version >= '3'", | ||
"setuptools", "wheel", | ||
] |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
|
||
from setuptools import setup | ||
|
||
# ensure dependencies are installed | ||
import simple | ||
import simplewheel | ||
|
||
assert simplewheel.__version__ == '1.0' if sys.version_info < (3,) else '2.0' | ||
|
||
setup(name='pep518_with_extra_and_markers', | ||
version='1.0', | ||
py_modules=['pep518_with_extra_and_markers'], | ||
) |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/usr/bin/env python | ||
from setuptools import find_packages, setup | ||
from setuptools import setup | ||
|
||
import simplewheel | ||
|
||
setup(name='simplewheel', | ||
version='1.0', | ||
packages=find_packages() | ||
version=simplewheel.__version__, | ||
packages=['simplewheel'], | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '1.0' |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/usr/bin/env python | ||
from setuptools import find_packages, setup | ||
from setuptools import setup | ||
|
||
import simplewheel | ||
|
||
setup(name='simplewheel', | ||
version='2.0', | ||
packages=find_packages() | ||
version=simplewheel.__version__, | ||
packages=['simplewheel'], | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '2.0' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for adding
--ignore-installed
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call is not run with build isolation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha.
Isolating this run would make pip not visible ->
python -m pip
won't work, and a temporary prefix for the installation of packages makes this non env-breaking.