Skip to content

Commit 6caa51a

Browse files
opacamAndreMiras
authored andcommitted
[CORE UPDATE - PART VIII] Netifaces for both versions of python (updates the netifaces version) (#1549)
* Remove unneeded flags, update version and grants python3 compatibility for the netifaces recipe The flags that we remove are already set in base class, so no need to set in here. * Fix hardcoded url
1 parent f36d340 commit 6caa51a

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

pythonforandroid/recipes/netifaces/__init__.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,17 @@
33

44
class NetifacesRecipe(CompiledComponentsPythonRecipe):
55

6-
version = '0.10.4'
6+
version = '0.10.7'
77

8-
url = 'https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-{version}.tar.gz'
8+
url = 'https://files.pythonhosted.org/packages/source/n/netifaces/netifaces-{version}.tar.gz'
99

10-
depends = [('python2', 'python3crystax'), 'setuptools']
10+
depends = ['setuptools']
11+
12+
patches = ['fix-build.patch']
1113

1214
site_packages_name = 'netifaces'
1315

1416
call_hostpython_via_targetpython = False
1517

16-
def get_recipe_env(self, arch):
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'
20-
# Set linker to use the correct gcc
21-
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
22-
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
23-
' -lpython2.7'
24-
return env
25-
2618

2719
recipe = NetifacesRecipe()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- netifaces/setup.py.orig 2018-05-02 09:45:09.000000000 +0200
2+
+++ netifaces/setup.py 2018-12-11 14:12:02.785808692 +0100
3+
@@ -55,7 +55,7 @@
4+
self.check_requirements()
5+
build_ext.build_extensions(self)
6+
7+
- def test_build(self, contents, link=True, execute=False, libraries=None,
8+
+ def test_build(self, contents, link=False, execute=False, libraries=None,
9+
include_dirs=None, library_dirs=None):
10+
name = os.path.join(self.build_temp, 'conftest-%s.c' % self.conftestidx)
11+
self.conftestidx += 1

0 commit comments

Comments
 (0)