Hey guys I'm trying to modify pants bootsrap dir ,...
# general
r
Hey guys I'm trying to modify pants bootsrap dir , but it doesn't seem to be working ?
Copy code
[GLOBAL]
pants_version: 1.24.0.dev2
print_exception_stacktrace: True
pants_bootstrapdir: '%(buildroot)s/.cache/pants'
pants_configdir: '%(buildroot)s/.config/pants'
a
not working how?
r
well my goal is for the executable to be in
'%(buildroot)s/.cache/pants'
instead of
~/.cache/pants/
, I'm not sure if that's the correct option to modify ?
a
i think it’s the right one? how is it not working?
r
the executable is created in
Copy code
New python executable in /Users/ouailbendidi/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.yLsU6t/install/bin/python3.7
Also creating executable in /Users/ouailbendidi/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.yLsU6t/install/bin/python
when I run
./pants help-advanced
it has the correct value:
Copy code
--pants-bootstrapdir=<dir> (default: ''/Users/ouailbendidi/project_dir/.cache/pants'')
    Use this dir for global cache.
but pants still installs in
/Users/ouailbendidi/.cache/pants/
a
oh yes some places don’t read from that option i think for some reason
i might try setting XDG_CACHE _DIR in the environment and seeing if that works
otherwise i can try to find where pants isn’t reading the right option value here
r
nope same with the env var
h
Oh, so that is entirely determined by the
./pants
script and this happens before the Python program is even running. https://github.com/pantsbuild/setup/blob/gh-pages/pants#L142
r
cool thx