Skip to content

Commit eb51d70

Browse files
authored
Merge pull request #783 from opacam/netifaces-python-base
Netifaces's recipe (mandatory for Python 2.7.11)
2 parents 4fc9be9 + adfcf86 commit eb51d70

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
2-
from os.path import join
3-
42

53
class NetifacesRecipe(CompiledComponentsPythonRecipe):
64
name = 'netifaces'
75
version = '0.10.4'
86
url = 'https://pypi.python.org/packages/source/n/netifaces/netifaces-{version}.tar.gz'
9-
site_packages_name = 'netifaces'
107
depends = ['python2', 'setuptools']
8+
call_hostpython_via_targetpython = False
9+
site_packages_name = 'netifaces'
1110

1211
def get_recipe_env(self, arch=None):
1312
env = super(NetifacesRecipe, self).get_recipe_env(arch)
14-
15-
# TODO: fix hardcoded path
16-
# This is required to prevent issue with _io.so import.
17-
hostpython = self.get_recipe('hostpython2', self.ctx)
18-
env['PYTHONPATH'] = (
19-
join(hostpython.get_build_dir(arch.arch), 'build',
20-
'lib.linux-x86_64-2.7') + ':' + env.get('PYTHONPATH', '')
21-
)
13+
# Set linker to use the correct gcc
14+
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
2215
return env
2316

24-
2517
recipe = NetifacesRecipe()

0 commit comments

Comments
 (0)