https://pantsbuild.org/ logo
#general
Title
# general
m

modern-leather-27612

11/03/2021, 8:40 PM
Hello again, I've been busy with other projects but still wanted to follow up on Enigma's proof-of-concept with Pants so far. Personally, I am sold and already used Pants for a tools repository. It is rather nice to tell people: Just clone and run
./pants run source/tool
(well, and get that GitLab token). As y'all suggested, I got documentation building with Sphinx working by creating a PEX target that includes Sphinx, its plugins, and the repository's source code as dependencies. The one snafu and remaining issue is that Sphinx won't find the source code. I had to explicitly:
Copy code
sys.path.insert(0, os.path.abspath('../libraries'))
sys.path.insert(0, os.path.abspath('../tasks'))
in Sphinx'
conf.py
. I'm not sure why. But it won't work without.
h

happy-kitchen-89482

11/03/2021, 9:09 PM
Re this - I was wondering about creating a PEX that includes Sphinx and its plugins, but not the repository source code, and then running that PEX with the source dir as an argument? Akin to running a pip-installed sphinx-build in a virtualenv?
1
m

modern-leather-27612

11/04/2021, 2:54 PM
I'll have a try. That change is easy enough and will let you know. And yeah, if it works, I'll submit a documentation change as well.
2 Views