components/python/cheetah/patches/cheetah-path.patch
author Niall Power <niall.power@oracle.com>
Fri, 10 Jan 2014 12:44:12 -0800
branchs11-update
changeset 2891 d90819d28c84
permissions -rw-r--r--
PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool 17539358 The Python Cheetah module should be added to Userland

In-house developed patch.
Patch to overall Cheetah test framework to find the correct version of
Python to use based on the $PYTHON_VERSION environment variable.
Solaris-specific; not suitable for upstream

--- Cheetah-2.4.4/cheetah/Tests/CheetahWrapper.py.orig	Thu Sep 16 12:21:36 2010
+++ Cheetah-2.4.4/cheetah/Tests/CheetahWrapper.py	Sun Sep  1 01:27:50 2013
@@ -63,7 +63,11 @@
         """Create the top-level directories, subdirectories and .tmpl
            files.
         """
-        self.cmd = self.locate_cheetah('cheetah')
+        if not os.environ.get('PYTHON_VERSION'):
+            self.cmd = self.locate_cheetah('cheetah')
+        else:
+            self.cmd = self.locate_cheetah(
+                ''.join(['cheetah-', os.environ['PYTHON_VERSION']]))
         pythonPath = os.getcwd()
         if not os.environ.get('PYTHONPATH'):
             os.environ['PYTHONPATH'] = pythonPath