square-psychiatrist-19087
09/19/2024, 9:41 PMrelocate_files
to change the resource path in pex_binary
:
# assets/BUILD
files(name='files', sources=['*.sql'])
# src/py/project/BUILD
python_sources()
relocated_files(
name='relocated',
files_targets=['assets:files'],
src='assets',
dest='src/py/project',
)
experimental_wrap_as_resources(name='resources', inputs=[':relocated'])
pex_binary(
name="binary",
dependencies=[':resources'],
entry_point="<http://project.app:main|project.app:main>",
)
but it looks like generated resource path doesn't get stripped, the path inside the pex binary is src/py/project/query.sql
but if I create the resource directly, it's project/query.sql
Here is a test that reproduces the problem https://github.com/pantsbuild/pants/pull/21438/files
what is the correct way to fix it? Thanks