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

pex_binary: Support PEXes with no entry points (interpreters) #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evanj
Copy link
Contributor

@evanj evanj commented Jan 8, 2018

When using pex without any entry points, it creates a PEX that is an
interpreter that uses the bundled environment. This can be useful to
distribute in order to execute other scripts.

interpreter_only_test.py: Verify that the PEX starts an interpreter.

Fixes the following Skylark exceptions in pex_binary:

File ".../bazel_rules_pex/examples/BUILD", line 24
  pex_binary(name = 'interpreter_only')
File ".../bazel_rules_pex/pex/pex_rules.bzl", line 177, in _pex_binary_impl
  pex_file_types.filter(ctx.files.srcs)[0]
index out of range (index is 0, but sequence has 0 elements)

File ".../bazel_rules_pex/examples/BUILD", line 24
  pex_binary(name = 'interpreter_only')
File ".../bazel_rules_pex/pex/pex_rules.bzl", line 225, in _pex_binary_impl
  main_pkg
name 'main_pkg' is not defined

When using pex without any entry points, it creates a PEX that is an
interpreter that uses the bundled environment. This can be useful to
distribute in order to execute other scripts.

interpreter_only_test.py: Verify that the PEX starts an interpreter.

Fixes the following Skylark exceptions in pex_binary:

File ".../bazel_rules_pex/examples/BUILD", line 24
  pex_binary(name = 'interpreter_only')
File ".../bazel_rules_pex/pex/pex_rules.bzl", line 177, in _pex_binary_impl
  pex_file_types.filter(ctx.files.srcs)[0]
index out of range (index is 0, but sequence has 0 elements)

File ".../bazel_rules_pex/examples/BUILD", line 24
  pex_binary(name = 'interpreter_only')
File ".../bazel_rules_pex/pex/pex_rules.bzl", line 225, in _pex_binary_impl
  main_pkg
name 'main_pkg' is not defined
@evanj
Copy link
Contributor Author

evanj commented Jan 8, 2018

This will unfortunately conflict with #61 . If you merge one of them, I'll happily fix the merge/rebase conflicts on the other for you. Thanks!

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.

1 participant