zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

Use temporary out-of-source build directory to enable repeated builds #227

Closed eskaur closed 1 year ago

eskaur commented 1 year ago

Currently, running pip install . in the repo root cannot be done multiple times. When running the second time, the developer is faced with a large error message. The solution is to delete the _skbuild directory that has popped up in the repo root, but the error message gives no hint that this may be the solution. This problem has confused both users and internal developers countless times.

This commit enabled easy repeated builds by overriding the build directory from the repo root to a random temporary directory. The way this is done is arguably a bit monkey-patchy, but to my knowledge there is no other way. This may be better in the modern in-progress re-implementation of scikit-build called scikit-build-core, which we could migrate to in the future.