#!/bin/bash set -e cd `dirname $0` export PIP_DOWNLOAD_CACHE=`pwd`/../pip_cache cat ../openmedialibrary/requirements.txt \ | grep -v lxml \ | grep -v pyopenssl \ | grep -v pyCrypto \ | grep -v pillow \ | grep -v simplejson \ > requirements.txt echo setuptools >> requirements.txt echo six >> requirements.txt mkdir old test -e lib && mv lib old/ test -e bin && mv bin old/ rm -rf p35 p36 p37 /usr/bin/python3.7 -m venv p37 p37/bin/pip3 install -r requirements.txt mkdir -p lib/python3.7 mv p37/lib/python3.7/site-packages lib/python3.7/site-packages /usr/bin/python3.5 -m venv p35 p35/bin/pip3 install -r requirements.txt for f in site-packages/ed25519/_ed25519.cpython-35m-x86_64-linux-gnu.so \ site-packages/sqlalchemy/cprocessors.cpython-35m-x86_64-linux-gnu.so \ site-packages/sqlalchemy/cresultproxy.cpython-35m-x86_64-linux-gnu.so \ site-packages/sqlalchemy/cutils.cpython-35m-x86_64-linux-gnu.so \ site-packages/netifaces.cpython-35m-x86_64-linux-gnu.so do cp p35/lib/python3.5/$f lib/python3.7/$f done /usr/bin/python3.6 -m venv p36 p36/bin/pip3 install -r requirements.txt for f in site-packages/ed25519/_ed25519.cpython-36m-x86_64-linux-gnu.so \ site-packages/sqlalchemy/cprocessors.cpython-36m-x86_64-linux-gnu.so \ site-packages/sqlalchemy/cresultproxy.cpython-36m-x86_64-linux-gnu.so \ site-packages/sqlalchemy/cutils.cpython-36m-x86_64-linux-gnu.so \ site-packages/netifaces.cpython-36m-x86_64-linux-gnu.so do cp p36/lib/python3.6/$f lib/python3.7/$f done rm -r p35 p36 p37 old requirements.txt