Skip to content

Commit 919f52e

Browse files
committedMar 8, 2016
Move python install dirs to /opt/python and drop the symlinks that do
not include SOABI flags. `for py in /opt/*/bin/python` will now allow looping over all supported builds.

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed
 

‎docker/build_scripts/build.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ tar -xzf patchelf-0.8.tar.gz
5353
(cd patchelf-0.8 && ./configure && make && make install)
5454
rm -rf patchelf-0.8.tar.gz patchelf-0.8
5555

56-
/opt/3.5/bin/pip install git+git://github.com/manylinux/auditwheel.git && \
57-
ln -s /opt/3.5/bin/auditwheel /usr/local/bin/auditwheel
56+
/opt/3.5m/bin/pip install git+git://github.com/manylinux/auditwheel.git && \
57+
ln -s /opt/3.5m/bin/auditwheel /usr/local/bin/auditwheel
5858

5959
# Clean up development headers and other unnecessary stuff for
6060
# final image
@@ -65,7 +65,6 @@ yum -y install ${MANYLINUX1_DEPS}
6565
yum -y clean all > /dev/null 2>&1
6666
yum list installed
6767

68-
# Checks the same interpreters repeatedly, but is more thorough
6968
for PYTHON in /opt/*/bin/python; do
7069
$PYTHON $MY_DIR/manylinux1-check.py
7170
done

‎docker/build_scripts/build_utils.sh

+6-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function do_python_build {
2828
check_var $py_ver
2929
local soabi_flags=$2
3030
check_var $soabi_flags
31-
mkdir -p /opt/${py_ver}${soabi_flags}/lib
31+
mkdir -p /opt/python/${py_ver}${soabi_flags}/lib
3232
if [ $(lex_pyver $py_ver) -lt $(lex_pyver 3.3) ]; then
3333
if [ $soabi_flags = "mu" ]; then
3434
local unicode_flags="--enable-unicode=ucs4"
@@ -37,7 +37,7 @@ function do_python_build {
3737
fi
3838
fi
3939
# -Wformat added for https://bugs.python.org/issue17547 on Python 2.6
40-
CFLAGS="-Wformat" ./configure --prefix=/opt/${py_ver}${soabi_flags} --disable-shared $unicode_flags > /dev/null
40+
CFLAGS="-Wformat" ./configure --prefix=/opt/python/${py_ver}${soabi_flags} --disable-shared $unicode_flags > /dev/null
4141
make -j2 > /dev/null
4242
make install > /dev/null
4343
}
@@ -56,12 +56,11 @@ function build_python {
5656
tar -xzf Python-$py_ver.tgz
5757
(cd Python-$py_ver && do_python_build $py_ver $soabi_flags)
5858
if [ $(lex_pyver $py_ver) -ge $(lex_pyver 3) ]; then \
59-
ln -s /opt/${py_ver}${soabi_flags}/bin/python3 /opt/${py_ver}${soabi_flags}/bin/python;
59+
ln -s /opt/python/${py_ver}${soabi_flags}/bin/python3 /opt/python/${py_ver}${soabi_flags}/bin/python;
6060
fi;
61-
ln -s /opt/${py_ver}${soabi_flags}/ /opt/${py_ver2}${soabi_flags}
62-
[ ! -h /opt/${py_ver2} ] && ln -s /opt/${py_ver}${soabi_flags}/ /opt/$py_ver2
63-
/opt/${py_ver}${soabi_flags}/bin/python get-pip.py
64-
/opt/${py_ver}${soabi_flags}/bin/pip install wheel
61+
ln -s /opt/python/${py_ver}${soabi_flags}/ /opt/${py_ver2}${soabi_flags}
62+
/opt/python/${py_ver}${soabi_flags}/bin/python get-pip.py
63+
/opt/python/${py_ver}${soabi_flags}/bin/pip install wheel
6564
rm -rf Python-$py_ver
6665
done
6766
rm -f Python-$py_ver.tgz

0 commit comments

Comments
 (0)
Please sign in to comment.