mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-01-22 14:15:44 +01:00
Centralize python packages installation adding "install-python-packages" script
This commit is contained in:
parent
6cdf33f46f
commit
2b93dd5412
@ -13,6 +13,7 @@ COPY \
|
|||||||
imagefiles/build-and-install-openssh.sh \
|
imagefiles/build-and-install-openssh.sh \
|
||||||
imagefiles/install-cmake-binary.sh \
|
imagefiles/install-cmake-binary.sh \
|
||||||
imagefiles/install-liquidprompt-binary.sh \
|
imagefiles/install-liquidprompt-binary.sh \
|
||||||
|
imagefiles/install-python-packages.sh \
|
||||||
imagefiles/utils.sh \
|
imagefiles/utils.sh \
|
||||||
/buildscripts/
|
/buildscripts/
|
||||||
|
|
||||||
@ -32,18 +33,10 @@ RUN \
|
|||||||
fi; \
|
fi; \
|
||||||
/buildscripts/install-liquidprompt-binary.sh && \
|
/buildscripts/install-liquidprompt-binary.sh && \
|
||||||
PYTHON=$([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \
|
PYTHON=$([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \
|
||||||
|
/buildscripts/install-python-packages.sh -python ${PYTHON} && \
|
||||||
/buildscripts/build-and-install-ninja.sh -python ${PYTHON} && \
|
/buildscripts/build-and-install-ninja.sh -python ${PYTHON} && \
|
||||||
rm -rf /buildscripts \
|
rm -rf /buildscripts
|
||||||
&& \
|
|
||||||
${PYTHON} -m pip install --ignore-installed conan
|
|
||||||
|
|
||||||
RUN if [ -e /opt/python/cp35-cp35m/bin/python ]; then \
|
|
||||||
: nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \
|
|
||||||
else \
|
|
||||||
curl -# -LO https://bootstrap.pypa.io/get-pip.py && \
|
|
||||||
python get-pip.py --ignore-installed && \
|
|
||||||
rm get-pip.py || exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
RUN echo "root:root" | chpasswd
|
RUN echo "root:root" | chpasswd
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
|
27
imagefiles/install-python-packages.sh
Executable file
27
imagefiles/install-python-packages.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
PYTHON=python
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
-python)
|
||||||
|
PYTHON=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: Usage: ${0##*/} [-python /path/to/bin/python]"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
|
||||||
|
curl -# -LO https://bootstrap.pypa.io/get-pip.py
|
||||||
|
${PYTHON} get-pip.py --ignore-installed
|
||||||
|
rm get-pip.py
|
||||||
|
|
||||||
|
${PYTHON} -m pip install --ignore-installed conan
|
Loading…
x
Reference in New Issue
Block a user