Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14188

shiningpanda python plugin doesn't allow choosing name of python executable

      Python allows multiple versions of python installed to the same $PYTHON_HOME. The different installations use a different executable name to differentiate. For example, on my workstation, I have:

      python2.5
      python2.6
      python2.7
      python2
      python3.2
      python3
      python

      All of these have a PYTHON_HOME of /usr. python2 gives me the python2.7 installation. python3 and python both give me python 3.2.

      When you create a virtualenv, you can specify which python executable you wish to use by passing the name of the executable with the -p option. Once you're in the activated virtualenv, then the 'python' command is whatever you specified with the -p at virtualenv creation time.

      I'd expect this plugin to take the full path to the executable as an input instead of the PYTHON_HOME directory. the PYTHON_HOME can be determined programatically once you have the full path to the executable. For backwards compatibility, it would be fine to leave the PYTHON_HOME configuration and have an "advanced" section to specify the name and/or full path to the executable. That way, you can have several Python installations provided by your OS's package manager (ubuntu/debian fully support this in their repos) all with the same PYTHON_HOME, but different executable names for the different versions.

      See also: make altinstall in the CPython sources.

          [JENKINS-14188] shiningpanda python plugin doesn't allow choosing name of python executable

          Anton D added a comment -

          I'm having the same trouble. I'm using Ubuntu 12.04 with Python 2.7 as the system Python, and I installed a PPA for Python 2.6.

          When I use the virtualenv builder I will always get the system Python (2.7) because both versions run from /usr.

          I can manually create virtualenvs on the command line that correctly pick up the right version by using:
          virtualenv -p python2.6 <envname>
          or
          virtualenv -p python2.7 <envname>

          Anton D added a comment - I'm having the same trouble. I'm using Ubuntu 12.04 with Python 2.7 as the system Python, and I installed a PPA for Python 2.6. When I use the virtualenv builder I will always get the system Python (2.7) because both versions run from /usr. I can manually create virtualenvs on the command line that correctly pick up the right version by using: virtualenv -p python2.6 <envname> or virtualenv -p python2.7 <envname>

          We have the same issue. We install python versions on CentOS via the recommended 'make altinstall' method. Thus the pythonhome for these versions is /usr/local but there is no python, only python2.6 python2.7 etc

          Michael van Tellingen added a comment - We have the same issue. We install python versions on CentOS via the recommended 'make altinstall' method. Thus the pythonhome for these versions is /usr/local but there is no python, only python2.6 python2.7 etc

          This will be fixed in 0.15.

          You can now set the path to the Python executable in the "Home" field.

          Olivier Mansion added a comment - This will be fixed in 0.15. You can now set the path to the Python executable in the "Home" field.

            mansion Olivier Mansion
            programmerq Jeff Anderson
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: