Looks like environment variables cannot be used in...
# general
h
Looks like environment variables cannot be used in pants.toml. Mine has a path that is specific to my laptop :
[python-repos]
repos.add = ["file:///home/greg/Work/mesh/mesh-dash/packages"]
What are my options to make this generic?
h
Indeed. See https://github.com/pantsbuild/pants/issues/10399 Pants will interpolate the special strings
"%(homedir)s"
, and same with buildroot and user
Copy code
repos.add = ["%(homedir)s/mesh/mesh-dash/packages"]
The alternative is using Pants env vars, e.g. having users set up a pantsrc file. See the global option
--pantsrc-files
h
Perfect thanks again!!
❤️ 1
e
But also, unless Pants is doing too much processing, you can simply:
Copy code
repos.add = ["~/mesh/mesh-dash/packages"]
Pants hands off to Pex and Pex does no processing and Pip handles this just fine.
👍 1