components/python/imaging/patches/05-selftest_py.patch
author April Chin <april.chin@oracle.com>
Tue, 01 Sep 2015 09:29:08 -0700
changeset 4833 b9009ad1e605
permissions -rw-r--r--
21751260 enable system-test target for python/imaging (PIL)

Solaris-specific patch for testing in Userland framework.
Not appropriate for upstream.

--- Imaging-1.1.7-orig/selftest.py	2015-08-25 10:45:10.000000000 -0700
+++ Imaging-1.1.7/selftest.py	2015-08-26 10:21:50.931646299 -0700
@@ -4,6 +4,10 @@ ROOT = "."
 
 import os, sys
 sys.path.insert(0, ROOT)
+# PYTHONPATH should be searched first, to find PIL modules installed on
+# the system, ahead of the current directory and the source directory 
+# where this script resides
+sys.path.insert(0, os.environ.get('PYTHONPATH'))
 
 from PIL import Image
 from PIL import ImageDraw