# shebang needs to be changed in several places in bin.src directories

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
0.25
• Epic Link:
• Sprint:
AP S18-6

#### Description

The #!/usr/bin/env python2 shebang is present in several scripts in bin.src directories especially in obs_lsstSim but also in pipe_tasks exampleCmdLineTask.

The rewrite_shebang function does not actually rewrite the shebang on Linux because needShebangRewrite() can only return True on OSX

#### Activity

Hide
Fabio Hernandez added a comment - - edited

This issue is still present in v15_0 and all the weeklies up to w_2018_14. This is inconvenient for IN2P3 since we only install the LSST software stack to be used with Python 3.

This is what I get with a deployed version of v15.0 on Linux:

$cd$LSST_HOME/stack/current/Linux64/obs_lsstSim/15.0/bin

$head -1 * ==> extractPhosimGainSaturation.py <== #!/usr/bin/env python2 ==> genDefectRegistry.py <== #!/usr/bin/env python2 ==> genInputRegistry.py <== #!/usr/bin/env python2 ==> ingestSimImages.py <== #!/usr/bin/env python ==> makeDefectMaps.py <== #!/usr/bin/env python2 ==> makeLsstCameraRepository.py <== #!/usr/bin/env python2 ==> processCalibLsstSim.py <== #!/usr/bin/env python2 ==> processEimage.py <== #!/usr/bin/env python2 Show Fabio Hernandez added a comment - - edited This issue is still present in v15_0 and all the weeklies up to w_2018_14 . This is inconvenient for IN2P3 since we only install the LSST software stack to be used with Python 3. This is what I get with a deployed version of v15.0 on Linux:$ cd $LSST_HOME/stack/current/Linux64/obs_lsstSim/15.0/bin$ head -1 * ==> extractPhosimGainSaturation.py <== #!/usr/bin/env python2 ==> genDefectRegistry.py <== #!/usr/bin/env python2 ==> genInputRegistry.py <== #!/usr/bin/env python2 ==> ingestSimImages.py <== #!/usr/bin/env python ==> makeDefectMaps.py <== #!/usr/bin/env python2 ==> makeLsstCameraRepository.py <== #!/usr/bin/env python2 ==> processCalibLsstSim.py <== #!/usr/bin/env python2 ==> processEimage.py <== #!/usr/bin/env python2
Hide
Tim Jenness added a comment -

I am wondering if this means no one has ever even tried to run these on python3. I assume there are many bin scripts that haven't been tested because we don't really have a way of testing them. Removing the "2" is a quick fix to get us over the initial problem.

Show
Tim Jenness added a comment - I am wondering if this means no one has ever even tried to run these on python3. I assume there are many bin scripts that haven't been tested because we don't really have a way of testing them. Removing the "2" is a quick fix to get us over the initial problem.
Hide
Tim Jenness added a comment -

There is also one in obs_test/bin.src/genInputRegistry.py and four routines in obs_test/data/utils, along with obs_decam/decam/makeDecamCameraRepository.py

Show
Tim Jenness added a comment - There is also one in obs_test/bin.src/genInputRegistry.py and four routines in obs_test/data/utils, along with obs_decam/decam/makeDecamCameraRepository.py
Hide
Russell Owen added a comment -

I fixed this problem in obs_cfht as part of DM-13509, but I'm glad to see there is a more general ticket for it.

Show
Russell Owen added a comment - I fixed this problem in obs_cfht as part of DM-13509 , but I'm glad to see there is a more general ticket for it.
Hide
Russell Owen added a comment -

Tim Jenness Since you are paying attention to this and because I took the opportunity to make obs_test and obs_decam pep8 compliant (with automatic checking), might you have a look?

Show
Russell Owen added a comment - Tim Jenness Since you are paying attention to this and because I took the opportunity to make obs_test and obs_decam pep8 compliant (with automatic checking), might you have a look?
Hide
Tim Jenness added a comment -

Minor comments on PRs.

Show
Tim Jenness added a comment - Minor comments on PRs.

#### People

Assignee:
Russell Owen
Reporter:
Dominique Boutigny
Reviewers:
Tim Jenness
Watchers:
Dominique Boutigny, Fabio Hernandez, John Swinbank, Russell Owen, Tim Jenness
Votes:
1 Vote for this issue
Watchers:
5 Start watching this issue

#### Dates

Created:
Updated:
Resolved:

#### Jenkins

No builds found.