facebookincubator / xar

executable archive format
Other
1.57k stars 55 forks source link

Example using shared libraries like Pillow, opencv et al #8

Closed autumnjolitz closed 2 years ago

autumnjolitz commented 6 years ago

The overview hints at using other XARs as dependencies for cases like providing libraries. One of the common deployment issues is use of C-extensions that depend on shared libraries within /usr/lib and /usr/local/lib.

Is there a method for automatically identifying the shared library dependencies or manually packaging them yourself into a XAR?

cooperlees commented 6 years ago

Thanks for asking.

There is no ability to import from different XARs. All deps have to live within the one .xar file.

What wording in the the post / readme etc. lead you to believe this? I'll try make it clearer.

rouge8 commented 6 years ago

It's in OVERVIEW.md: https://github.com/facebookincubator/xar/blob/master/OVERVIEW.md#dependencies

terrelln commented 6 years ago

The XAR builder library allows you to add extra files to the XAR, which you can use to add shared libraries to the XAR. bdist_xar doesn't support this yet, so you'd have to write your own build script. The Python bootstrapping script already sets the LD_LIBRARY_PATH to the mount directory.