[121942] trunk/dports/python/py-opengl

jmr at macports.org jmr at macports.org
Fri Jul 11 15:26:14 PDT 2014


Revision: 121942
          https://trac.macports.org/changeset/121942
Author:   jmr at macports.org
Date:     2014-07-11 15:26:14 -0700 (Fri, 11 Jul 2014)
Log Message:
-----------
py-opengl: allow either PIL or Pillow to satisfy dependency with python2, and patch test file to be Pillow-compatible. Based on a patch from Mihai Moldovan.

Modified Paths:
--------------
    trunk/dports/python/py-opengl/Portfile

Added Paths:
-----------
    trunk/dports/python/py-opengl/files/
    trunk/dports/python/py-opengl/files/pillow-compat.diff

Modified: trunk/dports/python/py-opengl/Portfile
===================================================================
--- trunk/dports/python/py-opengl/Portfile	2014-07-11 21:10:41 UTC (rev 121941)
+++ trunk/dports/python/py-opengl/Portfile	2014-07-11 22:26:14 UTC (rev 121942)
@@ -35,8 +35,9 @@
     if {${python.version} >= 30} {
         depends_lib-append port:py${python.version}-Pillow
     } else {
-        depends_lib-append port:py${python.version}-pil
+        depends_lib-append path:${python.pkgd}/PIL:py${python.version}-Pillow
     }
+    patchfiles      pillow-compat.diff
     test.run        yes
     livecheck.type  none
 } else {

Added: trunk/dports/python/py-opengl/files/pillow-compat.diff
===================================================================
--- trunk/dports/python/py-opengl/files/pillow-compat.diff	                        (rev 0)
+++ trunk/dports/python/py-opengl/files/pillow-compat.diff	2014-07-11 22:26:14 UTC (rev 121942)
@@ -0,0 +1,15 @@
+--- tests/test_core.py.old	2014-07-10 20:45:04.000000000 +0200
++++ tests/test_core.py	2014-07-10 20:45:38.000000000 +0200
+@@ -371,10 +371,10 @@
+             gluTessEndContour(tobj); 
+             gluTessEndPolygon(tobj);
+         def test_texture( self ):
+-            """Test texture (requires OpenGLContext and PIL)"""
++            """Test texture (requires OpenGLContext and PIL or Pillow)"""
+             try:
+                 from OpenGLContext import texture
+-                import Image 
++                from PIL import Image
+                 from OpenGL.GLUT import glutSolidTeapot
+             except ImportError as err:
+                 pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140711/9b80f734/attachment.html>


More information about the macports-changes mailing list