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

Port scie plugin to mainline #21100

Open
sureshjoshi opened this issue Jun 23, 2024 · 2 comments
Open

Port scie plugin to mainline #21100

sureshjoshi opened this issue Jun 23, 2024 · 2 comments

Comments

@sureshjoshi
Copy link
Member

I've got a plugin that I've been using for about a year to package pexes into scie files using science.

I didn't mainline it because John mentioned that eventually pex will gain this functionality natively, so it seemed silly to port this in.

Today I realized, it's sillier to NOT port this in and then just eventually deprecate it in favour of the native tooling later. These are incredibly useful to me for non-docker deployments, and just making tooling easier on my machine (e.g. https://github.com/sureshjoshi/pantsible).

https://github.com/sureshjoshi/pants-plugins/tree/main/pants-plugins/experimental/scie
https://github.com/a-scie/jump
https://github.com/a-scie/science

@sureshjoshi
Copy link
Member Author

Sounds like this might be coming sooner:
pex-tool/pex#2096 (comment)

@shanipribadi
Copy link

shanipribadi commented Sep 24, 2024

I am able to generate a scie pex by using the following configurations
note: the output in dist will not have the .pex extension

# BUILD
pex_binary(
    name="__main__",
    entry_point="__main__.py",
    extra_build_args=["--scie=eager"], # or lazy
    output_path="${spec_path_normalized}/${target_name_normalized}", # this template needs pants 2.23, on pants 2.22 have to write the file name without the .pex extension
    sh_boot=True,
    execution_mode="venv",
)

#pants.toml
[pex-cli]
version = "v2.20.1" # just to use the latest pex version, not sure the minimum needed
known_versions = [
  "v2.20.1|linux_x86_64|0dfc0295677698ad1c74c77e5f5b2ff19a0cba1ddd629b228aaf5d2bd290bc20|4313097",
]

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

No branches or pull requests

2 participants