jenkins.sh: use m2crypto from underlying platform

This commit is contained in:
Benjamin Dauvergne 2016-03-11 11:43:52 +01:00
parent 79bce957d2
commit 2ca78c1792
3 changed files with 32 additions and 4 deletions

25
getm2crypto.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# Get venv site-packages path
DSTDIR=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
NAME="M2Crypto"
# Get not venv site-packages path
# Remove first path (assuming that is the venv path)
NONPATH=`echo $PATH | sed 's/^[^:]*://'`
if ! /usr/bin/python -c 'import M2Crypto' >/dev/null 2>&1; then
echo M2Crypto package is not installed
exit 1
fi
SRCDIR=`/usr/bin/python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
# Clean up
rm -f $DSTDIR/$NAME
rm -f $DSTDIR/$NAME*.egg-info
# Link
ln -sv $SRCDIR/$NAME $DSTDIR
ln -sv $SRCDIR/$NAME*.egg-info $DSTDIR
exit 0

View File

@ -1,11 +1,14 @@
#!/bin/bash -e
./getm2crypto.sh
pip install --upgrade setuptools
pip install --upgrade pip
pip install --upgrade pyOpenSSL ndg-httpsclient requests pyasn1
sed -i 's/^MAX = 64/MAX = 200/' $VIRTUAL_ENV/lib/python*/site-packages/ndg/httpsclient/subj_alt_name.py
pip install --upgrade -v -r requirements.txt
pip install --upgrade -I pylint
pip install -v -r requirements.txt
pip install --upgrade -I pylint pylint-django
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc docbow_project/ | tee pylint.out) || /bin/true
export SECRET_KEY=test

View File

@ -15,6 +15,6 @@ raven
pytz
django-mellon
python-entrouvert
django-watson
django-autocomplete-light>1.999a
django-watson<1.2
django-autocomplete-light>1.999a,<3
django-statsd-mozilla