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

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

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: