gtamba / spice_rub

Ruby wrapper for the NASA-JPL CSPICE library via SciRuby
Other
9 stars 3 forks source link

About inclusion of binaries in gem #5

Closed v0dro closed 8 years ago

v0dro commented 8 years ago

According to this folder it looks like you're including ready made binaries of cspice in the gem. What if the architecture the user wants to use the gem on is not the same as yours?

The library should ideally be decoupled from the wrapper and we should let the user install cspice however he/she wants and then simply use the Ruby wrapper with a gem install. If you must keep the binaries, you should configure your extconf such that it falls back to a user installed version of cspice if it's available and raises appropriate errors if there's an incompatibility between the supplied binaries and the user's computer.

@mohawkjohn your thoughts?

zverok commented 8 years ago

My 5c (they are everywhere!) For "rare" libraries (which are doubtful to be already installed, or have prebuilt packages for the popular OSes) I've seen several times the target library sources included into gems ext folder, and gem installation builds both the target library and gem wrapper around it. That seems pretty convenient, like you want to play with Spice and Ruby, you just do gem install spice_rub. Though, in our case counter-argument may be that CSPICE has 48 MiB of sources, I'm not sure it is appropriate to place them all into a gem :(

gtamba commented 8 years ago

@v0dro , @zverok :

I don't plan on shipping these binaries, ideally there'll be a script that searches for a local installation or downloads the correct one. This is my local config and I'm not sure why it got pushed because I added *.a to my .gitignore. I'll reach home in an hour so I'll get it fixed then. On 30 May 2016 4:17 p.m., "Victor Shepelev" notifications@github.com wrote:

My 5c (they are everywhere!) For "rare" libraries (which are doubtful to be already installed, or have prebuilt packages for the popular OSes) I've seen several times the target library sources included into gems ext folder, and gem installation builds both the target library and gem wrapper around it. That seems pretty convenient, like you want to play with Spice and Ruby, you just do gem install spice_rub. Though, in our case counter-argument may be that CSPICE has 48 MiB of sources, I'm not sure it is appropriate to place them all into a gem :(

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gau27/spice_rub/issues/5#issuecomment-222466091, or mute the thread https://github.com/notifications/unsubscribe/AI-ibCjBlw-NlgDO_GT-XS_wmlgVCol3ks5qGsBFgaJpZM4IpqgG .

translunar commented 8 years ago

I realize inclusion of binaries was intentional, but I want to add that I think it might be best to use git submodule to include the SPICE sources instead of having a copy in-tree. It doesn't have to be done now, but it's something to research and think about.

translunar commented 8 years ago

See #7 (and close this one).