Skip to content

Commit e914357

Browse files
author
Ryan Northey
committed
Added pycrypto package
1 parent 6961df8 commit e914357

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

recipes/pycrypto/recipe.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
VERSION_pycrypto=2.5
4+
URL_pycrypto=http://pypi.python.org/packages/source/p/pycrypto/pycrypto-$VERSION_pycrypto.tar.gz
5+
DEPS_pycrypto=(openssl hostpython python)
6+
MD5_pycrypto=783e45d4a1a309e03ab378b00f97b291
7+
BUILD_pycrypto=$BUILD_PATH/pycrypto/$(get_directory $URL_pycrypto)
8+
RECIPE_pycrypto=$RECIPES_PATH/pycrypto
9+
10+
function prebuild_pycrypto() {
11+
true
12+
}
13+
14+
function build_pycrypto() {
15+
16+
if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/pycrypto" ]; then
17+
return
18+
fi
19+
20+
cd $BUILD_pycrypto
21+
22+
push_arm
23+
24+
export CC="$CC -I$BUILD_openssl/include"
25+
export LDFLAGS="$LDFLAGS -L$LIBS_PATH -L$BUILD_openssl"
26+
export EXTRA_CFLAGS="--host linux-armv"
27+
export LDSHARED="$LIBLINK"
28+
29+
try ./configure --host=arm-eabi --prefix="$BUILD_PATH/python-install" --enable-shared
30+
31+
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
32+
try find build/lib.* -name "*.o" -exec $STRIP {} \;
33+
34+
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
35+
36+
unset LDSHARED
37+
38+
pop_arm
39+
}
40+
41+
function postbuild_pycrypto() {
42+
true
43+
}

0 commit comments

Comments
 (0)