Commit 0d7e8294cffe2de78bc1cacb111bd0bbc61a219f
1 parent
e8e560d5
Make sure that old library path is kept on Mac OS X (#2420)
Showing
6 changed files
with
29 additions
and
46 deletions
ChangeLog
| 1 | -2018-04-09 | 1 | +2018-04-10 |
| 2 | 2 | ||
| 3 | * Version 1.6.0 released | 3 | * Version 1.6.0 released |
| 4 | ======================== | 4 | ======================== |
| 5 | 5 | ||
| 6 | + Keep existing library path in installation script on Mac OS X (#2420) | ||
| 6 | Add show_rmf.py example script | 7 | Add show_rmf.py example script |
| 7 | Allow specifying of input sky map in ctskymap (#2311) | 8 | Allow specifying of input sky map in ctskymap (#2311) |
| 8 | Add ras() and decs() methods to csobsinfo (#2313) | 9 | Add ras() and decs() methods to csobsinfo (#2313) |
NEWS
| 1 | New Features and Important Changes in ctools 1.6.0 | 1 | New Features and Important Changes in ctools 1.6.0 |
| 2 | 2 | ||
| 3 | -9 April 2018 | 3 | +10 April 2018 |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | Introduction | 6 | Introduction |
| @@ -11,7 +11,7 @@ ctools release with respect to the precedent release. | @@ -11,7 +11,7 @@ ctools release with respect to the precedent release. | ||
| 11 | 11 | ||
| 12 | Configuration | 12 | Configuration |
| 13 | ------------- | 13 | ------------- |
| 14 | -None | 14 | +Keep existing library path in installation script on Mac OS X (#2420) |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | Python interface | 17 | Python interface |
doc/source/admin/release_history/1.6.rst
| @@ -16,7 +16,8 @@ In particular, this release provides: | @@ -16,7 +16,8 @@ In particular, this release provides: | ||
| 16 | Bug fixes | 16 | Bug fixes |
| 17 | --------- | 17 | --------- |
| 18 | 18 | ||
| 19 | -* ... | 19 | +* [`2420 <https://cta-redmine.irap.omp.eu/issues/2420>`_] - |
| 20 | + Keep existing library path in installation script on Mac OS X | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | Improvements | 23 | Improvements |
src/ctools-init.csh
| 1 | -# Filename: ctools-init.csh | 1 | +# Filename: ctools-init.csh |
| 2 | # Description: C-shell flavor initialization for ctools | 2 | # Description: C-shell flavor initialization for ctools |
| 3 | # runs ctools-setup to generate a temporary csh script | 3 | # runs ctools-setup to generate a temporary csh script |
| 4 | # tailored specifically to this user and ctools | 4 | # tailored specifically to this user and ctools |
src/ctools-init.sh
| 1 | -# Filename: ctools-init.sh | 1 | +# Filename: ctools-init.sh |
| 2 | # Description: Bourne-shell flavor initialization for ctools. | 2 | # Description: Bourne-shell flavor initialization for ctools. |
| 3 | # Runs ctools-setup to generate a sh script tailored | 3 | # Runs ctools-setup to generate a sh script tailored |
| 4 | # specifically to this user and ctools installation, | 4 | # specifically to this user and ctools installation, |
src/ctools-setup.in
| 1 | -#! /bin/sh | ||
| 2 | -# Filename: ctools-setup(.in) | 1 | +# Filename: ctools-setup(.in) |
| 3 | # Description: Writes an initialization script for ctools software | 2 | # Description: Writes an initialization script for ctools software |
| 4 | # which is custom fit to the user and the particular | 3 | # which is custom fit to the user and the particular |
| 5 | # software installation. Note that this script is | 4 | # software installation. Note that this script is |
| @@ -98,12 +97,10 @@ fi | @@ -98,12 +97,10 @@ fi | ||
| 98 | # | 97 | # |
| 99 | # Set LD_LIBRARY_PATH | 98 | # Set LD_LIBRARY_PATH |
| 100 | # =================== | 99 | # =================== |
| 101 | -if [ "x$LD_LIBRARY_PATH" = x ]; then | ||
| 102 | - LD_LIBRARY_PATH="$ctools_lib" | 100 | +if [ -z "${LD_LIBRARY_PATH}" ]; then |
| 101 | + LD_LIBRARY_PATH=$ctools_lib | ||
| 103 | else | 102 | else |
| 104 | - LD_LIBRARY_PATH=`echo ":$LD_LIBRARY_PATH:" | \ | ||
| 105 | - sed "s%:$ctools_lib:%:%g" | sed "s%::*$%%"` | ||
| 106 | - LD_LIBRARY_PATH="$ctools_lib$LD_LIBRARY_PATH" | 103 | + LD_LIBRARY_PATH=$ctools_lib:$LD_LIBRARY_PATH |
| 107 | fi | 104 | fi |
| 108 | 105 | ||
| 109 | # | 106 | # |
| @@ -111,20 +108,17 @@ fi | @@ -111,20 +108,17 @@ fi | ||
| 111 | # ================================= | 108 | # ================================= |
| 112 | case $uname_system in | 109 | case $uname_system in |
| 113 | Darwin*) | 110 | Darwin*) |
| 114 | - if [ "x$DYLD_LIBRARY_PATH" = x ]; then | ||
| 115 | - DYLD_LIBRARY_PATH="$ctools_lib" | 111 | + if [ -z "${DYLD_LIBRARY_PATH}" ]; then |
| 112 | + DYLD_LIBRARY_PATH=$ctools_lib | ||
| 116 | else | 113 | else |
| 117 | - DYLD_LIBRARY_PATH=`echo ":$DYLD_LIBRARY_PATH:" | \ | ||
| 118 | - sed "s%:$ctools_lib:%:%g" | sed "s%::*$%%"` | ||
| 119 | - DYLD_LIBRARY_PATH="$ctools_lib$DYLD_LIBRARY_PATH" | 114 | + DYLD_LIBRARY_PATH=$ctools_lib:$DYLD_LIBRARY_PATH |
| 120 | fi | 115 | fi |
| 121 | ;; | 116 | ;; |
| 122 | CYGWIN*) | 117 | CYGWIN*) |
| 123 | - if [ "x$PATH" = x ]; then | ||
| 124 | - PATH="$ctools_lib" | 118 | + if [ -z "${PATH}" ]; then |
| 119 | + PATH=$ctools_lib | ||
| 125 | else | 120 | else |
| 126 | - PATH=`echo ":$PATH:" | sed "s%:$ctools_lib:%:%g" | sed "s%::*$%%"` | ||
| 127 | - PATH="$ctools_lib$PATH" | 121 | + PATH=$ctools_lib:$PATH |
| 128 | fi | 122 | fi |
| 129 | ;; | 123 | ;; |
| 130 | esac | 124 | esac |
| @@ -132,41 +126,28 @@ esac | @@ -132,41 +126,28 @@ esac | ||
| 132 | # | 126 | # |
| 133 | # Set PYTHONPATH | 127 | # Set PYTHONPATH |
| 134 | # ============== | 128 | # ============== |
| 135 | -if [ "x$PYTHONPATH" = x ]; then | ||
| 136 | - PYTHONPATH="$python_dir" | 129 | +if [ -z "${PYTHONPATH}" ]; then |
| 130 | + PYTHONPATH=$python_dir:$python_exec_dir | ||
| 137 | else | 131 | else |
| 138 | - PYTHONPATH=`echo ":$PYTHONPATH:" | \ | ||
| 139 | - sed "s%:$python_dir:%:%g" | sed "s%::*$%%"` | ||
| 140 | - PYTHONPATH="$python_dir$PYTHONPATH" | ||
| 141 | -fi | ||
| 142 | -if [ "x$PYTHONPATH" = x ]; then | ||
| 143 | - PYTHONPATH="$python_exec_dir" | ||
| 144 | -else | ||
| 145 | - PYTHONPATH=`echo ":$PYTHONPATH:" | \ | ||
| 146 | - sed "s%:$python_exec_dir:%:%g" | sed "s%::*$%%"` | ||
| 147 | - PYTHONPATH="$python_exec_dir$PYTHONPATH" | 132 | + PYTHONPATH=$python_dir:$python_exec_dir:$PYTHONPATH |
| 148 | fi | 133 | fi |
| 149 | 134 | ||
| 150 | # | 135 | # |
| 151 | # Set PKG_CONFIG_PATH | 136 | # Set PKG_CONFIG_PATH |
| 152 | # =================== | 137 | # =================== |
| 153 | -if [ "x$PKG_CONFIG_PATH" = x ]; then | ||
| 154 | - PKG_CONFIG_PATH="$pkgconfig_dir" | 138 | +if [ -z "${PKG_CONFIG_PATH}" ]; then |
| 139 | + PKG_CONFIG_PATH=$pkgconfig_dir | ||
| 155 | else | 140 | else |
| 156 | - PKG_CONFIG_PATH=`echo ":$PKG_CONFIG_PATH:" | \ | ||
| 157 | - sed "s%:$pkgconfig_dir:%:%g" | sed "s%::*$%%"` | ||
| 158 | - PKG_CONFIG_PATH="$pkgconfig_dir$PKG_CONFIG_PATH" | 141 | + PKG_CONFIG_PATH=$pkgconfig_dir:$PKG_CONFIG_PATH |
| 159 | fi | 142 | fi |
| 160 | 143 | ||
| 161 | # | 144 | # |
| 162 | # Set PATH | 145 | # Set PATH |
| 163 | # ======== | 146 | # ======== |
| 164 | -if [ "x$PATH" = x ]; then | ||
| 165 | - PATH="$ctools_bin" | 147 | +if [ -z "${PATH}" ]; then |
| 148 | + PATH=$ctools_bin | ||
| 166 | else | 149 | else |
| 167 | - PATH=`echo ":$PATH:" | \ | ||
| 168 | - sed "s%:$ctools_bin:%:%g" | sed "s%::*$%%"` | ||
| 169 | - PATH="$ctools_bin$PATH" | 150 | + PATH=$ctools_bin:$PATH |
| 170 | fi | 151 | fi |
| 171 | 152 | ||
| 172 | # | 153 | # |
| @@ -188,8 +169,8 @@ fi | @@ -188,8 +169,8 @@ fi | ||
| 188 | # | 169 | # |
| 189 | # Set CALDB (if not yet set) | 170 | # Set CALDB (if not yet set) |
| 190 | # ========================== | 171 | # ========================== |
| 191 | -if [ "x$CALDB" = x ]; then | ||
| 192 | - CALDB="$caldb_dir" | 172 | +if [ -z "${CALDB}" ]; then |
| 173 | + CALDB=$caldb_dir | ||
| 193 | fi | 174 | fi |
| 194 | 175 | ||
| 195 | # | 176 | # |