Ambari
  1. Ambari
  2. AMBARI-1790

Consider changing env comments in py scripts to use 'python' instead of 'python2.x'

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Fedora
      Using branch-1.2 sources

      Description

      The env comment in most of the python files looks like

      #!/usr/bin/env python2.6

      Changing it to this makes the scripts work on hosts with python2.7 which is more portable

      #!/usr/bin/env python

      1. python_ver.patch
        71 kB
        Trevor McKay

        Activity

        Hide
        Trevor McKay added a comment -

        Attached is a patch to change the py files in branch-1.2, it shows the affected files.

        Show
        Trevor McKay added a comment - Attached is a patch to change the py files in branch-1.2, it shows the affected files.
        Hide
        Mahadev konar added a comment -

        Nice one Trevor.

        Can you also provide a patch for trunk?

        Show
        Mahadev konar added a comment - Nice one Trevor. Can you also provide a patch for trunk?
        Hide
        Trevor McKay added a comment -

        Attaching the analogous patch for trunk

        Show
        Trevor McKay added a comment - Attaching the analogous patch for trunk
        Hide
        Sumit Mohanty added a comment -

        +1

        Show
        Sumit Mohanty added a comment - +1
        Hide
        Trevor McKay added a comment -

        Recreating the python2.patch for branch-1.2. For some reason my svn status was not right; I had played with changing the python version to 2.7 at some point and the patch reflected that.

        This one moves python2.6 -> python2

        Show
        Trevor McKay added a comment - Recreating the python2.patch for branch-1.2. For some reason my svn status was not right; I had played with changing the python version to 2.7 at some point and the patch reflected that. This one moves python2.6 -> python2
        Hide
        Trevor McKay added a comment -

        Redo the patch:

        1) Chagne "python2.6" to "python" instead of python2 as previous. Some platforms, like MacOS, don't provide the python2 link

        2) apply to current trunk

        Show
        Trevor McKay added a comment - Redo the patch: 1) Chagne "python2.6" to "python" instead of python2 as previous. Some platforms, like MacOS, don't provide the python2 link 2) apply to current trunk
        Hide
        Chad Roberts added a comment -

        This will greatly improve things when it comes to building on Fedora and other platforms.

        +1

        Show
        Chad Roberts added a comment - This will greatly improve things when it comes to building on Fedora and other platforms. +1
        Hide
        Trevor McKay added a comment -

        Updated against trunk

        Show
        Trevor McKay added a comment - Updated against trunk
        Hide
        Chad Roberts added a comment -

        Committed to trunk.

        Show
        Chad Roberts added a comment - Committed to trunk.

          People

          • Assignee:
            Trevor McKay
            Reporter:
            Trevor McKay
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development