Skip to content

rewrite netifaces recipe #841

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 1 commit into from
Jul 20, 2016
Merged
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
20 changes: 15 additions & 5 deletions pythonforandroid/recipes/netifaces/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
from pythonforandroid.recipe import CompiledComponentsPythonRecipe


class NetifacesRecipe(CompiledComponentsPythonRecipe):
name = 'netifaces'

version = '0.10.4'
url = 'https://pypi.python.org/packages/source/n/netifaces/netifaces-{version}.tar.gz'
depends = ['python2', 'setuptools']
call_hostpython_via_targetpython = False

url = 'https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-{version}.tar.gz'

depends = [('python2', 'python3crystax'), 'setuptools']

site_packages_name = 'netifaces'

def get_recipe_env(self, arch=None):
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()