brash-student-40401
10/06/2022, 8:06 PMdata_files
option from a setup.py
? For background, I am moving internal packages to a Monorepo. We have packageA
, which had the data_files
. I moved that code fine, and can run it with toy examples no problem. But then I move over packageB
, which calls code that relies on those files. But Pants has no knowledge of them at all, so of course they don't end up where they're supposed to. The documentation states that you cannot use data_files, install_requires, namespace_packages, package_dir, package_data, or packages because Pants will generate these for you, based on the data derived from your code and dependencies.
, but when it's not generated for me how am I supposed to get the files where they need to be?fast-nail-55400
10/06/2022, 8:12 PMresources
target in the BUILD
file. Then add a dependency from the relevant Python targets (e.g., python_sources
) to that resources
target using the dependencies
attribute. See https://www.pantsbuild.org/docs/assets for more information.brash-student-40401
10/06/2022, 8:28 PM