-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpip-whl.sh
executable file
·33 lines (26 loc) · 1.14 KB
/
pip-whl.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
set -e -x
#src=${GITHUB_WORKSPACE:-/src/pyscf}
src=$1
#dst=${GITHUB_WORKSPACE:-/src/pyscf}/linux-wheels
dst=$src/linux-wheels
mkdir -p /root/wheelhouse $src/linux-wheels
#if [ "$#" -gt 0 ]; then
# export CMAKE_CONFIGURE_ARGS="-DWITH_F12=OFF -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF"
# curl -L $1 | tar -C $src/pyscf/lib -xzf -
#else
# export CMAKE_CONFIGURE_ARGS="-DWITH_F12=OFF"
#fi
# In certain versions of auditwheel, some .so files was excluded.
sed -i '/ if basename(fn) not in needed_libs:/s/basename.*libs/1/' /opt/_internal/pipx/venvs/auditwheel/lib/python3.9/site-packages/auditwheel/wheel_abi.py
# Compile wheels
#for PYVERSION in cp37-cp37m cp38-cp38 cp39-cp39 ; do
for PYVERSION in cp39-cp39 ; do
PYBIN=/opt/python/$PYVERSION/bin
"${PYBIN}/pip" install numpy
F2PY=${PYBIN}/f2py "${PYBIN}/pip" wheel -v --no-deps --no-clean -w /root/wheelhouse $src
# Bundle external shared libraries into the wheels
whl=`ls /root/wheelhouse/mokit-*-$PYVERSION-linux*_x86_64.whl`
auditwheel -v repair "$whl" --lib-sdir /lib -w $dst
auditwheel -v repair "$whl" --lib-sdir /../bin -w $dst
done