npm and yarn execute scripts with special names like postinstall
and so on after/before several actions. Pipenv should do the same.
Our django project has some dependencies, that have to be installed using yarn
.
It was nice, if pipenv installs those dependcies automatically by executing a postinstall
script, that calls yarn install
.
Otherwise I have to run pipenv install
and yarn install
.
$ pipenv --support
Error: no such option: --support
$ pipenv --version
pipenv, version 11.10.4
I am strongly -1 to this. npm鈥檚 magic script names are asking for trouble, and completely against Python鈥檚 preference to readability and obviousness. I am indifferent toward hooks as an idea (although I suspect Kenneth would object), but npm鈥檚 approach is not a good fit.
In any case, however, consider submitting a PEEP to describe your suggestion, and it will be discussed accordingly :)
(sorry, clicked the wrong button)
Just another use case is enabling jupyter extensions after installing. For example, to install qgrid:
pip install qgrid
jupyter nbextension enable --py --sys-prefix qgrid
# only required if you have not enabled the ipywidgets nbextension yet
jupyter nbextension enable --py --sys-prefix widgetsnbextension
I kind of feel that this kind of (install) hooks should be standardised in package metadata. Maybe it would be a good idea to raise this to pip, or distutils-sig for more general consideration.
Most helpful comment
I kind of feel that this kind of (install) hooks should be standardised in package metadata. Maybe it would be a good idea to raise this to pip, or distutils-sig for more general consideration.