Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13339

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

    Details

      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

        Attachments

          Issue Links

            Activity

            Hide
            FabioHernandez 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
            FabioHernandez 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
            tjenness 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
            tjenness 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
            tjenness 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
            tjenness 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
            rowen 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
            rowen 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
            rowen 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
            rowen 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
            tjenness Tim Jenness added a comment -

            Minor comments on PRs.

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

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                boutigny 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: