File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,24 @@ cmake ${PROJECT_DIR} \
102102cmake --build . --config Release --target gtdynamics_py -j${NUM_CORES}
103103cmake --install .
104104
105+
105106# 6. Stage GTDynamics extension from Clean Prefix
106- echo " Copying built extension to source tree..."
107- find " ${GTD_PREFIX} " -name " gtdynamics*.so" -exec cp -v {} " ${PROJECT_DIR} /python/gtdynamics/" \;
107+ echo " Staging GTDynamics extension..."
108+ # Robustly find the extension anywhere in the install prefix
109+ GTD_SO_PATH=$( find " ${GTD_PREFIX} " -path " */gtdynamics/*.so" -o -name " gtdynamics*.so" -print -quit)
110+
111+ if [ -z " $GTD_SO_PATH " ]; then
112+ echo " ERROR: Could not find gtdynamics extension in ${GTD_PREFIX} "
113+ # Let's list the prefix so you can see where it went in the logs
114+ find " ${GTD_PREFIX} " -maxdepth 4
115+ exit 1
116+ fi
117+
118+ # Copy it and force the name to gtdynamics.so to match your __init__.py
119+ cp -v " $GTD_SO_PATH " " ${PROJECT_DIR} /python/gtdynamics/gtdynamics.so"
120+
121+ # DEBUG: List the destination to be 100% sure it's there
122+ ls -lh " ${PROJECT_DIR} /python/gtdynamics/gtdynamics.so"
108123
109124# Finalize GTDynamics library path
110125rm -f ${INSTALL_PREFIX} /gtd_current
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ path = "hatch_build.py"
6363
6464[tool .hatch .build .targets .wheel ]
6565packages = [" python/gtdynamics" , " python/gtsam" ]
66+ artifacts = [" *.so" ]
6667
6768[tool .uv .build-backend ]
6869module-name = " gtdynamics"
You can’t perform that action at this time.
0 commit comments