-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·32 lines (25 loc) · 1017 Bytes
/
install.sh
File metadata and controls
executable file
·32 lines (25 loc) · 1017 Bytes
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
#!/bin/bash
set -e
git submodule update --init --recursive
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "macOS detected: building PyBullet from source (workaround for macOS compatibility)..."
# Initialize the virtual environment first so we can use its Python
uv venv
VENV_PYTHON="$(pwd)/.venv/bin/python"
BULLET_TMP=$(mktemp -d)
trap 'rm -rf "$BULLET_TMP"' EXIT
git clone https://github.com/bulletphysics/bullet3 "$BULLET_TMP/bullet3"
# Comment out the line that causes build failure on recent macOS
sed -i '' \
's|^#define fdopen(fd, mode) NULL|// #define fdopen(fd, mode) NULL|' \
"$BULLET_TMP/bullet3/examples/ThirdPartyLibs/zlib/zutil.h"
uv pip install setuptools
pushd "$BULLET_TMP/bullet3"
"$VENV_PYTHON" setup.py build
"$VENV_PYTHON" setup.py install
popd
# Sync everything else; pybullet is already installed from source above
uv sync --all-extras --dev --no-install-package pybullet
else
uv sync --all-extras --dev
fi