Skip to content

Commit 4cf8ab3

Browse files
leon0707clemfromspace
authored andcommitted
fix: pip 10 compatibility (clemfromspace#12)
1 parent 0533933 commit 4cf8ab3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
"""This module contains the packaging routine for the pybook package"""
22

33
from setuptools import setup, find_packages
4-
from pip.download import PipSession
5-
from pip.req import parse_requirements
4+
try:
5+
from pip.download import PipSession
6+
from pip.req import parse_requirements
7+
except ImportError:
8+
# It is quick hack to support pip 10 that has changed its internal
9+
# structure of the modules.
10+
from pip._internal.download import PipSession
11+
from pip._internal.req.req_file import parse_requirements
612

713

814
def get_requirements(source):

0 commit comments

Comments
 (0)