some-restaurant-1855
07/09/2024, 4:40 PMfiles(
name = "lockfiles",
sources = [
"python_darwin.lock",
"python_linux.lock",
"python_linux_cuda.lock",
],
)
run_shell_command(
name = "gen_requirements",
# command takes four args - want to pass a lockfile like '$@'
command = "convert_pants_lockfile_to_pip.sh $@ '<path>' '<platform-tags>' '<prefix>' --requirements",
execution_dependencies = [
":shell-scripts",
parameterize(":lockfiles"),
"pants_tools:py311_linux_pex_platform_tags",
"pants_tools:py311_macos_14_pex_platform_tags",
],
workdir = "/",
)
Is there a pants equivalent to how bazel allows you to reference filegroups
in srcs
like $(locations //:lockfiles)
? should i manually generate the targets via python in the build file?broad-processor-92400
07/10/2024, 3:23 AMgen_requirements
target for each of the 3 lockfiles? (i.e. a target for each of convert_pants_lockfile_to_pip.sh python_darwin.lock ...
, convert_pants_lockfile_to_pip.sh python_linux.lock ...
, convert_pants_lockfile_to_pip.sh python_linux_cuda.lock ...
)some-restaurant-1855
07/10/2024, 4:22 PMbroad-processor-92400
07/10/2024, 10:02 PMparametrize
expertcurved-television-6568
07/11/2024, 8:01 AMparametrize
doesn't work well when you need to mix with other values on the same field, as in a list of dependencies, so I think using other constructs is the way to go here..some-restaurant-1855
07/11/2024, 4:20 PM