Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cmf2' into cmf2
Browse files Browse the repository at this point in the history
# Conflicts:
#	tools/docker-build.sh
  • Loading branch information
philippkraft committed Jan 11, 2023
2 parents 522df14 + 54293c4 commit 5094f5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def build(self):
build_script='install_solvers'),
StaticLibrary('cmf/cmf_core_src', 'lib/lib',
'cmf_core',
build_script='install_cmf_core', build_always=True),
build_script='install_cmf_core', build_always=False),
]


Expand Down
19 changes: 9 additions & 10 deletions tools/docker-build.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
#!/bin/bash

# This file should be used in a manylinux container to build several binaries
# Explain usage if no /io directory exists (which mounts on proper docker usage the current directory)
[[ -d "/io" ]] || echo "Run in manylinux container:\ndocker run -ti -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 /bin/bash /io/cmf2/tools/docker-build.sh"

set -e -u -x

function repair_wheel {
wheel="$1"
if ! auditwheel show "$wheel"; then
echo "Skipping non-platform wheel $wheel"
else
auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/
auditwheel repair "$wheel" -w /io/wheelhouse/
fi
}


export CFLAGS="-fPIC"
export CXXFLAGS="-fPIC"
CMFDIR=/io/cmf
export MAKEFLAGS="-j$(nproc)"

CMFDIR=/io/cmf2
cd $CMFDIR
TOOLDIR=$CMFDIR/tools

# Install solvers
Expand All @@ -40,12 +33,18 @@ make -C $CMFBUILDDIR
make install -C $CMFBUILDDIR

# Compile wheels
for PYBIN in /opt/python/cp*/bin; do
for PYBIN in /opt/python/cp31*/bin; do
"${PYBIN}/pip" install -r $CMFDIR/requirements.txt
"${PYBIN}/python" setup.py bdist_wheel
"${PYBIN}/pip" wheel $CMFDIR/ --no-deps -w dist/
done

# Bundle external shared libraries into the wheels
for whl in dist/*.whl; do
repair_wheel "$whl"
done

# Install packages and test
# for PYBIN in /opt/python/*/bin/; do
# "${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/wheelhouse
# (cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo)
#done

0 comments on commit 5094f5a

Please sign in to comment.