-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add binary wheels for Python 3.10 (#186)
And bump Boost version to fix removal of deprecated function: boostorg/python#344
- Loading branch information
1 parent
c3172d7
commit 9901a11
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM quay.io/pypa/manylinux2010_x86_64 | ||
|
||
|
||
# install rpms | ||
RUN yum install -y gcc-gfortran | ||
|
||
# download other source code | ||
WORKDIR /tmp | ||
RUN curl https://ufpr.dl.sourceforge.net/project/boost/boost/1.76.0/boost_1_76_0.tar.bz2 --output /tmp/boost.tar.bz2 | ||
|
||
RUN mkdir /build | ||
WORKDIR /build | ||
|
||
# how many threads to use for compiling | ||
ENV THREADS 4 | ||
|
||
ENV PYMAJOR 3 | ||
ENV PYMINOR 10 | ||
ENV TARGET cp${PYMAJOR}${PYMINOR}-cp${PYMAJOR}${PYMINOR} | ||
|
||
# install python dependencies, make boost install also boost_numpy | ||
RUN /opt/python/${TARGET}/bin/pip install oldest-supported-numpy | ||
|
||
# setup boost | ||
WORKDIR /build | ||
RUN tar jxf /tmp/boost.tar.bz2 | ||
WORKDIR /build/boost_1_76_0 | ||
RUN ./bootstrap.sh --prefix=/opt/boost \ | ||
--with-libraries=python \ | ||
--with-python=/opt/python/${TARGET}/bin/python \ | ||
--with-python-version=${PYMAJOR}.${PYMINOR} \ | ||
--with-python-root=/opt/python/${TARGET} | ||
RUN ./b2 -j${THREADS} \ | ||
cxxflags="-fPIC -I/opt/python/${TARGET}/include/python${PYMAJOR}.${PYMINOR}${PYUNICODE}/" \ | ||
link=static,shared install | ||
|
||
ADD . /PyBDSF | ||
WORKDIR /PyBDSF | ||
ENV CFLAGS "-I/opt/boost/include -L/opt/boost/lib" | ||
ENV LD_LIBRARY_PATH "/opt/boost/lib:/usr/local/lib" | ||
RUN /opt/python/${TARGET}/bin/python ./setup.py build_ext -j${THREADS} | ||
RUN /opt/python/${TARGET}/bin/python ./setup.py bdist_wheel -d . | ||
RUN auditwheel repair --plat manylinux2010_x86_64 -w /output *.whl |