|
71 | 71 | echo "Using cached ZLib" |
72 | 72 | fi |
73 | 73 |
|
74 | | -############################################################################### |
75 | | -if [ ! -f Python-${PYTHON_VERSION_LONG}/.done ]; then |
76 | | - echo "Building Python $PYTHON_VERSION_LONG" |
77 | | - curl -O -L https://www.python.org/ftp/python/${PYTHON_VERSION_LONG}/Python-${PYTHON_VERSION_LONG}.tgz |
78 | | - tar xfz Python-${PYTHON_VERSION_LONG}.tgz |
79 | | - |
80 | | - pushd Python-${PYTHON_VERSION_LONG} |
81 | | - if [ $PYTHON_VERSION = '3.7' ]; then |
82 | | - patch -p1 < ${ROOT_DIR}/pkg/mac/python-3.7.patch |
83 | | - fi |
84 | | - |
85 | | - CFLAGS="-fPIC -O3 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -I${PREFIX}/include ${PY_CFLAGS}" \ |
86 | | - LDFLAGS=" ${PY_CFLAGS} -L${PREFIX}/lib" \ |
87 | | - ./configure --prefix=$PREFIX --enable-shared --enable-universalsdk --with-universal-archs=universal2 |
88 | | - make -j16 |
89 | | - make install |
90 | | - |
91 | | - curl -O -L https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl |
92 | | - $PREFIX/bin/pip3 install wheel-*.whl |
93 | | - |
94 | | - touch .done |
95 | | - popd |
96 | | -else |
97 | | - echo "Using cached Python $PYTHON_VERSION_LONG" |
98 | | -fi |
99 | | - |
100 | 74 | ############################################################################### |
101 | 75 | OPENSSL_VERSION_UNDERSCORE=$(echo $OPENSSL_VERSION | sed 's/\./_/g') |
102 | 76 | if [ ! -f openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.done ]; then |
@@ -135,6 +109,35 @@ else |
135 | 109 | echo "Using cached OpenSSL" |
136 | 110 | fi |
137 | 111 |
|
| 112 | +############################################################################### |
| 113 | +if [ ! -f Python-${PYTHON_VERSION_LONG}/.done ]; then |
| 114 | + echo "Building Python $PYTHON_VERSION_LONG" |
| 115 | + curl -O -L https://www.python.org/ftp/python/${PYTHON_VERSION_LONG}/Python-${PYTHON_VERSION_LONG}.tgz |
| 116 | + tar xfz Python-${PYTHON_VERSION_LONG}.tgz |
| 117 | + |
| 118 | + pushd Python-${PYTHON_VERSION_LONG} |
| 119 | + if [ $PYTHON_VERSION = '3.7' ]; then |
| 120 | + patch -p1 < ${ROOT_DIR}/pkg/mac/python-3.7.patch |
| 121 | + fi |
| 122 | + |
| 123 | + CFLAGS="-fPIC -O3 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -I${PREFIX}/include ${PY_CFLAGS}" \ |
| 124 | + LDFLAGS=" ${PY_CFLAGS} -L${PREFIX}/lib" \ |
| 125 | + ./configure --prefix=$PREFIX --enable-shared --enable-universalsdk \ |
| 126 | + --with-universal-archs=universal2 \ |
| 127 | + --with-openssl=$PREFIX |
| 128 | + make -j16 |
| 129 | + make install |
| 130 | + |
| 131 | + curl -O -L https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl |
| 132 | + $PREFIX/bin/pip3 install wheel setuptools |
| 133 | + $PREFIX/bin/pip3 install wheel-*.whl |
| 134 | + |
| 135 | + touch .done |
| 136 | + popd |
| 137 | +else |
| 138 | + echo "Using cached Python $PYTHON_VERSION_LONG" |
| 139 | +fi |
| 140 | + |
138 | 141 | ############################################################################### |
139 | 142 | BOOST_VERSION_=${BOOST_VERSION//./_} |
140 | 143 | if [ ! -f boost/.done ]; then |
|
0 commit comments