Can a `pex` be re-constituted from `include_depend...
# development
w
Can a
pex
be re-constituted from
include_dependencies
and
include_sources
? I briefly tried to pull them in as deps to a 3rd
pex_binary
but it, understandably, didn't understand that the
deps
were the requirements for the pex. Trying to cache-optimize some workflows in a non-breaking API way (e.g. if someone uses the fully formed
pex
as an executable, I don't want to break that for them)
Copy code
pex_binary(
    name="multipex-deps",
    # dependencies=[":reqs"],
    entry_point="main.py",  # <-- If you want to let Pants infer everything
    execution_mode="venv",
    include_requirements=True,
    include_sources=False,
    include_tools=True,
    layout="packed",
)

pex_binary(
    name="multipex-srcs",
    # dependencies=[":lib"],
    entry_point="main.py",  # <-- If you want to let Pants infer everything
    execution_mode="venv",
    include_requirements=False,
    include_sources=True,
    include_tools=True,
    layout="packed",
)
In short, looking for this:

https://pa1.narvii.com/6345/4bd980f26d321253df8c98bf6ad5f557b4a184b5_hq.gif

Umm.... Alright.... It seemed to "just work". But it didn't "just work" earlier today.
Copy code
pex_binary(
    name="multipex",
    dependencies=[":multipex-deps", ":multipex-srcs"],
    entry_point="main.py",
    execution_mode="venv",
    layout="packed",
)