https://pantsbuild.org/ logo
#development
Title
# development
w

worried-salesclerk-37834

08/09/2021, 11:42 PM
Not sure if I should ask here or general... Is this the most recent/correct docs for building pants for a manual integration test? https://v1.pantsbuild.org/howto_develop.html
w

witty-crayon-22786

08/09/2021, 11:44 PM
the v1 site is for Pants 1.x: more recent is anything directly on
www
https://www.pantsbuild.org/docs/development is a good landing page for v2 development
w

worried-salesclerk-37834

08/09/2021, 11:48 PM
Just saw this.
Copy code
See the new docs for how to set up Pants to develop locally.

The rest of this page documents things that have not yet been moved to the new site.
How do I run the development build of pants? I couldn't find that in the new docs.
w

witty-crayon-22786

08/10/2021, 12:01 AM
just running
pants
in the
pantsbuild/pants
repo will do it.
it will build from source.
…sorry. do you mean “how do i run a development version of pants in a different repository than `pantsbuild/pants`”?
h

hundreds-father-404

08/10/2021, 12:03 AM
If so, that's at the bottom of https://www.pantsbuild.org/docs/installation
w

worried-salesclerk-37834

08/10/2021, 12:09 AM
Yeah, I think so! I wanted to test the asdf integration and I figured the best way was to build it and run with my setup. Thanks.
🙌 1
h

happy-kitchen-89482

08/10/2021, 12:11 AM
You can also run Pants directly from sources in a sibling repo. See https://github.com/pantsbuild/example-python/blob/main/pants_from_sources for an example
We should probably document this
w

witty-crayon-22786

08/10/2021, 12:14 AM
yea, what Benjy said. if you’re going to be live editing, you want to use something like that
pants_from_sources
script. it really doesn’t require a script in general though… it mostly amounts to running the
pants
script from your
pantsbuild/pants
in another directory
h

happy-kitchen-89482

08/10/2021, 12:30 AM
well, it's not quite that simple, you need to set some env vars and stuff
so the script makes it easy
w

witty-crayon-22786

08/10/2021, 12:38 AM
Only if you have source plugins, afaik
w

worried-salesclerk-37834

08/10/2021, 3:38 AM
For that script, I'm not sure if it's because I'm using mac's ancient bash version, but I had to remove the
-u
option. Seems like initializing an empty array isn't the same as binding it?
Copy code
./pants_from_sources: line 26: plugins[@]: unbound variable
./pants_from_sources: line 26: pythonpath[@]: unbound variable
./pants_from_sources: line 26: backend_packages[@]: unbound variable
and then a failure containing
Copy code
180, in parse
    req, = parse_requirements(s)
ValueError: not enough values to unpack (expected 1, got 0)
Removing that -u option fixed it.
2 Views