How to handle Python package dependencies of Python bindings #5001
Replies: 2 comments 1 reply
-
|
Why not depend on the numpy formula? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Decided to go with this. There is now a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a formula that primarily installs a C++ project from source. This C++ project has Python bindings, which I am also optionally installing with the formula. These bindings rely on other Python packages that must also be installed. Currently, I am following this guide, which seems to indicate I should be putting specific resource stanzas in the formula and install them as follows.
Although this works, it seems like a very ugly way of doing things, with hard-coded package versions and dependencies for those packages (including other Python and non-python dependencies). The compile time of all the package dependencies makes a
brew installthat previously took a little more than a minute now take nearly an hour.This seems analogous to having a C++ project which depends on a giant library, and instead of simply installing the pre-compiled bottle, compiling the whole library from scratch and reserving its use for only one formula. However, the guide linked above seems to discourage using a non-venv
pipfor this purpose when dealing with Python packages (presumably since brew can't track what it does and generate an installation receipt).With that said, is what I have above the actual recommended way of doing this? Is what I'm trying to do in the first place dumb?
Beta Was this translation helpful? Give feedback.
All reactions