pipm: pip install to local-packages and pip run

Kamal Mustafa - Nov 27 '19 - - Dev Community

Updates

Look like there was already previous effort on this, there's even PEP being written in form of PEP582! But discussion on it seem to stop around May this year, look like everyone seem have gave up :(

Aside: I don't know there's Discourse forum at discuss.python.org!

Also, other than the PEP's implementation as branch in CPython, there's also python implementation called pythonloc by Chad Smith. Turn out he's also the author of pipx, tools that I have started to use recently.

********** #### ***********

Following previous post, I wrote a simple wrapper to commands used in the write up. I called it pipm, as a play to word npm.

This little pipm tools allow me to do something like:-

pipm install django
pipm run django startproject mysite .
pipm run python manage.py runserver
Enter fullscreen mode Exit fullscreen mode

I don't know how far this little tool can go. Past experience has shown that there will be lot of edge cases that can't be covered and result in what we can call leaky abstractions.

But at the same time, pip has evolved a lot and it surprised me that this actually seem to work. Oh wait, I haven't try yet with editable packages, sigh ...

Btw, the repo is here - https://github.com/k4ml/pipm. Feel free to try and give feedback.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .