asdf-community / asdf-community/asdf-python

Exclude pip modules from reshim?

Open
#167 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
729
Forks
65
PR merge metrics
No merged PRs in 30d

Description

Hi there, I was wondering if it's possible to prevent some installed pip modules from being linked during a `asdf reshim python`.

For example, I have the `python-apt` module installed because I write python scripts to interact with apt, however this now overrides my base OS version's `apt` binary

I don't want to totally prevent python modules from being installed in my path because of things like `ansible`

```
~
$ apt --version
1.18

~
$ apt install apt
* Running: sudo apt-get install apt
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt is already the newest version (2.0.9).
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.

~
$ which apt
/home/ddastoor/.asdf/shims/apt

~
$ pip3 list | grep apt
apt-wrapper 1.18
pyapt 0.0.6
wrapt 1.15.0
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `asdf reshim python` with `python-apt` installed and inspect how the `apt` shim is generated. The change should provide a way to exclude selected pip-provided commands while continuing to link useful commands such as `ansible`, with the system `apt` remaining available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.