|
3 | 3 | # Setup script for the `humanfriendly' package.
|
4 | 4 | #
|
5 | 5 | # Author: Peter Odding <[email protected]>
|
6 |
| -# Last Change: February 16, 2020 |
| 6 | +# Last Change: September 17, 2021 |
7 | 7 | # URL: https://humanfriendly.readthedocs.io
|
8 | 8 |
|
9 | 9 | """
|
@@ -49,26 +49,22 @@ def get_install_requires():
|
49 | 49 | if sys.version_info.major == 2:
|
50 | 50 | install_requires.append('monotonic')
|
51 | 51 | if sys.platform == 'win32':
|
52 |
| - # pyreadline isn't compatible with Python 3.9+ |
53 |
| - # https://github.com/pyreadline/pyreadline/issues/65 |
54 |
| - install_requires.append('pyreadline ; python_version<"3.9"') |
| 52 | + # For details about these two conditional requirements please |
| 53 | + # see https://github.com/xolox/python-humanfriendly/pull/45. |
| 54 | + install_requires.append('pyreadline ; python_version < "3.8"') |
| 55 | + install_requires.append('pyreadline3 ; python_version >= "3.8"') |
55 | 56 | return sorted(install_requires)
|
56 | 57 |
|
57 | 58 |
|
58 | 59 | def get_extras_require():
|
59 | 60 | """Get the conditional dependencies for wheel distributions."""
|
60 | 61 | extras_require = {}
|
61 | 62 | if have_environment_marker_support():
|
62 |
| - # Conditional `monotonic' dependency. |
63 |
| - expression = ':%s' % ' or '.join([ |
64 |
| - 'python_version == "2.7"', |
65 |
| - ]) |
66 |
| - extras_require[expression] = ['monotonic'] |
67 |
| - # Conditional `pyreadline' dependency. |
68 |
| - # pyreadline isn't compatible with Python 3.9+ |
69 |
| - # https://github.com/pyreadline/pyreadline/issues/65 |
70 |
| - expression = ':sys_platform == "win32" and python_version<"3.9"' |
71 |
| - extras_require[expression] = 'pyreadline' |
| 63 | + # Conditional 'monotonic' dependency. |
| 64 | + extras_require[':python_version == "2.7"'] = ['monotonic'] |
| 65 | + # Conditional 'pyreadline' or 'pyreadline3' dependency. |
| 66 | + extras_require[':sys_platform == "win32" and python_version<"3.8"'] = 'pyreadline' |
| 67 | + extras_require[':sys_platform == "win32" and python_version>="3.8"'] = 'pyreadline3' |
72 | 68 | return extras_require
|
73 | 69 |
|
74 | 70 |
|
|
0 commit comments