Closed leonardt closed 4 years ago
CC @Kuree I added https://github.com/leonardt/pycoreir/pull/120/commits/430dd9dee87c61e06ed509c84e2d8455ebf2ecd6 which changes the logic to search for all available "coreir" in the path with which -a
. If it finds a binary version, it will default to using that, otherwise it will install/use the built version. Does this seem reasonable?
Wasn't sure how to share code between a "script" file and a "setup.py" file so I just copied the is_binary helper function. Also I avoided the unicode decode error by using "rb" as the read flag.
This: https://github.com/leonardt/pycoreir/pull/120/commits/28651bc4d98afc186588acba7eae76dc8dff176a
ensures that even if we have a statically built version installed, we can override by installing coreir into the system path (so the system installed version will have priority).
We could add a FORCE_STATIC_BUILD option to override that default (but I think the logic is that if the user has coreir installed into their system already, that's the version they want)
I don't think FORCE_STATIC_BUILD is necessary since most people, myself included, don't need custom coreir distribution.
I definitely need an easy way to install pycoreir to use a local coreir installation.
@rdaly525 We're talking about force the setup.py to build the library even though they have their own coreir installed. We already covered your use case in #119.
Repull of https://github.com/leonardt/pycoreir/pull/119