8000 [CORE UPDATE - PART VIII] Netifaces for both versions of python (updates the netifaces version) by opacam · Pull Request #1549 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content
8000

[CORE UPDATE - PART VIII] Netifaces for both versions of python (updates the netifaces version) #1549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions pythonforandroid/recipes/netifaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
11 changes: 11 additions & 0 deletions pythonforandroid/recipes/netifaces/fix-build.patch
Original file line number Diff line number Diff line change
@@ -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
0