Commit bbdfb2a5 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Move conditional dependencies to install_requires

Installing from the source distribution (sdist), ushlex and
shutil_get_terminal_size were not installed. Putting the condition in
install_requires addresses this.
parent 34db612b
...@@ -20,6 +20,8 @@ def find_version(*file_paths): ...@@ -20,6 +20,8 @@ def find_version(*file_paths):
return version_match.group(1) return version_match.group(1)
raise RuntimeError("Unable to find version string.") raise RuntimeError("Unable to find version string.")
_PYTHON_VERSION = sys.version_info
_IS_PYTHON_27 = _PYTHON_VERSION.major == 2 and _PYTHON_VERSION.minor == 7
setup( setup(
name = "topydo", name = "topydo",
...@@ -32,15 +34,12 @@ setup( ...@@ -32,15 +34,12 @@ setup(
install_requires = [ install_requires = [
'six >= 1.9.0', 'six >= 1.9.0',
'arrow >= 0.7.0', 'arrow >= 0.7.0',
], 'colorama >= 0.2.5' if sys.platform == "win32" else '',
extras_require = {
':sys_platform=="win32"': ['colorama>=0.2.5'],
# shutil.get_terminal_size() was introduced in Python 3.3 # shutil.get_terminal_size() was introduced in Python 3.3
':python_version=="2.7"': [ 'backports.shutil_get_terminal_size>=1.0.0' if _IS_PYTHON_27 else '',
'backports.shutil_get_terminal_size>=1.0.0', 'ushlex' if _IS_PYTHON_27 else ''
'ushlex',
], ],
':python_version=="3.2"': ['backports.shutil_get_terminal_size>=1.0.0'], extras_require = {
'ical': ['icalendar'], 'ical': ['icalendar'],
'prompt-toolkit': ['prompt-toolkit >= 0.53'], 'prompt-toolkit': ['prompt-toolkit >= 0.53'],
'test': ['coverage', 'freezegun', 'green', ], 'test': ['coverage', 'freezegun', 'green', ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment