From: Oleg Broytman Date: Sun, 7 May 2017 12:23:46 +0000 (+0300) Subject: Fix deps: Add argparse to install_requires for Py 2.6 X-Git-Tag: 0.4.0~4 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=6d7c9805c78ef668e6351c5dcb3f25518c1230cd;p=ppu.git Fix deps: Add argparse to install_requires for Py 2.6 [skip ci] --- diff --git a/setup.py b/setup.py index 30dd82d..e12e821 100755 --- a/setup.py +++ b/setup.py @@ -1,9 +1,18 @@ #!/usr/bin/env python +import sys + try: from setuptools import setup + is_setuptools = True except ImportError: from distutils.core import setup + is_setuptools = False + +kw = {} +if is_setuptools: + if (sys.version_info[:2] == (2, 6)): + kw['install_requires'].append('argparse') setup(name='ppu', version='0.3.2', @@ -34,4 +43,5 @@ setup(name='ppu', scripts=[ 'scripts/cmp.py', 'scripts/remove-old-files.py', 'scripts/rm.py', ], + **kw )