From 14f677ec68389382c4554d96fd02f8e5e8d076ec Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Tue, 15 Sep 2015 15:44:52 +0200 Subject: Python 3.5+ include scandir --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'setup.py') 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, -- cgit 1.4.1