summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-x[-rw-r--r--]setup.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index c4f17ac..bd9379e 100644..100755
--- a/setup.py
+++ b/setup.py
@@ -7,12 +7,29 @@ import sys
from distutils.core import setup
-def publish():
- """Publish to PyPi"""
+
+if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
+ sys.exit()
+
+if sys.argv[-1] == 'speedups':
+ try:
+ import pip
+ except ImportError:
+ print('Pip required.')
+ sys.exit(1)
+
+ os.system('pip install simplejson pyyaml')
+ sys.exit()
+
+if sys.argv[-1] == 'test':
+ try:
+ import py
+ except ImportError:
+ print('py.test required.')
+ sys.exit(1)
-if sys.argv[-1] == "publish":
- publish()
+ os.system('pytest test_tablib.py')
sys.exit()
required = []