Skip to content

Commit

Permalink
setup.py cleanup
Browse files Browse the repository at this point in the history
* check for CPython instead of checking for PyPy;
* don't install fastcache for Python 3.5
  • Loading branch information
kmike committed Sep 27, 2015
1 parent 52494ab commit 6eca38e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import sys
import platform
from setuptools import setup
# from Cython.Build import cythonize

Expand All @@ -23,7 +24,7 @@ def get_version():
# ],
# }

is_pypy = '__pypy__' in sys.builtin_module_names
is_cpython = platform.python_implementation() == 'CPython'
py_version = sys.version_info[:2]


Expand All @@ -32,18 +33,17 @@ def get_version():
'pymorphy2-dicts-ru >=2.4, <3.0',
'docopt >= 0.6',
]
extras_require = {'fast': []}


if py_version < (3, 0):
install_requires.append("backports.functools_lru_cache >= 1.0.1")


if not is_pypy:
extras_require['fast'].extend([
"DAWG >= 0.7.7",
"fastcache >= 1.0.2",
])
extras_require = {'fast': []}
if is_cpython:
extras_require['fast'].append("DAWG >= 0.7.7")
if py_version < (3, 5):
# lru_cache is optimized in Python 3.5
extras_require['fast'].append("fastcache >= 1.0.2")


setup(
name='pymorphy2',
Expand Down

0 comments on commit 6eca38e

Please sign in to comment.