mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Merge pull request #218 from maebert/readline
Installs readline on non-windows if not available
This commit is contained in:
commit
69d5c5d844
1 changed files with 9 additions and 1 deletions
10
setup.py
10
setup.py
|
@ -44,6 +44,12 @@ except ImportError:
|
|||
import os
|
||||
import sys
|
||||
import re
|
||||
try:
|
||||
import readline
|
||||
readline_available = True
|
||||
except ImportError:
|
||||
readline_available = False
|
||||
|
||||
|
||||
if sys.argv[-1] == 'publish':
|
||||
os.system("python setup.py sdist upload")
|
||||
|
@ -60,11 +66,13 @@ def get_version(filename="jrnl/__init__.py"):
|
|||
return m.group(1)
|
||||
|
||||
conditional_dependencies = {
|
||||
"pyreadline>=2.0": "win32" in sys.platform,
|
||||
"pyreadline>=2.0": not readline_available and "win32" in sys.platform,
|
||||
"readline>=6.2": not readline_available and "win32" not in sys.platform,
|
||||
"colorama>=0.2.5": "win32" in sys.platform,
|
||||
"argparse>=1.1.0": sys.version.startswith("2.6")
|
||||
}
|
||||
|
||||
|
||||
setup(
|
||||
name = "jrnl",
|
||||
version = get_version(),
|
||||
|
|
Loading…
Add table
Reference in a new issue