Closed kwinkunks closed 1 year ago
On further reflection I think .
is not the best default and something like pip-cache
would be better. Using the CWD could result in a lot of temp stuff showing up.
I have a fix ready to go for this, will wait for the README change to be merged because this will update it.
Resolved by 80d99efeed95f0ffe37ba08448a4896c8df93dde
When building & installing an env,
pip
is called twice on packages that use it. The first time,--cache
defaults to.
, which seems reasonable (though a bit messy, possibly creating a./pip_cache
would be better?). It defaults to.
because of: https://github.com/equinor/komodo/blob/main/komodo/build.py#L330However, the second time
pip
runs (without the--root
option), the--cache
and--find-links
options useargs.cache
directly (see https://github.com/equinor/komodo/blob/main/komodo/cli.py#L150-L151). If nothing was passed in for this argument, then you end up withNone
, resulting in pip failing with (for basictreelib
example):Workaround: pass a location for the cache, e.g.
--cache .
Proposed solution: set a default for the argument at parse time (i.e. in
cli.py
do this:parser.add_argument("--cache", "-c", default=".")
) and remove the buried conditional at https://github.com/equinor/komodo/blob/main/komodo/build.py#L330.