aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2014-08-13 13:32:47 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2014-08-13 13:32:47 -0400
commit26cfbb67fc642358c3eef5671dc1b9608666037d (patch)
treebbfdf75cd7b2e77366c1d70e9fef7b5dcefc1246
parentdc8bb7d7ddf5c4af908db91294baa9bd4ba0089a (diff)
downloadcidrchk-26cfbb67fc642358c3eef5671dc1b9608666037d.tar.gz
Prevent installing argparse if Python version is >2.7
-rw-r--r--setup.py36
1 files changed, 20 insertions, 16 deletions
diff --git a/setup.py b/setup.py
index f98a98d..ff85337 100644
--- a/setup.py
+++ b/setup.py
@@ -1,24 +1,28 @@
-import os
+import sys
from setuptools import setup
+dependencies = [
+ 'netaddr',
+ 'netifaces',
+]
+
+if sys.version_info[:2] < (2, 7):
+ dependencies.append('argparse')
+
setup(
- name = 'cidrchk',
- version = '1.0.0',
- author = 'Joseph Hunkeler',
- author_email = 'jhunkeler@gmail.com',
- description = ('A simple "Is my computer on this subnet?" detection script.'),
- license = 'BSD',
- keywords = 'cidrchk detect network interface ethernet',
- zip_safe = True,
- scripts = [
+ name='cidrchk',
+ version='1.0.0',
+ author='Joseph Hunkeler',
+ author_email='jhunkeler@gmail.com',
+ description=('A simple "Is my computer on this subnet?" detection script.'),
+ license='BSD',
+ keywords='cidrchk detect network interface ethernet',
+ zip_safe=True,
+ scripts=[
'cidrchk',
],
- install_requires = [
- 'netaddr',
- 'netifaces',
- 'argparse',
- ],
- classifiers = [
+ install_requires=dependencies,
+ classifiers=[
'Development Status :: 5 - Production/Stable',
'Topic :: Utilities',
'License :: OSI Approved :: BSD License',