@@ -75,9 +75,37 @@ ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/op
7575# Configure git to avoid safe directory issues
7676RUN git config --global --add safe.directory "*"
7777
78+ # installed python doesn't have development parts. Rebuild it from scratch
79+ RUN /bin/rm -rf /opt/_internal /opt/python /usr/local/*/*
80+
81+ # EPEL for cmake
82+ FROM base as patchelf
83+ # Install patchelf
84+ ADD ./common/install_patchelf.sh install_patchelf.sh
85+ RUN bash ./install_patchelf.sh && rm install_patchelf.sh
86+ RUN cp $(which patchelf) /patchelf
87+
88+ FROM patchelf as python
89+ # build python
90+ COPY manywheel/build_scripts /build_scripts
91+ ADD ./common/install_cpython.sh /build_scripts/install_cpython.sh
92+ ENV SSL_CERT_FILE=
93+ RUN bash build_scripts/build.sh && rm -r build_scripts
94+
95+ FROM base as final
96+ COPY --from=python /opt/python /opt/python
97+ COPY --from=python /opt/_internal /opt/_internal
98+ COPY --from=python /opt/python/cp39-cp39/bin/auditwheel /usr/local/bin/auditwheel
99+ COPY --from=patchelf /usr/local/bin/patchelf /usr/local/bin/patchelf
100+
101+ RUN alternatives --set python /usr/bin/python3.12
102+ RUN alternatives --set python3 /usr/bin/python3.12
103+
104+ RUN pip-3.12 install typing_extensions
105+
78106# Install required Python packages
79- RUN pip install --upgrade pip
80- RUN pip install typing_extensions pyyaml setuptools
107+ # RUN pip install --upgrade pip
108+ # RUN pip install typing_extensions pyyaml setuptools
81109
82110# Install test dependencies
83111RUN dnf install -y \
0 commit comments