Commit fa75aec9aacf75499f92dd5b7bdccb91ef6f84db
1 parent
d131d288
Use cscripts obsutils and create cscripts module.
Showing
4 changed files
with
13 additions
and
9 deletions
scripts/Makefile.am
| ... | ... | @@ -5,21 +5,22 @@ binscripts = cta_kb_bkgrates.py cta_root2irf.py cta_make_nodes.py \ |
| 5 | 5 | tsmerge.py |
| 6 | 6 | |
| 7 | 7 | # Scripts to be distributed in pythondir |
| 8 | -pythonscripts = cspull.py cssens.py cstsdist.py cscaldb.py csresmap.py \ | |
| 8 | +pythonscripts = __init__.py \ | |
| 9 | + cspull.py cssens.py cstsdist.py cscaldb.py csresmap.py \ | |
| 9 | 10 | cshessobs.py csobsdef.py csspec.py cslightcrv.py \ |
| 10 | 11 | csinfo.py \ |
| 11 | - lsmodel.py | |
| 12 | + obsutils.py | |
| 12 | 13 | |
| 13 | 14 | # Scripts for which symbolic links will be created in bindir |
| 14 | 15 | linkscripts = cspull cssens cstsdist cscaldb csresmap \ |
| 15 | 16 | cshessobs csobsdef csspec cslightcrv \ |
| 16 | - csinfo lsmodel | |
| 17 | + csinfo | |
| 17 | 18 | |
| 18 | 19 | # Distribute scripts |
| 19 | 20 | EXTRA_DIST = $(binscripts) $(pythonscripts) |
| 20 | 21 | binscriptsdir = $(bindir) |
| 21 | 22 | binscripts_DATA = $(binscripts) |
| 22 | -pythonscriptsdir = $(pythondir)/ctools | |
| 23 | +pythonscriptsdir = $(pythondir)/cscripts | |
| 23 | 24 | pythonscripts_DATA = $(pythonscripts) |
| 24 | 25 | |
| 25 | 26 | # Add hook rule to create symbolic links for cscripts |
| ... | ... | @@ -31,7 +32,7 @@ install-data-hook: |
| 31 | 32 | @linklist='$(linkscripts)';\ |
| 32 | 33 | for p in $$linklist; do \ |
| 33 | 34 | rm -rf "$(DESTDIR)$(bindir)/$$p"; \ |
| 34 | - ln -s "$(DESTDIR)$(pythondir)/ctools/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \ | |
| 35 | - chmod +x "$(DESTDIR)$(pythondir)/ctools/$$p.py"; \ | |
| 35 | + ln -s "$(DESTDIR)$(pythondir)/cscripts/$$p.py" "$(DESTDIR)$(bindir)/$$p"; \ | |
| 36 | + chmod +x "$(DESTDIR)$(pythondir)/cscripts/$$p.py"; \ | |
| 36 | 37 | done |
| 37 | 38 | ... | ... |
scripts/cspull.py
scripts/cssens.py
| ... | ... | @@ -20,7 +20,8 @@ |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import gammalib |
| 22 | 22 | import ctools |
| 23 | -from ctools import obsutils | |
| 23 | +#from ctools import obsutils | |
| 24 | +from cscripts import obsutils | |
| 24 | 25 | import sys |
| 25 | 26 | import csv |
| 26 | 27 | import math | ... | ... |
scripts/cstsdist.py