-
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
Greenlet Crystax/Python3 support, fixes #1245 #1250
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import os | ||
from pythonforandroid.toolchain import PythonRecipe | ||
|
||
|
||
|
@@ -6,4 +7,15 @@ class GreenletRecipe(PythonRecipe): | |
url = 'https://pypi.python.org/packages/source/g/greenlet/greenlet-{version}.tar.gz' | ||
depends = [('python2', 'python3crystax')] | ||
|
||
def get_recipe_env(self, arch=None, with_flags_in_cc=True): | ||
env = super(GreenletRecipe, self).get_recipe_env(arch, with_flags_in_cc) | ||
# sets linker to use the correct gcc (cross compiler) | ||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions' | ||
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. Otherwise the default host linker was picked up rather than the ARM cross compiler. 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. Also addressed in #1361 |
||
# required additional library and path for Crystax | ||
if self.ctx.ndk == 'crystax': | ||
env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) | ||
env['LDFLAGS'] += ' -lpython{}m'.format(self.ctx.python_recipe.version[0: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. So that we don't get run time |
||
return env | ||
|
||
|
||
recipe = GreenletRecipe() |
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 believe other recipes should benefit from it.
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 is now probably addressed in #1361