Skip to content

Commit 233d9e1

Browse files
committed
2021.1 release code drop
1 parent 29477c3 commit 233d9e1

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

linux_build/build-wheels.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
export PATH=$PATH:/work/p4-bin/bin.linux26x86_64/
5+
6+
# Extract the p4api and set the P4API path var
7+
mkdir -p /work/p4-api
8+
tar xvfz /work/p4-bin/bin.linux26x86_64/p4api-glibc2.3-openssl1.1.1.tgz -C /work/p4-api
9+
P4API=`echo /work/p4-api/p4api-20*`
10+
11+
cd /work/p4-python
12+
mkdir repair
13+
14+
# Compile wheels
15+
for VERSION in $1; do
16+
PYBIN="/opt/python/$(ls /opt/python/ | grep $VERSION | grep -v 27mu)/bin"
17+
18+
## Make tgz
19+
"${PYBIN}/python" setup.py build_ext --apidir $P4API --ssl /openssl/lib sdist --formats=gztar --keep-temp
20+
21+
## Make object files for installer
22+
"${PYBIN}/python" setup.py build --apidir $P4API --ssl /openssl/lib
23+
"${PYBIN}/python" setup.py install_egg_info --install-dir build
24+
25+
## Test the build
26+
"${PYBIN}/python" p4test.py
27+
28+
## Build the installer
29+
"${PYBIN}/python" setup.py build_ext --apidir $P4API --ssl /openssl/lib bdist_wheel
30+
31+
## Repair wheel with new ABI tag manylinux2010_x86_64
32+
auditwheel repair dist/p4python-*-linux_x86_64.whl --plat manylinux2010_x86_64 -w repair
33+
34+
rm -rf build p4python.egg-info dist
35+
done

0 commit comments

Comments
 (0)