Looking into this some more, I think that pip.installed will need an additional parameter.
It is perfectly legal to do this:
The direct salt state would be similar to:
django-orm-extensions:
pip.installed:
- require:
- pip: django-orm
- pkg: git
Unfortunately, that salt state will not work. When a package is installed from a repo, it is installed as the actual package name, not the path to the package in the repo. So, when pip.installed uses pip.freeze and pip.list to determine if the package is already installed, it has no standard method by which it would know what the name of the package actually is. The current design will compare the value in the 'name' param to those returned by pip.freeze and never succeed.
I propose adding another param to pip.installed. We could call it 'repo'.
The salt state would look like this:
django-orm-extensions:
pip.installed:
- require:
- pip: django-orm
- pkg: git
In this case the important parts are:
name=django-orm-extensions
Then, the name param can be used in the comparisons in pip.freeze and pip.list. And the repo value can be passed as the 'name' param to pip.install.
This would include 2 small changes to pip.installed.
1. add "repo=None," to the definition
2. on line 83, add this:
if repo:
name = repo
If this seems reasonable, I'll happily code up the change and send in a Pull Request.
Nick