diff --git a/pythonforandroid/recipes/netifaces/__init__.py b/pythonforandroid/recipes/netifaces/__init__.py new file mode 100644 index 0000000000..3eed2fffab --- /dev/null +++ b/pythonforandroid/recipes/netifaces/__init__.py @@ -0,0 +1,25 @@ +from pythonforandroid.recipe import CompiledComponentsPythonRecipe +from os.path import join + + +class NetifacesRecipe(CompiledComponentsPythonRecipe): + name = 'netifaces' + version = '0.10.4' + url = 'https://pypi.python.org/packages/source/n/netifaces/netifaces-{version}.tar.gz' + site_packages_name = 'netifaces' + depends = ['python2', 'setuptools'] + + def get_recipe_env(self, arch=None): + env = super(NetifacesRecipe, self).get_recipe_env(arch) + + # TODO: fix hardcoded path + # This is required to prevent issue with _io.so import. + hostpython = self.get_recipe('hostpython2', self.ctx) + env['PYTHONPATH'] = ( + join(hostpython.get_build_dir(arch.arch), 'build', + 'lib.linux-x86_64-2.7') + ':' + env.get('PYTHONPATH', '') + ) + return env + + +recipe = NetifacesRecipe() diff --git a/pythonforandroid/recipes/zeroconf/__init__.py b/pythonforandroid/recipes/zeroconf/__init__.py new file mode 100644 index 0000000000..6ee14a19f5 --- /dev/null +++ b/pythonforandroid/recipes/zeroconf/__init__.py @@ -0,0 +1,24 @@ +from pythonforandroid.recipe import PythonRecipe +from os.path import join + + +class ZeroconfRecipe(PythonRecipe): + name = 'zeroconf' + version = '0.17.4' + url = 'https://pypi.python.org/packages/source/z/zeroconf/zeroconf-{version}.tar.gz' + depends = ['python2', 'netifaces', 'enum34', 'six'] + + def get_recipe_env(self, arch=None): + env = super(ZeroconfRecipe, self).get_recipe_env(arch) + + # TODO: fix hardcoded path + # This is required to prevent issue with _io.so import. + hostpython = self.get_recipe('hostpython2', self.ctx) + env['PYTHONPATH'] = ( + join(hostpython.get_build_dir(arch.arch), 'build', + 'lib.linux-x86_64-2.7') + ':' + env.get('PYTHONPATH', '') + ) + return env + + +recipe = ZeroconfRecipe()