napalm-automation / napalm-salt

Modules for event-driven network automation and orchestration using Salt
Apache License 2.0
127 stars 36 forks source link

Update pip parse_requirements import #55

Open raddessi opened 5 years ago

raddessi commented 5 years ago

Hi, currently the 0.0.2 release tries to "from pip.req import parse_requirements", that should be changed to try both the new and old ways:

try:
    # for pip >= 10
    from pip._internal.req import parse_requirements
except ImportError:
    # for pip <= 9.0.3
    from pip.req import parse_requirements

I actually tried forking to make a PR but am unable to install this from git.. how do you install the version in git via pip?