Hi! I am sure there is some configuration for this...
# general
b
Hi! I am sure there is some configuration for this, but I haven't been able to find it: how do I set the folder where the python wheels get downloaded to? I am porting my company's codebase to pants, and my home folder is full of .whl's šŸ™‚
b
Pants (via PEX) normally downloads wheels to a subdirectory of a cache folder (buried in
~/.cache/pants/named_caches
by default), so it’s surprising if they're ending up literally in
~
. What’s your pants configuration? In
pants.toml
and if you set any env vars too? In addition, which wheels are you referring to? What commands are you running?
b
I'm running
pants run/test/package
, nothing else. No env vars. My toml is:
Copy code
[GLOBAL]
pants_version = "2.17.0"

backend_packages = [
    "pants.backend.build_files.fmt.black",
    "pants.backend.python",
    "pants.backend.python.lint.black",
    "pants.backend.python.lint.isort",
    "pants.backend.python.lint.docformatter",

pants_ignore = [
    ".*/",
    "/dist/",
    .....
]

[python]
interpreter_constraints = ["==3.10.10"]

[python-infer]
use_rust_parser = true

[python-repos]
find_links = [
    "<https://url>...",
]
b
Hm, nothing there looks like it would be overriding the default location, so you might have to do a bit of investigation to produce a minimal reproduction of the problem
b
How should I approach that? It's my first time using pants šŸ™‚ I literally just followed the "getting started" steps on the website. What are the flags/environment variables I can use to change this behavior?
b
Sorry for the trouble. I don’t think there’s flags to change the behaviour on pants’ side, because no part of pants’ ā€œnormalā€ code downloads
.whl
files to
$HOME
. Not that I have ever observed, anyway: it all ends up in hidden directories by default. (The only way I can think of this happening in pants’ code is if one overrides the defaults to weird values, and you don’t seem to… and even then, the symptom you describe would be unexpected) To create a minimal example, I’d suggest first narrowing down which target exactly is producing this behaviour (eg get to
pants test path/to/file.py
, instead of
pants test ::
if you haven’t already), and then deleting code until the behaviour goes away
(And, once you’ve done that hopefully the problem is either obvious from what was just deleted, or serves as a starting point for us to help you better)
b
Thanks, I will do that!
An update: I don't know what happened, but it stopped happening šŸ™‚
šŸ˜… 1