]> git.phdru.name Git - ppu.git/commitdiff
Fix deps: Add argparse to install_requires for Py 2.6
authorOleg Broytman <phd@phdru.name>
Sun, 7 May 2017 12:23:46 +0000 (15:23 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 7 May 2017 14:55:59 +0000 (17:55 +0300)
[skip ci]

setup.py

index 30dd82dc956f5a4f95fc606f37a4fe978c3f7fe0..e12e821d0fbefe8c1e84bcfe3d486d70a2f60b3e 100755 (executable)
--- 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
       )