summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Araujo <luis.araujo@collabora.co.uk>2014-11-18 20:18:22 (GMT)
committerLuis Araujo <luis.araujo@collabora.co.uk>2014-11-18 20:18:22 (GMT)
commit71a0287ace3ec4e64f8067e3beef92c2ab7a2843 (patch)
tree3b98cea2552a559ff394ca2529c4cefc27fed80c
parent696ba881e251fd2b5d35b30ec650a5668f64ea9d (diff)
downloadsingular-71a0287ace3ec4e64f8067e3beef92c2ab7a2843.tar.gz
singular-71a0287ace3ec4e64f8067e3beef92c2ab7a2843.tar.xz
Add setuptools installer
Change 'singular-lava' path. Fix the case when profile templates key is not available.
-rw-r--r--setup.py16
-rwxr-xr-xsingular-lava2
-rwxr-xr-xsingular.py2
3 files changed, 18 insertions, 2 deletions
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..4ee2724
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+from setuptools import setup
+
+setup(
+ name='singular',
+ version='0.0.1',
+ license='LGPL-2.1+',
+ description='Command line tool for Singularity.',
+ author='Luis Araujo',
+ author_email='luis.araujo@collabora.co.uk',
+ url='',
+ scripts=['singular.py', 'singular-lava'],
+ include_package_data=False,
+ zip_safe=False,
+)
diff --git a/singular-lava b/singular-lava
index 1be1277..4d4cec8 100755
--- a/singular-lava
+++ b/singular-lava
@@ -1,2 +1,2 @@
#!/bin/bash
-./singular.py lava $@
+singular.py lava $@
diff --git a/singular.py b/singular.py
index 95784f8..2901a0b 100755
--- a/singular.py
+++ b/singular.py
@@ -142,7 +142,7 @@ class Lava(object):
if self.args.job_file:
job_files = self.args.job_file
else:
- for t in profile['templates']:
+ for t in profile.get('templates', []):
job_files.append(os.path.join(profile['template-dir'], t))
# Process job files