Skip to content

Commit ae125f3

Browse files
committed
Added M2Crypto recipe
1 parent 6f37a92 commit ae125f3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

recipes/m2crypto/recipe.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
VERSION_m2crypto=0.21.1
4+
DEPS_m2crypto=(openssl hostpython python)
5+
URL_m2crypto=http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-$VERSION_m2crypto.tar.gz
6+
MD5_m2crypto=f93d8462ff7646397a9f77a2fe602d17
7+
BUILD_m2crypto=$BUILD_PATH/m2crypto/$(get_directory $URL_m2crypto)
8+
RECIPE_m2crypto=$RECIPES_PATH/m2crypto
9+
10+
function prebuild_m2crypto() {
11+
true
12+
}
13+
14+
function build_m2crypto() {
15+
cd $BUILD_m2crypto
16+
17+
if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/m2crypto" ]; then
18+
#return
19+
true
20+
fi
21+
push_arm
22+
23+
# build python extension
24+
export CFLAGS="$CFLAGS -I$BUILD_PATH/python-install/include/python2.7"
25+
export LDSHARED=$LIBLINK
26+
export PYTHONPATH=$BUILD_PATH/python-install/lib/python2.7/site-packages
27+
28+
try $BUILD_hostpython/hostpython setup.py build_ext --openssl=$BUILD_openssl --library-dirs=$BUILD_openssl
29+
30+
unset LDSHARED
31+
32+
try $BUILD_hostpython/hostpython setup.py install -O2 --prefix $BUILD_PATH/python-install
33+
34+
pop_arm
35+
}
36+
37+
function postbuild_m2crypto() {
38+
true
39+
}

0 commit comments

Comments
 (0)