forked from philippkraft/cmf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Philipp Kraft
committed
Dec 17, 2021
1 parent
566bbbc
commit 5c7380d
Showing
8 changed files
with
243 additions
and
155 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,50 @@ | ||
#!/bin/bash | ||
|
||
# This file should be used in a manylinux container to build several binaries | ||
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/ | ||
fi | ||
} | ||
|
||
|
||
export CFLAGS="-fPIC" | ||
export CXXFLAGS="-fPIC" | ||
CMFDIR=/io/cmf | ||
TOOLDIR=$CMFDIR/tools | ||
|
||
# Install solvers | ||
SOLVERBUILDDIR=$CMFDIR/build/extern | ||
rm -rf $SOLVERBUILDDIR | ||
cmake -S ${TOOLDIR} -B ${SOLVERBUILDDIR} -DCMAKE_BUILD_TYPE=Release | ||
make -C ${SOLVERBUILDDIR} | ||
|
||
# build cmf_core | ||
CMFBUILDDIR=$CMFDIR/build/cmf_core | ||
rm -rf $CMFBUILDDIR | ||
CMFSOURCEDIR=$CMFDIR/cmf/cmf_core_src | ||
cmake -S $CMFSOURCEDIR -B $CMFBUILDDIR -DCMAKE_BUILD_TYPE=Release | ||
make -C $CMFBUILDDIR | ||
make install -C $CMFBUILDDIR | ||
|
||
# Compile wheels | ||
for PYBIN in /opt/python/*/bin; do | ||
"${PYBIN}/pip" install -r $CMFDIR/requirements.txt | ||
"${PYBIN}/python" bdist_wheel | ||
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 |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
export CLAGS="-fPIC" | ||
export CFLAGS="-fPIC" | ||
export CXXFLAGS="-fPIC" | ||
|
||
CWD=$PWD | ||
|