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

rapid-crayon-8232

01/14/2020, 2:08 PM
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

aloof-angle-91616

01/14/2020, 2:56 PM
not working how?
r

rapid-crayon-8232

01/14/2020, 2:57 PM
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

aloof-angle-91616

01/14/2020, 2:58 PM
i think it’s the right one? how is it not working?
r

rapid-crayon-8232

01/14/2020, 2:58 PM
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

aloof-angle-91616

01/14/2020, 3:00 PM
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

rapid-crayon-8232

01/14/2020, 3:02 PM
nope same with the env var
h

hundreds-father-404

01/14/2020, 4:03 PM
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

rapid-crayon-8232

01/14/2020, 4:05 PM
cool thx
4 Views