Skip to content

Commit cf705e8

Browse files
authored
Merge pull request kivy#841 from brussee/netifaces-recipe
rewrite netifaces recipe
2 parents 990b49c + 96edc06 commit cf705e8

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
22

3+
34
class NetifacesRecipe(CompiledComponentsPythonRecipe):
4-
name = 'netifaces'
5+
56
version = '0.10.4'
6-
url = 'https://pypi.python.org/packages/source/n/netifaces/netifaces-{version}.tar.gz'
7-
depends = ['python2', 'setuptools']
8-
call_hostpython_via_targetpython = False
7+
8+
url = 'https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-{version}.tar.gz'
9+
10+
depends = [('python2', 'python3crystax'), 'setuptools']
11+
912
site_packages_name = 'netifaces'
1013

11-
def get_recipe_env(self, arch=None):
14+
call_hostpython_via_targetpython = False
15+
16+
def get_recipe_env(self, arch):
1217
env = super(NetifacesRecipe, self).get_recipe_env(arch)
18+
env['PYTHON_ROOT'] = self.ctx.get_python_install_dir()
19+
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7'
1320
# Set linker to use the correct gcc
1421
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
22+
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
23+
' -lpython2.7'
1524
return env
1625

26+
1727
recipe = NetifacesRecipe()

0 commit comments

Comments
 (0)