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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2891
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     1
In-house developed patch.
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     2
Patch to overall Cheetah test framework to find the correct version of
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     3
Python to use based on the $PYTHON_VERSION environment variable.
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     4
Solaris-specific; not suitable for upstream
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     5
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     6
--- Cheetah-2.4.4/cheetah/Tests/CheetahWrapper.py.orig	Thu Sep 16 12:21:36 2010
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     7
+++ Cheetah-2.4.4/cheetah/Tests/CheetahWrapper.py	Sun Sep  1 01:27:50 2013
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     8
@@ -63,7 +63,11 @@
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
     9
         """Create the top-level directories, subdirectories and .tmpl
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    10
            files.
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    11
         """
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    12
-        self.cmd = self.locate_cheetah('cheetah')
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    13
+        if not os.environ.get('PYTHON_VERSION'):
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    14
+            self.cmd = self.locate_cheetah('cheetah')
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    15
+        else:
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    16
+            self.cmd = self.locate_cheetah(
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    17
+                ''.join(['cheetah-', os.environ['PYTHON_VERSION']]))
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    18
         pythonPath = os.getcwd()
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    19
         if not os.environ.get('PYTHONPATH'):
d90819d28c84 PSARC 2013/342 Cheetah 2.4.4 - Python template engine and code generation tool
Niall Power <niall.power@oracle.com>
parents:
diff changeset
    20
             os.environ['PYTHONPATH'] = pythonPath