Skip to content

Commit

Permalink
Issue mattloper#40: Make compatible with pip>=20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
scottandrews committed May 11, 2020
1 parent 9f1c4e8 commit fe51783
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
from runpy import run_path

install_reqs = parse_requirements('requirements.txt', session=False)
install_requires = [str(ir.req) for ir in install_reqs]
try: # for pip < 20.1
install_requires = [str(ir.req) for ir in install_reqs]
except AttributeError: # for pip >= 20.1
install_requires = [str(ir.requirement) for ir in install_reqs]

def get_version():
namespace = run_path('chumpy/version.py')
Expand Down

0 comments on commit fe51783

Please sign in to comment.