-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update conda inspect channels
#5033
Update conda inspect channels
#5033
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I've added some comments of things to double check because the conda-build<>conda interface for the solver is full of hacks (e.g. how subdirs are merged when fetching the index) and I don't know if those are assumed to apply here or not.
if channel != "defaults" and rec.get("schannel", "defaults") == "defaults": | ||
continue | ||
name = rec["name"] | ||
for subdir in ["osx-64", "linux-32", "linux-64", "win-32", "win-64"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this use KNOWN_SUBDIRS
in conda.somewhere.constants
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered this, but opted to leave that as a separate exercise since the primary goal was to stop using legacy solve stuff, not to fix conda inspect channels
. Ideally this should be a customizable field from the CLI.
match = has_py.search(build) | ||
assert match if "py" in build else True, build | ||
if match: | ||
additional_packages = [f"python={match.group(1)}.{match.group(2)}"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did additional_packages
go? Can you explain why is it being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understood (and from my testing) this doesn't make a difference. The package already defines its Python dependency so theres no need for us to also define it here.
This was actually prompted by the removal of the regex search on 183. Packages that do not follow the pyNN
build string pattern fails (e.g. https://anaconda.org/conda-test/itsdangerous/files).
See conda inpsect channels conda-test --test-installable
.
conda_build/inspect_pkg.py
Outdated
Solver( | ||
prefix, | ||
channel_urls, | ||
[subdir], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this fail if subdir
is None
? I'd make sure the default value is compatible with the Solver
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I remember that conda-build would merge native_subdir, "noarch"
in a single made-up subdir internally, so I don't know if this assumption was here too (in case we need to pass "noarch"
here). I think it doesn't, but I'd double check just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this didn't have any noarch
handling before I opted to not dig any further
good catch on the None
, I'll work on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subdir fallback: 9c1100f
conda_build/inspect_pkg.py
Outdated
channel_urls, | ||
[subdir], | ||
specs_from_args(packages), | ||
).solve_for_transaction().print_transaction_summary() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this output should be very similar to original one, so ok for me, but just mentioning that it might not be, in case that's important.
Co-authored-by: jaimergp <[email protected]>
Description
Update
conda inspect channels
to use latestsolver
/transactions
logic instead of legacyget_index
/actions
.Xref conda/conda#13192
Checklist - did you ...
news
directory (using the template) for the next release's release notes?Add / update necessary tests?Add / update outdated documentation?