curved-microphone-39455
01/11/2023, 4:12 PMresources
I would like to include all *.html
in multiple projects. I am just not sure of the syntax to specify any folder under the project root
Giving this structure
• Project A
◦ Folder A
▪︎ file.html
◦ Folder B
▪︎ Folder B.1
• file.html
◦ BUILD
Can I include only this in the BUILD at the root of every projects ?
python_sources(
dependencies=[":static-files"],
)
resources(
name="static-files",
sources=["**/*.html"]
)
Thanks in advance 🙂refined-addition-53644
01/11/2023, 4:28 PMcurved-microphone-39455
01/11/2023, 4:29 PM**/*.ext
to find any sub-folderscurved-microphone-39455
01/11/2023, 4:30 PM<http://MANIFEST.in|MANIFEST.in>
beforewitty-crayon-22786
01/11/2023, 5:24 PMcurved-microphone-39455
01/12/2023, 7:20 PM61 - 2023-01-12 14:14:14 - App - ERROR - 12345 - Error While deploying def-d-public-12345 tpxxxbbjsxpkatmtnbsq <http://test.com:80> : [Errno 2] No such file or directory: '/tmp/pants-sandbox-AnckFc/src/libraries/infra/i
nterfaces/data/workload_create.json'
but at /src/libraries/infra/BUILD
I have
python_sources(
dependencies=[":static-files"],
)
resources(
name="static-files",
sources=["**/*.json"]
)
witty-crayon-22786
01/12/2023, 7:26 PMresources
are included as relative to the source root / PYTHONPATHwitty-crayon-22786
01/12/2023, 7:27 PMresources
will be loaded with source root (./pants roots
) prefixes removedwitty-crayon-22786
01/12/2023, 7:28 PMfiles
are loaded as relative to the buildrootwitty-crayon-22786
01/12/2023, 7:28 PM