-
Notifications
You must be signed in to change notification settings - Fork 543
/
Copy pathbuild.sh
executable file
·32 lines (22 loc) · 1.09 KB
/
build.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
#!/usr/bin/env bash
set -ex
echo "Setting up environment for pymeshlab ${PYMESHLAB_VERSION}"
echo "Building pymeshlab ${PYMESHLAB_VERSION}"
git clone --branch=v${PYMESHLAB_VERSION} --depth=1 --recursive https://github.com/cnr-isti-vclab/PyMeshLab /opt/pymeshlab || \
git clone --depth=1 --recursive https://github.com/cnr-isti-vclab/PyMeshLab /opt/pymeshlab
cd /opt/pymeshlab
# Check if make_wheel.sh exists, and use it if available
if [ -f scripts/Linux/make_wheel.sh ]; then
echo "Using make_wheel.sh to create the Python wheel"
sh scripts/Linux/make_wheel.sh -w /opt/pymeshlab/wheels/
else
echo "make_wheel.sh not found, using pip3 wheel as fallback"
echo "Deploying for pymeshlab ${PYMESHLAB_VERSION}"
sh scripts/Linux/2_deploy.sh
pip3 wheel . -w /opt/pymeshlab/wheels
fi
pip3 install --no-cache-dir --verbose /opt/pymeshlab/wheels/pymeshlab*.whl
twine upload --verbose /opt/pymeshlab/wheels/pymeshlab*.whl || echo "failed to upload wheel to ${TWINE_REPOSITORY_URL}"
# run here to test if it works
python3 -c "import pymeshlab; ms = pymeshlab.MeshSet()"
echo "pymeshlab OK\n"