Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Oct 12, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This avoids using bundled libraries for:

  • hidapi1
  • pynacl2
  • pyzmq3

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"

Footnotes

  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

@cho-m cho-m marked this pull request as draft October 12, 2024 22:10
@cho-m
Copy link
Member Author

cho-m commented Oct 12, 2024

An alternative could be an audit check. We do check missing dependency for pyyaml and lxml.

In this case, it would require checking for ENV["..."] as this is opt-in behavior with default of bundled lib so just adding dependency is not enough.

@cho-m cho-m marked this pull request as ready for review October 12, 2024 22:13
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
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cho-m!

@MikeMcQuaid
Copy link
Member

An alternative could be an audit check. We do check missing dependency for pyyaml and lxml.

This feels like it'd be ideal but: merging this as-is to unblock first.

@MikeMcQuaid MikeMcQuaid merged commit 9fa2751 into master Oct 13, 2024
27 checks passed
@MikeMcQuaid MikeMcQuaid deleted the super-python-envvars branch October 13, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants