jolly-midnight-72759
08/05/2020, 5:42 PMpants-plugin
for building project's docs called makedocs
. When we run ./pants makedocs ${target}:docs
it builds the docs for that target. This plugin needs to know where the main config file is for the repo. Right now we do some path magic and figure out where the ROOT of the monorepo is located on the filesystem and then hardcode the path to the main conf.py
file and the output directory. This works in 1.18 but breaks in >1.25.
What is the 👖 way to solve this problem? Do I get more sophisticated in finding the path to the ROOT of the monorepo (this feels like something ./pants
should know)? Or do I go whole hog with the chroot and add the main conf.py
as a resource for every project's makedocs
target (did I mention the plugin defines a target type?). The latter solution seems like it will be wasteful in that when we build the whole site with every module, we will be copying the whole monorepo into the chroot. The former is what I am leaning towards, but then I have to work around the chroot. Any suggestions would be apprewciatedjolly-midnight-72759
08/05/2020, 7:26 PM./pants
script to set an ENV variable with the REPO's root.jolly-midnight-72759
08/05/2020, 8:59 PMhappy-kitchen-89482
08/06/2020, 5:11 AMfrom pants.base.build_environment import get_buildroot
)happy-kitchen-89482
08/06/2020, 5:11 AMjolly-midnight-72759
08/06/2020, 2:00 PMjolly-midnight-72759
08/06/2020, 2:00 PMhundreds-father-404
08/06/2020, 4:26 PMjolly-midnight-72759
08/06/2020, 6:53 PM