about summary refs log tree commit diff
path: root/setup.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2015-09-15 15:44:52 +0200
committerPaweł Jastrzębski <pawelj@iosphe.re>2015-09-15 15:44:52 +0200
commit14f677ec68389382c4554d96fd02f8e5e8d076ec (patch)
treed5cd246c2141e4cc04d3564b31f1493dd212a294 /setup.py
parentYet another Windows file lock fixes (diff)
downloadkcc-14f677ec68389382c4554d96fd02f8e5e8d076ec.tar.gz
kcc-14f677ec68389382c4554d96fd02f8e5e8d076ec.tar.bz2
kcc-14f677ec68389382c4554d96fd02f8e5e8d076ec.zip
Python 3.5+ include scandir
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 8a7c8cc..0857e8f 100755
--- a/setup.py
+++ b/setup.py
@@ -11,17 +11,17 @@ Usage (Linux):
 Usage (Mac OS X):
     python3 setup.py py2app
 """
+
 from sys import platform, version_info, argv
 from kcc import __version__
-if version_info[0] != 3:
-    print('ERROR: This is Python 3 script!')
-    exit(1)
+
 
 NAME = 'KindleComicConverter'
 VERSION = __version__
 MAIN = 'kcc.py'
 extra_options = {}
 
+
 if platform == 'darwin':
     from setuptools import setup
     from os import chmod, makedirs, system
@@ -136,10 +136,12 @@ else:
                 'Pillow>=2.8.2',
                 'psutil>=3.0.0',
                 'python-slugify>=1.1.3',
-                'scandir>=1.1.0',
             ],
             zip_safe=False,
         )
+        if version_info[1] < 5:
+            extra_options['install_requires'].append('scandir>=1.1.0')
+
 
 setup(
     name=NAME,