Show More
@@ -25,11 +25,17 b' import os' | |||||
25 | import sys |
|
25 | import sys | |
26 | import pkgutil |
|
26 | import pkgutil | |
27 | import platform |
|
27 | import platform | |
|
28 | import codecs | |||
28 |
|
29 | |||
29 | from pip.download import PipSession |
|
30 | try: # for pip >= 10 | |
30 | from pip.req import parse_requirements |
|
31 | from pip._internal.req import parse_requirements | |
|
32 | except ImportError: # for pip <= 9.0.3 | |||
|
33 | from pip.req import parse_requirements | |||
31 |
|
34 | |||
32 | from codecs import open |
|
35 | try: # for pip >= 10 | |
|
36 | from pip._internal.download import PipSession | |||
|
37 | except ImportError: # for pip <= 9.0.3 | |||
|
38 | from pip.download import PipSession | |||
33 |
|
39 | |||
34 |
|
40 | |||
35 | if sys.version_info < (2, 7): |
|
41 | if sys.version_info < (2, 7): | |
@@ -96,8 +102,8 b" keywords = ' '.join([" | |||||
96 | readme_file = 'README.rst' |
|
102 | readme_file = 'README.rst' | |
97 | changelog_file = 'CHANGES.rst' |
|
103 | changelog_file = 'CHANGES.rst' | |
98 | try: |
|
104 | try: | |
99 | long_description = open(readme_file).read() + '\n\n' + \ |
|
105 | long_description = codecs.open(readme_file).read() + '\n\n' + \ | |
100 | open(changelog_file).read() |
|
106 | codecs.open(changelog_file).read() | |
101 | except IOError as err: |
|
107 | except IOError as err: | |
102 | sys.stderr.write( |
|
108 | sys.stderr.write( | |
103 | "[WARNING] Cannot find file specified as long_description (%s)\n " |
|
109 | "[WARNING] Cannot find file specified as long_description (%s)\n " |
General Comments 0
You need to be logged in to leave comments.
Login now