Skip to content
Snippets Groups Projects
Commit b98b7cb8 authored by Manuel Günther's avatar Manuel Günther
Browse files

Corrected small bug in the grid script; changed names of q... executables to...

Corrected small bug in the grid script; changed names of q... executables to q....py to not overwrite the default programs.
parent c13f2ec4
Branches
Tags
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
# vim: set fileencoding=utf-8 : # vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch> # Andre Anjos <andre.anjos@idiap.ch>
# Wed 27 Jul 2011 14:36:06 CEST # Wed 27 Jul 2011 14:36:06 CEST
"""Executes a given command within the context of a shell script that has its """Executes a given command within the context of a shell script that has its
enviroment set like Idiap's 'SETSHELL grid' does.""" enviroment set like Idiap's 'SETSHELL grid' does."""
...@@ -13,8 +13,11 @@ def main(): ...@@ -13,8 +13,11 @@ def main():
from ..setshell import replace from ..setshell import replace
# get the name of the script that we actually want to execute
# (as defined in the setup.py)
prog = os.path.basename(sys.argv[0]) prog = os.path.basename(sys.argv[0])
if prog[-3:].lower == '.py': prog = prog[-3:] # remove the .py extension, if available
if prog[-3:] == '.py': prog = prog[:-3]
if prog == 'grid': if prog == 'grid':
# act as before # act as before
......
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='gridtk', name='gridtk',
version='0.3.2', version='0.3.3',
description='SGE Grid Submission and Monitoring Tools for Idiap', description='SGE Grid Submission and Monitoring Tools for Idiap',
url='https://github.com/idiap/gridtk', url='https://github.com/idiap/gridtk',
...@@ -19,10 +19,10 @@ setup( ...@@ -19,10 +19,10 @@ setup(
'grid = gridtk.script.grid:main', 'grid = gridtk.script.grid:main',
# program replacements # program replacements
'qstat = gridtk.script.grid:main', 'qstat.py = gridtk.script.grid:main',
'qdel = gridtk.script.grid:main', 'qdel.py = gridtk.script.grid:main',
'qsub = gridtk.script.grid:main', 'qsub.py = gridtk.script.grid:main',
'man = gridtk.script.grid:main', 'man.py = gridtk.script.grid:main',
] ]
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment