brash-baker-91190
02/12/2021, 3:32 PMsetup.py
plugin (https://www.pantsbuild.org/v2.0/docs/plugins-setup-py), reading from files (like a README.md
file for the long_description
field) is shown, but it looks like it's from a hard-coded path (e.g., just use the main readme from the repo root). I'm looking to create a couple Python distributions for different libraries in our monorepo, where each library has it's own readme file that I'd like to include. Is there a mechanism by which I can introspect the python_distribution
to somehow figure out what the appropriate readme file for that distribution is? Specify a resources
target for that file and make it a dependency? Rely on filesystem / naming conventions? Create a new custom python_distribution
target with a dedicated key for specifying the path to the appropriate file? Something else? Thanks 🙇hundreds-father-404
02/12/2021, 3:47 PMbrash-baker-91190
02/12/2021, 3:51 PMhundreds-father-404
02/12/2021, 3:52 PMrequest.target.address.spec_path
to get the directory of the BUILD filebrash-baker-91190
02/12/2021, 3:53 PMhundreds-father-404
02/12/2021, 4:05 PMpolite-garden-50641
02/12/2021, 4:13 PMhundreds-father-404
02/12/2021, 4:21 PMlong_description_path
on the targethundreds-father-404
02/12/2021, 4:21 PMbrash-baker-91190
02/12/2021, 4:23 PMhundreds-father-404
02/12/2021, 4:27 PMhundreds-father-404
02/12/2021, 5:05 PMbrash-baker-91190
02/12/2021, 5:18 PMbrash-baker-91190
02/12/2021, 5:21 PMhundreds-father-404
02/12/2021, 5:23 PMbrash-baker-91190
02/12/2021, 5:23 PMhundreds-father-404
02/12/2021, 5:25 PMAnd I'm sure that if core logic like this was in Pants already, it would be a relatively simple matter to use an even smaller custom plugin to get at those conventional behaviors we're afterNot quite, the plugin would be identical to before if we add this generic mechanism. The generic mechanism is only relevant to obviate the need for a plugin in the first place But yeah, sounds useful either way
brash-baker-91190
02/12/2021, 5:43 PMCould not find a rule to satisfy Get(DigestContents, PathGlobs, ...
messages whenever I try to use a Get
to make a digest, read contents, etc., even using patterns from https://www.pantsbuild.org/docs/rules-api-file-system or from the Pants codebase directly. Not quite sure what's going on... any pointers?hundreds-father-404
02/12/2021, 6:01 PMbrash-baker-91190
02/12/2021, 6:01 PMGet
directly in a @rule
function, that works, but calling it in an accessory method that I call from a @rule
function fails unless I've already done that same Get
callpolite-garden-50641
02/12/2021, 7:06 PMbrash-baker-91190
02/12/2021, 7:12 PM