-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdebug-wheel.sh
More file actions
executable file
·48 lines (38 loc) · 1.19 KB
/
debug-wheel.sh
File metadata and controls
executable file
·48 lines (38 loc) · 1.19 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -ex
# Debug wheel contents locally
echo "Building and inspecting wheel..."
# Clean up
rm -rf src/pysimlin/dist src/pysimlin/build src/pysimlin/*.egg-info
# Build libsimlin
echo "Building libsimlin..."
cargo build --release -p simlin
mkdir -p src/libsimlin/target/release
cp target/release/libsimlin.a src/libsimlin/target/release/
# Build wheel
echo "Building wheel..."
cd src/pysimlin
python -m pip install --upgrade pip build wheel
python -m build --wheel
# Inspect wheel contents
echo "=== Wheel contents ==="
unzip -l dist/*.whl | grep -E "\.(so|dylib|pyd|dll|a)" || echo "No compiled extensions found!"
echo ""
# Try to install and test
echo "=== Testing wheel installation ==="
python -m venv test_wheel_env
source test_wheel_env/bin/activate
pip install dist/*.whl
echo ""
echo "=== Checking installed files ==="
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
ls -la "$SITE_PACKAGES"/simlin*
echo ""
echo "=== Trying to import ==="
python -c "from simlin._ffi import ffi, lib; print('_ffi imported successfully')" || {
echo "Failed to import _ffi"
python -c "import simlin; print(dir(simlin))"
}
deactivate
rm -rf test_wheel_env
echo "Debug complete!"