-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fixes hostpython build with macOS venv #2159
Merged
AndreMiras
merged 1 commit into
kivy:develop
from
AndreMiras:feature/fix_macos_venv_build
Apr 29, 2020
Merged
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
from os.path import exists, join, isfile | ||
|
||
from pythonforandroid.logger import shprint | ||
from pythonforandroid.patching import is_version_lt | ||
from pythonforandroid.recipe import Recipe | ||
from pythonforandroid.util import ( | ||
BuildInterruptingException, | ||
|
@@ -35,6 +36,10 @@ class Hostpython3Recipe(Recipe): | |
'''The default url to download our host python recipe. This url will | ||
change depending on the python version set in attribute :attr:`version`.''' | ||
|
||
patches = ( | ||
('patches/pyconfig_detection.patch', is_version_lt("3.8.3")), | ||
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. Now applying to anything lower than 3.8.3. Since this issue was also impacting some recent version of the 3.7 branch I thought it would be easier to go that way than being ultra ranging inside MINOR and PATCH with a complex expression (given MAJOR.MINOR.PATCH) |
||
) | ||
|
||
@property | ||
def _exe_name(self): | ||
''' | ||
|
13 changes: 13 additions & 0 deletions
13
pythonforandroid/recipes/hostpython3/patches/pyconfig_detection.patch
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,13 @@ | ||
diff -Nru Python-3.8.2/Lib/site.py Python-3.8.2-new/Lib/site.py | ||
--- Python-3.8.2/Lib/site.py 2020-04-28 12:48:38.000000000 -0700 | ||
+++ Python-3.8.2-new/Lib/site.py 2020-04-28 12:52:46.000000000 -0700 | ||
@@ -487,7 +487,8 @@ | ||
if key == 'include-system-site-packages': | ||
system_site = value.lower() | ||
elif key == 'home': | ||
- sys._home = value | ||
+ # this is breaking pyconfig.h path detection with venv | ||
+ print('Ignoring "sys._home = value" override') | ||
|
||
sys.prefix = sys.exec_prefix = site_prefix | ||
|
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
13 changes: 13 additions & 0 deletions
13
pythonforandroid/recipes/python3/patches/pyconfig_detection.patch
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,13 @@ | ||
diff -Nru Python-3.8.2/Lib/site.py Python-3.8.2-new/Lib/site.py | ||
--- Python-3.8.2/Lib/site.py 2020-04-28 12:48:38.000000000 -0700 | ||
+++ Python-3.8.2-new/Lib/site.py 2020-04-28 12:52:46.000000000 -0700 | ||
@@ -487,7 +487,8 @@ | ||
if key == 'include-system-site-packages': | ||
system_site = value.lower() | ||
elif key == 'home': | ||
- sys._home = value | ||
+ # this is breaking pyconfig.h path detection with venv | ||
+ print('Ignoring "sys._home = value" override') | ||
|
||
sys.prefix = sys.exec_prefix = site_prefix | ||
|
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.
🔥 Glad that we can remove this!