From 82c2faced85b1775467665aedc14303dbdcdaec5 Mon Sep 17 00:00:00 2001 From: Marion Le Borgne Date: Tue, 28 Aug 2018 13:35:45 -0700 Subject: [PATCH] FIX: compatibility with pip versions > 10.*.* --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c4204d5..1cb5b31 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,12 @@ from setuptools import setup, find_packages -from pip.download import PipSession -from pip.req import parse_requirements +try: + from pip.req import parse_requirements +except ImportError: + from pip._internal.req import parse_requirements +try: + from pip.download import PipSession +except ImportError: + from pip._internal.download import PipSession import os # Get __version__ and set other constants.