Skip to content

Numpy's recipe (mandatory for Python 2.7.11) #782

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

Closed
wants to merge 2 commits into from
Closed
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
11 changes: 6 additions & 5 deletions pythonforandroid/recipes/numpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

from pythonforandroid.toolchain import CompiledComponentsPythonRecipe, warning


class NumpyRecipe(CompiledComponentsPythonRecipe):

version = '1.9.2'
url = 'http://pypi.python.org/packages/source/n/numpy/numpy-{version}.tar.gz'
site_packages_name= 'numpy'

depends = ['python2']
call_hostpython_via_targetpython = False

patches = ['patches/fix-numpy.patch',
'patches/prevent_libs_check.patch',
Expand All @@ -17,10 +14,14 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):

def prebuild_arch(self, arch):
super(NumpyRecipe, self).prebuild_arch(arch)

# AND: Fix this warning!
warning('Numpy is built assuming the archiver name is '
'arm-linux-androideabi-ar, which may not always be true!')

def get_recipe_env(self, arch):
env = super(NumpyRecipe, self).get_recipe_env(arch)
# Set linker to use the correct gcc
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
return env

recipe = NumpyRecipe()