Ever wanted to tell pants that no, really, that te...
# development
a
Ever wanted to tell pants that no, really, that text file I just generated is actually a Python source, or just read some mildly upsetting abuse of function-local classes? https://github.com/pantsbuild/pants/pull/17877/files
Copy code
experimental_shell_command(
    name="manufacture_python_code",
    command='echo print\\(\\"Hello, World!\\"\\) > hello_world.py',
    output_files=["hello_world.py"],
)

experimental_shell_command(
    name="manufacture_resource",
    command="echo hi > resource.txt",
    output_files=["resource.txt"],
)


experimental_wrap_as_python_sources(
    name="python_dependency",
    inputs=[":manufacture_python_code"],
)

experimental_wrap_as_resources(
    name="resource_dependency",
    inputs=[":manufacture_resource"],
)

pex_binary(
    name="app",
    dependencies=[":python_dependency", ":resource_dependency"],
    entry_point="testprojects.magic.hello_world",
)
๐Ÿ’ฏ 1
๐Ÿš€ 3
๐Ÿคจ 1
๐Ÿ‘€ 1
โค๏ธ 2