##// END OF EJS Templates
setup: use pip10 compatible setup code.
marcink -
r493:a71caae1 default
parent child Browse files
Show More
@@ -23,11 +23,18 b' import os'
23 import sys
23 import sys
24 import pkgutil
24 import pkgutil
25 import platform
25 import platform
26 import codecs
26
27
27 from pip.download import PipSession
28 try: # for pip >= 10
29 from pip._internal.req import parse_requirements
30 except ImportError: # for pip <= 9.0.3
28 from pip.req import parse_requirements
31 from pip.req import parse_requirements
29
32
30 from codecs import open
33 try: # for pip >= 10
34 from pip._internal.download import PipSession
35 except ImportError: # for pip <= 9.0.3
36 from pip.download import PipSession
37
31
38
32
39
33 if sys.version_info < (2, 7):
40 if sys.version_info < (2, 7):
@@ -89,8 +96,8 b" keywords = ' '.join(["
89 readme_file = 'README.rst'
96 readme_file = 'README.rst'
90 changelog_file = 'CHANGES.rst'
97 changelog_file = 'CHANGES.rst'
91 try:
98 try:
92 long_description = open(readme_file).read() + '\n\n' + \
99 long_description = codecs.open(readme_file).read() + '\n\n' + \
93 open(changelog_file).read()
100 codecs.open(changelog_file).read()
94 except IOError as err:
101 except IOError as err:
95 sys.stderr.write(
102 sys.stderr.write(
96 "[WARNING] Cannot find file specified as long_description (%s)\n "
103 "[WARNING] Cannot find file specified as long_description (%s)\n "
General Comments 0
You need to be logged in to leave comments. Login now