Skip to content

Commit

Permalink
Merge pull request mattloper#41 from scottandrews/master
Browse files Browse the repository at this point in the history
Issue mattloper#40: Make compatible with pip>=20.1
  • Loading branch information
mattloper authored Aug 26, 2020
2 parents 9f1c4e8 + fe51783 commit 8ac4f2a
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 8ac4f2a

Please sign in to comment.