Skip to content

Commit 395c42b

Browse files
committed
Add git clone pybind11 to wheel build script and additonal script to build pure python wheel
1 parent db42f29 commit 395c42b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

build-pure-wheel.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# This is script is to run inside a manylinux
4+
# docker image, i.e.
5+
# docker run -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/build-wheel.sh
6+
#
7+
# Builds a pure python PyBaMM wheel, that is without the idaklu module extension.
8+
# In the following, clining the pybind11 is omitted, resulting in the extension module
9+
# compilation to be skipped.
10+
# This pure python wheel is mostly intended to Windows support.
11+
12+
set -e -x
13+
cd /io
14+
15+
# Build wheel!
16+
# Using python 3.7 but the resulting wheel is not
17+
# python version dependent
18+
for PYBIN in /opt/python/cp37-cp37m/bin; do
19+
"${PYBIN}/python" setup.py bdist_wheel -d /io/wheelhouse
20+
done
21+
22+
echo "** --- All good ! --- **"
23+
ls /io/wheelhouse

build-wheel.sh

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ ln -s /opt/python/cp37-cp37m/bin/cmake /usr/bin/cmake
1919
# https://pypi.org/project/wget/
2020
/opt/python/cp37-cp37m/bin/pip install wget
2121

22+
# Clone the pybind11 git repo next to the setup.py
23+
# Required to build the idaklu extension module.
24+
if [ ! -d "pybind11" ]
25+
then
26+
git clone https://github.com/pybind/pybind11.git
27+
fi
28+
29+
2230
# Download and build SuiteSparse/Sundials
2331
# in KLU_module_deps/
2432
/opt/python/cp37-cp37m/bin/python scripts/setup_KLU_module_build.py

0 commit comments

Comments
 (0)