Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

fahhem
Copy link
Contributor

@fahhem fahhem commented Nov 2, 2017

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

@benley benley self-assigned this Nov 2, 2017
@fahhem
Copy link
Contributor Author

fahhem commented Dec 11, 2017

ping

@benley
Copy link
Owner

benley commented Dec 11, 2017

Pong! Sorry for letting this languish, I will try to spend some time on it in the next few days.

@fahhem
Copy link
Contributor Author

fahhem commented Dec 20, 2017

ping again :)

Copy link
Owner

@benley benley left a 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.

@@ -109,6 +110,10 @@ def main():
raise RuntimeError("Failed to add %s: %s" % (egg, err))

# TODO(mikekap): Do something about manifest['nativeLibraries'].
Copy link
Owner

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -156,10 +156,15 @@ def _gen_manifest(py, runfiles):
),
)

# All .so files that end with .so, .so.#, .so.#.#, etc.
Copy link
Owner

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?

Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants