Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <dilawar.s.rajput@gmail.com>
RUN yum install -y cmake3
ARG PYMOOSE_PYPI_PASSWORD
ENV PYMOOSE_PYPI_PASSWORD=$PYMOOSE_PYPI_PASSWORD
WORKDIR /root
Expand Down
9 changes: 5 additions & 4 deletions build_wheels_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TESTFILE=/tmp/test.py
cat <<EOF >$TESTFILE
import moose
import moose.utils as mu
print( moose.__version__ )
print( moose.version() )
moose.reinit()
moose.start( 1 )
EOF
Expand Down Expand Up @@ -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
Expand Down
53 changes: 25 additions & 28 deletions build_wheels_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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