bitter-orange-16997
12/01/2024, 2:22 PMexperimental_wrap_as_resources()
which sounds like it's the right thing to use for what I'm trying to do but somehow doesn't work:
experimental_wrap_as_resources(
name='resources',
inputs=[
"helm/my-product",
],
)
python_sources(
resolve="python-scripts",
sources=[
"./installer.py",
],
)
pex_binary(
name="installer",
sh_boot=True,
emit_warnings=False,
entry_point="installer.py",
resolve="python-scripts",
dependencies=[
":resources",
":scripts",
],
)
Thanks a lot!broad-processor-92400
12/01/2024, 10:49 PMhelm/my-product
a directory or file that exists "directly" in your repository (e.g. checked in to git)? And you're trying to include those extra files in the pex?bitter-orange-16997
12/01/2024, 11:33 PMhelm_chart(
sources=[
...
],
)
bitter-orange-16997
12/01/2024, 11:34 PMbitter-orange-16997
12/01/2024, 11:35 PMbroad-processor-92400
12/02/2024, 1:39 AMcareful-address-89803
12/02/2024, 2:30 AMwrap_as_resources
to package the chart into a .tar.gz and embed that into the PEX, but instead it's just slurping all the loose files. IIRC wrap_as_resources
pulls in source files. Lemme see if I can think of somethingcareful-address-89803
12/02/2024, 3:50 AMcareful-address-89803
12/02/2024, 4:19 AMpackage
dependencies and wrap them as resources https://gist.github.com/lilatomic/bc2d63dc5c6f1a517aa5f8dc42596ab1 . It's a gross combination of the wrap_as_resources
and the code from python_test
that handles runtime_package_dependencies
. It worked at least twice, so maybe it'll work for you. (note the file paths, Gist won't let me use folders)bitter-orange-16997
12/05/2024, 10:25 AM