forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
output_path
field to python_binary
, python_awslambda
, and `…
…archive` (pantsbuild#10899) ### Problem When building an `archive`, we believe users will want to be able to control where certain files/packages show up. This is why we added `relocated_files` in pantsbuild#10880. However, `relocated_files` would not work with a package. If you tried using `relocated_files` with a package, then it would not build the actual package, as it's not `FilesSources`. Further, even if you're not using `archive`, users may want to control the output path when running `./pants package` or using `runtime_package_dependencies` in `python_tests`. For example, they may want to hardcode a certain value so that changing the target name or directory path would not change the final package name. In v1, we had `basename` for this. But `basename` is not adequate because this solely changes the final file name, but not the full path, like `src.python.pants/pants.pex`. ### Solution For package target types, allow users to override the default path. We warn that this can result in ambiguous paths if the user is not careful, whereas our default is always unambiguous. While this could be surprising, the user must go out of their way to opt-in, and we will warn both in `./pants target-types` and the online docs. [ci skip-build-wheels] [ci skip-rust]
- Loading branch information
1 parent
0e97c3c
commit 3b6fbd7
Showing
7 changed files
with
91 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters