Skip to content

Commit 9f9f271

Browse files
committed
Incorporate pyreadline3 requirement in setup.py (#45)
1 parent ae2a7e2 commit 9f9f271

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

setup.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Setup script for the `humanfriendly' package.
44
#
55
# Author: Peter Odding <[email protected]>
6-
# Last Change: February 16, 2020
6+
# Last Change: September 17, 2021
77
# URL: https://humanfriendly.readthedocs.io
88

99
"""
@@ -49,26 +49,22 @@ def get_install_requires():
4949
if sys.version_info.major == 2:
5050
install_requires.append('monotonic')
5151
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"')
5556
return sorted(install_requires)
5657

5758

5859
def get_extras_require():
5960
"""Get the conditional dependencies for wheel distributions."""
6061
extras_require = {}
6162
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'
7268
return extras_require
7369

7470

0 commit comments

Comments
 (0)