-
Notifications
You must be signed in to change notification settings - Fork 239
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
Patching pypy venv #502
Merged
Merged
Patching pypy venv #502
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
91dcaf5
patching linux and macos
Czaki eb0fcb0
try test
Czaki 780d8fb
add patch files for pypy2.7
Czaki d1acc08
fix installing
Czaki 615e905
Combine patch files into one
YannickJadoul 504dda4
Simplify further, and add test to remind ourselves to remove the PyPy…
YannickJadoul 2ea6f5f
ignore fail of patch on linux
Czaki bbd71eb
fix test
Czaki c78c2b0
add timeout
Czaki 577cde9
fix patch on linux
Czaki 3bb6086
change `-N` to `--force`
Czaki 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 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 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 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 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,36 @@ | ||
diff --git a/lib-python/3/sysconfig.py b/lib-python/3/sysconfig.py | ||
index 0d08cde66b4150e1772c13fdc6fe34d079c2b10d..30c77d165a2505d98bc7660ff0cc3b728f56c682 100644 | ||
--- a/lib-python/3/sysconfig.py | ||
+++ b/lib-python/3/sysconfig.py | ||
@@ -618,9 +618,6 @@ def get_config_vars(*args): | ||
import _osx_support | ||
_osx_support.customize_config_vars(_CONFIG_VARS) | ||
|
||
- _CONFIG_VARS['INCLUDEPY'] = os.path.join(_CONFIG_VARS['prefix'], | ||
- 'include') | ||
- | ||
if args: | ||
vals = [] | ||
for name in args: | ||
diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py | ||
index f1cca41a4b7553819bb1a2a63af1c1a9b8591ce9..a34216e8e12b82abd72fabdd7793b3e8bb19bbcf 100644 | ||
--- a/lib_pypy/_sysconfigdata.py | ||
+++ b/lib_pypy/_sysconfigdata.py | ||
@@ -5,6 +5,7 @@ from distutils.spawn import find_executable | ||
|
||
so_ext = _imp.extension_suffixes()[0] | ||
|
||
+mybase = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
build_time_vars = { | ||
# SOABI is PEP 3149 compliant, but CPython3 has so_ext.split('.')[1] | ||
@@ -25,7 +26,8 @@ build_time_vars = { | ||
'AR': "ar", | ||
'ARFLAGS': "rc", | ||
'EXE': "", | ||
- 'LIBDIR': os.path.join(sys.prefix, 'bin'), | ||
+ 'LIBDIR': os.path.join(mybase, 'lib'), | ||
+ 'INCLUDEPY': os.path.join(mybase, 'include'), | ||
} | ||
|
||
if find_executable("gcc"): |
This file contains 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,27 @@ | ||
--- a/lib-python/2.7/sysconfig.py | ||
+++ b/lib-python/2.7/sysconfig.py | ||
@@ -553,9 +553,6 @@ def get_config_vars(*args): | ||
if type_ == imp.C_EXTENSION: | ||
_CONFIG_VARS['SOABI'] = suffix.split('.')[1] | ||
break | ||
- _CONFIG_VARS['INCLUDEPY'] = os.path.join(_CONFIG_VARS['prefix'], | ||
- 'include') | ||
- | ||
if args: | ||
vals = [] | ||
for name in args: | ||
--- a/lib_pypy/_sysconfigdata.py | ||
+++ b/lib_pypy/_sysconfigdata.py | ||
@@ -1,5 +1,11 @@ | ||
-import imp | ||
+import imp, os | ||
+ | ||
+mybase = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
build_time_vars = { | ||
"SO": [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION][0] | ||
} | ||
+ | ||
+build_time_vars['LIBDIR'] = os.path.join(mybase, 'lib') | ||
+build_time_vars['INCLUDEPY'] = os.path.join(mybase, 'include') | ||
+ |
This file contains 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 +1,6 @@ | ||
-e . | ||
pytest | ||
pytest-timeout | ||
mkdocs==1.0.4 | ||
mkdocs-include-markdown-plugin==2.1.1 | ||
pymdown-extensions | ||
|
This file contains 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 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
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.
Why
-N
, why-i
?I don't see the point of this? We know our patches should apply forward?
This was also not the issue in what you showed. The issue seems to have been the leading
a
/b
?Better apply one of these, then?
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.
The leading a/b character should be fixed by
-p1
. The-i
(or--input
) is correct, we want to specify an input patch, even if it works without it. I think--force
is probably what you want here, though, since you never want it to ask questions, which I think-N
still could do if it's not one of {unpatched, already patched}.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.
Perhaps?
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.
-i
is needed to specify the patch file. Patch on Linux assumes that the first file is one to patch.I see no difference in behavior between
-N
and--force
. We have properly formated patch files.