extend/ENV/super: use brew libs for some Python packages

This avoids using bundled libraries for:

* `hidapi`[^1]
* `pynacl`[^2]
* `pyzmq`[^3]

The build should now fail if dependency is missing.

Essentially reverses default so now that using bundled copy is now
opt-in via `ENV` modification, e.g. `ENV.delete "SODIUM_INSTALL"`

[^1]: https://github.com/trezor/cython-hidapi/blob/0.14.0.post2/setup.py#L229
[^2]: https://github.com/pyca/pynacl/blob/1.5.0/setup.py#L71-L73
[^3]: https://github.com/zeromq/pyzmq/blob/v26.2.0/CMakeLists.txt#L41-L43
This commit is contained in:
Michael Cho 2024-10-12 18:02:25 -04:00
parent 3291ad4fc7
commit 89fe201ad9
No known key found for this signature in database
GPG Key ID: 55E85E28A7CD1E85

View File

@ -93,6 +93,11 @@ module Superenv
# Prevent Go from automatically downloading a newer toolchain than the one that we have.
# https://tip.golang.org/doc/toolchain
self["GOTOOLCHAIN"] = "local"
# Prevent Python packages from using bundled libraries by default.
# Currently for hidapi, pyzmq and pynacl
self["HIDAPI_SYSTEM_HIDAPI"] = "1"
self["PYZMQ_NO_BUNDLE"] = "1"
self["SODIUM_INSTALL"] = "system"
set_debug_symbols if debug_symbols