File tree 1 file changed +15
-5
lines changed
pythonforandroid/recipes/netifaces
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 1
1
from pythonforandroid .recipe import CompiledComponentsPythonRecipe
2
2
3
+
3
4
class NetifacesRecipe (CompiledComponentsPythonRecipe ):
4
- name = 'netifaces'
5
+
5
6
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
+
9
12
site_packages_name = 'netifaces'
10
13
11
- def get_recipe_env (self , arch = None ):
14
+ call_hostpython_via_targetpython = False
15
+
16
+ def get_recipe_env (self , arch ):
12
17
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'
13
20
# Set linker to use the correct gcc
14
21
env ['LDSHARED' ] = env ['CC' ] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
22
+ env ['LDFLAGS' ] += ' -L' + env ['PYTHON_ROOT' ] + '/lib' + \
23
+ ' -lpython2.7'
15
24
return env
16
25
26
+
17
27
recipe = NetifacesRecipe ()
You can’t perform that action at this time.
0 commit comments