Skip to content

Commit 09c73e0

Browse files
committed
added Netifaces recipe
1 parent ae125f3 commit 09c73e0

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

recipes/netifaces/recipe.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
VERSION_netifaces=0.10.3
4+
DEPS_netifaces=(hostpython python setuptools)
5+
URL_netifaces=http://pypi.python.org/packages/source/n/netifaces/netifaces-$VERSION_netifaces.tar.gz
6+
MD5_netifaces=b96913473e1dcc3c4a7c43bc15d10e26
7+
BUILD_netifaces=$BUILD_PATH/netifaces/$(get_directory $URL_netifaces)
8+
RECIPE_netifaces=$RECIPES_PATH/netifaces
9+
10+
function prebuild_netifaces() {
11+
true
12+
}
13+
14+
function build_netifaces() {
15+
cd $BUILD_netifaces
16+
17+
#FIXME it actually builds an egg
18+
if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/netifaces" ]; then
19+
#return
20+
true
21+
fi
22+
push_arm
23+
24+
# build python extension
25+
export CFLAGS="$CFLAGS -I$BUILD_PATH/python-install/include/python2.7"
26+
export LDSHARED=$LIBLINK
27+
export PYTHONPATH=$BUILD_PATH/python-install/lib/python2.7/site-packages
28+
29+
# resulting .so is empty but .o will be collected into libpymodules.so in final distribute.sh step
30+
try $BUILD_hostpython/hostpython setup.py build_ext
31+
32+
unset LDSHARED
33+
34+
try $BUILD_hostpython/hostpython setup.py install -O2 --prefix $BUILD_PATH/python-install
35+
36+
pop_arm
37+
}
38+
39+
function postbuild_netifaces() {
40+
true
41+
}

0 commit comments

Comments
 (0)