[122358] trunk/dports/python

petr at macports.org petr at macports.org
Mon Jul 21 08:23:53 PDT 2014


Revision: 122358
          https://trac.macports.org/changeset/122358
Author:   petr at macports.org
Date:     2014-07-21 08:23:53 -0700 (Mon, 21 Jul 2014)
Log Message:
-----------
py-aplpy py-psychopy: switch from py*-pil to path-based dependency, ticket #44285

Modified Paths:
--------------
    trunk/dports/python/py-aplpy/Portfile
    trunk/dports/python/py-psychopy/Portfile

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

Modified: trunk/dports/python/py-aplpy/Portfile
===================================================================
--- trunk/dports/python/py-aplpy/Portfile	2014-07-21 15:16:46 UTC (rev 122357)
+++ trunk/dports/python/py-aplpy/Portfile	2014-07-21 15:23:53 UTC (rev 122358)
@@ -6,7 +6,7 @@
 
 name                py-aplpy
 version             0.9.11
-maintainers         robitaille stsci.edu:mperrin
+maintainers         robitaille stsci.edu:mperrin openmaintainer
 
 categories-append   science
 description         The Astronomical Plotting Library in Python
@@ -36,11 +36,7 @@
                         port:py${python.version}-astropy
 
     variant rgb description {Include support for RGB images} {
-        if {${python.version} >= 31} {
-            depends_run-append  port:py${python.version}-Pillow
-        } else {
-            depends_run-append  port:py${python.version}-pil
-        }
+            depends_run-append  path:${python.pkgd}/PIL:py${python.version}-Pillow
     }
 
     variant avm description {Include support for AVM meta-data} {

Modified: trunk/dports/python/py-psychopy/Portfile
===================================================================
--- trunk/dports/python/py-psychopy/Portfile	2014-07-21 15:16:46 UTC (rev 122357)
+++ trunk/dports/python/py-psychopy/Portfile	2014-07-21 15:23:53 UTC (rev 122358)
@@ -6,9 +6,10 @@
 
 name                    py-psychopy
 version                 1.64.00
+revision                1
 platforms               darwin
 supported_archs         noarch
-maintainers             jameskyle
+maintainers             jameskyle openmaintainer
 
 set gproject            PsychoPy
 
@@ -23,9 +24,9 @@
 if {${name} ne ${subport}} {
     depends_lib         port:py${python.version}-setuptools \
                         port:py${python.version}-matplotlib \
-                        port:py${python.version}-pil \
                         port:py${python.version}-scipy \
-                        port:py${python.version}-pyglet
+                        port:py${python.version}-pyglet \
+                        path:${python.pkgd}/PIL:py${python.version}-Pillow
 
     livecheck.type      none
 }
@@ -35,5 +36,6 @@
                         sha1    2049c4ea83b747d7026124ab7e432e3fd4581a6d \
                         rmd160  85591572f1335984b09b2d4170b6ef9de458f0c2
 
+patchfiles              patch-pillow-compat.diff
 
 livecheck.regex         ${gproject}-(\[0-9.\]+)\\.zip

Added: trunk/dports/python/py-psychopy/files/patch-pillow-compat.diff
===================================================================
--- trunk/dports/python/py-psychopy/files/patch-pillow-compat.diff	                        (rev 0)
+++ trunk/dports/python/py-psychopy/files/patch-pillow-compat.diff	2014-07-21 15:23:53 UTC (rev 122358)
@@ -0,0 +1,67 @@
+--- psychopy/filters.py.old	2014-07-10 21:31:51.000000000 +0200
++++ psychopy/filters.py	2014-07-10 21:32:03.000000000 +0200
+@@ -8,7 +8,7 @@
+ 
+ import numpy
+ from numpy.fft import fft2, ifft2, fftshift, ifftshift
+-import Image
++from PIL import Image
+ from psychopy import log
+ 
+ def makeGrating(res,
+--- psychopy/makeMovies.py.old	2014-07-10 21:31:51.000000000 +0200
++++ psychopy/makeMovies.py	2014-07-10 21:32:24.000000000 +0200
+@@ -11,7 +11,7 @@
+ """
+ from psychopy import log
+ import string, time, tempfile, os, glob
+-import Image, ImageChops
++from PIL import Image, ImageChops
+ from GifImagePlugin import getheader, getdata #part of PIL
+ try: 
+     import pymedia.video.vcodec as vcodec
+@@ -390,4 +390,4 @@
+         #would be nice also to remove self._movTmpFileName, but this fouls up movie writing (even deleting afterwards!?)
+         files=glob.glob(os.path.join(tmpFolder,'*.psychopyTmp.png'))
+         for thisFile in files:
+-            os.remove(thisFile)
+\ No newline at end of file
++            os.remove(thisFile)
+--- psychopy/misc.py.old	2014-07-10 21:31:51.000000000 +0200
++++ psychopy/misc.py	2014-07-10 21:33:00.000000000 +0200
+@@ -10,7 +10,8 @@
+ import monitors
+ 
+ import os, shutil
+-import Image, cPickle
++from PIL import Image
++import cPickle
+ #from random import shuffle #this is core python dist
+ 
+ def toFile(filename, data):
+--- psychopy/tests/utils.py.old	2014-07-10 21:31:51.000000000 +0200
++++ psychopy/tests/utils.py	2014-07-10 21:33:24.000000000 +0200
+@@ -1,4 +1,4 @@
+-import Image
++from PIL import Image
+ import nose
+ import os
+ import numpy as np
+@@ -32,4 +32,4 @@
+             frame.save(filenameLocal, optimize=1)
+             print "** Saved copy of actual frame to %s **" %filenameLocal
+         assert rms<crit
+-        
+\ No newline at end of file
++        
+--- psychopy/visual.py.old	2014-07-10 21:31:51.000000000 +0200
++++ psychopy/visual.py	2014-07-10 21:33:32.000000000 +0200
+@@ -10,7 +10,7 @@
+ import psychopy.event
+ #misc must only be imported *after* event or MovieStim breaks on win32 (JWP has no idea why!)
+ import psychopy.misc
+-import Image
++from PIL import Image
+ import sys, os, platform, time, glob, copy
+ import makeMovies
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140721/18f44455/attachment.html>


More information about the macports-changes mailing list