-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for native libraries #54
base: master
Are you sure you want to change the base?
Conversation
ping |
Pong! Sorry for letting this languish, I will try to spend some time on it in the next few days. |
ping again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple of minor comments.
pex/wrapper/pex_wrapper.py
Outdated
@@ -109,6 +110,10 @@ def main(): | |||
raise RuntimeError("Failed to add %s: %s" % (egg, err)) | |||
|
|||
# TODO(mikekap): Do something about manifest['nativeLibraries']. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the TODO comment please, since you have now Done Something about nativeLibraries :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pex/pex_rules.bzl
Outdated
@@ -156,10 +156,15 @@ def _gen_manifest(py, runfiles): | |||
), | |||
) | |||
|
|||
# All .so files that end with .so, .so.#, .so.#.#, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these ever be .dylib
(macos) or .dll
(windows), or do python libs always end up named .so regardless of platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, though since we don't have platform information (yet? see bazelbuild/bazel#2045), I had to add all possibilities. This means that if you, for instance, create a PEX on linux that's going to ship a pyd to a Windows machine, that we're going to extract the pyd early for no reason. Oops!
This generates a
native_libs.txt
file that includes all the.so
files that are in the pex file, so they get extracted together (eager extraction).