diff --git a/pythonforandroid/recipes/netifaces/__init__.py b/pythonforandroid/recipes/netifaces/__init__.py index 74273fc5f2..6c9361a80b 100644 --- a/pythonforandroid/recipes/netifaces/__init__.py +++ b/pythonforandroid/recipes/netifaces/__init__.py @@ -3,25 +3,17 @@ class NetifacesRecipe(CompiledComponentsPythonRecipe): - version = '0.10.4' + version = '0.10.7' - url = 'https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-{version}.tar.gz' + url = 'https://files.pythonhosted.org/packages/source/n/netifaces/netifaces-{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] + depends = ['setuptools'] + + patches = ['fix-build.patch'] site_packages_name = 'netifaces' call_hostpython_via_targetpython = False - def get_recipe_env(self, arch): - env = super(NetifacesRecipe, self).get_recipe_env(arch) - env['PYTHON_ROOT'] = self.ctx.get_python_install_dir() - env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7' - # Set linker to use the correct gcc - env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions' - env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \ - ' -lpython2.7' - return env - recipe = NetifacesRecipe() diff --git a/pythonforandroid/recipes/netifaces/fix-build.patch b/pythonforandroid/recipes/netifaces/fix-build.patch new file mode 100644 index 0000000000..3404c4fe62 --- /dev/null +++ b/pythonforandroid/recipes/netifaces/fix-build.patch @@ -0,0 +1,11 @@ +--- netifaces/setup.py.orig 2018-05-02 09:45:09.000000000 +0200 ++++ netifaces/setup.py 2018-12-11 14:12:02.785808692 +0100 +@@ -55,7 +55,7 @@ + self.check_requirements() + build_ext.build_extensions(self) + +- def test_build(self, contents, link=True, execute=False, libraries=None, ++ def test_build(self, contents, link=False, execute=False, libraries=None, + include_dirs=None, library_dirs=None): + name = os.path.join(self.build_temp, 'conftest-%s.c' % self.conftestidx) + self.conftestidx += 1