Skip to content

conda install pre-command hook and .whl extension recognition #114

@danyeaw

Description

@danyeaw

What is the idea?

Implement a pre-command hook that detects .whl files in conda install commands and patches conda's file extension recognition to accept .whl files as valid package formats.

Why is this needed?

If you tried to install a whl file, conda would reject it because it doesn't recognize them as valid package formats. We need to intercept the command and patch the file validation before conda processes the arguments.

What should happen?

The pre-command hook should detect when .whl files are present in conda install commands, then monkey patch conda's file extension validation functions to accept .whl files alongside .tar.bz2 and .conda files. The hook should only activate when .whl files are detected to avoid interfering with normal conda operations.

Additional Context

https://github.com/Anaconda/conda-whl-support already provides an example of how to implement this.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions