leonardt / pycoreir

Python bindings for coreir
BSD 3-Clause "New" or "Revised" License
10 stars 6 forks source link

Adding native wheel back again #120

Closed leonardt closed 4 years ago

leonardt commented 4 years ago

Repull of https://github.com/leonardt/pycoreir/pull/119

leonardt commented 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?

leonardt commented 4 years ago

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.

leonardt commented 4 years ago

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).

leonardt commented 4 years ago

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)

Kuree commented 4 years ago

I don't think FORCE_STATIC_BUILD is necessary since most people, myself included, don't need custom coreir distribution.

rdaly525 commented 4 years ago

I definitely need an easy way to install pycoreir to use a local coreir installation.

Kuree commented 4 years ago

@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.