diff --git a/Dockerfile b/Dockerfile index 0ec3c94..db35610 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ # This docker image is based on bhallalab/manylinux2010 which is # ./hub.docker.com/wheel/Makefile -FROM bhallalab/manylinux2010:latest +FROM quay.io/pypa/manylinux2010_x86_64 MAINTAINER Dilawar Singh +RUN yum install -y cmake3 ARG PYMOOSE_PYPI_PASSWORD ENV PYMOOSE_PYPI_PASSWORD=$PYMOOSE_PYPI_PASSWORD WORKDIR /root diff --git a/build_wheels_linux.sh b/build_wheels_linux.sh index 13f26e5..4ca41c7 100755 --- a/build_wheels_linux.sh +++ b/build_wheels_linux.sh @@ -22,7 +22,7 @@ TESTFILE=/tmp/test.py cat <$TESTFILE import moose import moose.utils as mu -print( moose.__version__ ) +print( moose.version() ) moose.reinit() moose.start( 1 ) EOF @@ -51,16 +51,17 @@ fi # Try to link statically. GSL_STATIC_LIBS="/usr/local/lib/libgsl.a;/usr/local/lib/libgslcblas.a" -CMAKE=/usr/bin/cmake3 +rm -rf /usr/bin/cmake || echo "Remove cmake2.8" +cp /usr/bin/cmake3 /usr/bin/cmake # Build wheels here. PY27=$(ls /opt/python/cp27-cp27m/bin/python?.?) -PY35=$(ls /opt/python/cp35-cp35m/bin/python?.?) PY36=$(ls /opt/python/cp36-cp36m/bin/python?.?) PY37=$(ls /opt/python/cp37-cp37m/bin/python?.?) PY38=$(ls /opt/python/cp38-cp38/bin/python?.?) +PY39=$(ls /opt/python/cp39-cp39/bin/python?.?) -for PYTHON in $PY38 $PY37 $PY36 $PY35 $PY27; do +for PYTHON in $PY38 $PY37 $PY36 $PY27; do echo "========= Building using $PYTHON ..." $PYTHON -m pip install pip setuptools --upgrade if [[ "$PYV" -eq "27" ]]; then diff --git a/build_wheels_osx.sh b/build_wheels_osx.sh index e5c46a3..7849744 100755 --- a/build_wheels_osx.sh +++ b/build_wheels_osx.sh @@ -10,7 +10,6 @@ export PATH=/usr/local/bin:$PATH brew update || echo "Failed to update brew" brew install gsl || brew upgrade gsl brew install python@3 || echo "Failed to install python3" -brew install python@2 || echo "Failed to install python2" # Following are to remove numpy; It is breaking the build on Xcode9.4. # brew uninstall gdal postgis || echo "Failed to uninstall gdal/postgis" @@ -34,33 +33,31 @@ rm -rf $WHEELHOUSE && mkdir -p $WHEELHOUSE DELOCATE_WHEEL=/usr/local/bin/delocate-wheel # Always prefer brew version. -for _py in 3 2; do - PYTHON=/usr/local/bin/python$_py +PYTHON=/usr/local/bin/python3 - if [ ! -f $PYTHON ]; then - echo "Not found $PYTHON" - continue - fi - - - $PYTHON -m pip install setuptools --upgrade --user - $PYTHON -m pip install wheel --upgrade --user - $PYTHON -m pip install numpy --upgrade --user - $PYTHON -m pip install twine --upgrade --user +if [ ! -f $PYTHON ]; then + echo "Not found $PYTHON" + continue +fi - PLATFORM=$($PYTHON -c "import distutils.util; print(distutils.util.get_platform())") - ( - cd $MOOSE_SOURCE_DIR - $PYTHON setup.py build_ext - export GSL_USE_STATIC_LIBRARIES=1 - $PYTHON setup.py bdist_wheel --skip-build - $DELOCATE_WHEEL -v dist/*.whl -w $WHEELHOUSE - rm -rf dist/*.whl - ) - if [ ! -z "$PYMOOSE_PYPI_PASSWORD" ]; then - echo "Did you test the wheels? I am uploading anyway ..." - $PYTHON -m twine upload -u bhallalab -p $PYMOOSE_PYPI_PASSWORD \ - $WHEELHOUSE/pymoose*.whl || echo "Failed to upload to PyPi" - fi -done +$PYTHON -m pip install setuptools --upgrade --user +$PYTHON -m pip install wheel --upgrade --user +$PYTHON -m pip install numpy --upgrade --user +$PYTHON -m pip install twine --upgrade --user + +PLATFORM=$($PYTHON -c "import distutils.util; print(distutils.util.get_platform())") +( + cd $MOOSE_SOURCE_DIR + $PYTHON setup.py build_ext + export GSL_USE_STATIC_LIBRARIES=1 + $PYTHON setup.py bdist_wheel --skip-build + $DELOCATE_WHEEL -v dist/*.whl -w $WHEELHOUSE + rm -rf dist/*.whl +) + +if [ ! -z "$PYMOOSE_PYPI_PASSWORD" ]; then + echo "Did you test the wheels? I am uploading anyway ..." + $PYTHON -m twine upload -u bhallalab -p $PYMOOSE_PYPI_PASSWORD \ + $WHEELHOUSE/pymoose*.whl || echo "Failed to upload to PyPi" +fi