Ticket #44285: python-pil-pillow-maintainers.diff

File python-pil-pillow-maintainers.diff, 6.6 KB (added by Ionic (Mihai Moldovan), 10 years ago)

Switch from py*-pil to path:-based dependency satisfiable by both py*-pil and py*-Pillow. Add openmaintainer to py-aplpy and py-psychopy on maintainer request. Add Pillow compat patch to py-psychopy.

  • python/py-aplpy/Portfile

    diff --git a/python/py-aplpy/Portfile b/python/py-aplpy/Portfile
    index 24170ec..5a92ac2 100644
    a b PortGroup python 1.0 
    66
    77name                py-aplpy
    88version             0.9.11
    9 maintainers         robitaille stsci.edu:mperrin
     9maintainers         robitaille stsci.edu:mperrin openmaintainer
    1010
    1111categories-append   science
    1212description         The Astronomical Plotting Library in Python
    if {${name} ne ${subport}} { 
    3636                        port:py${python.version}-astropy
    3737
    3838    variant rgb description {Include support for RGB images} {
    39         if {${python.version} >= 31} {
    40             depends_run-append  port:py${python.version}-Pillow
    41         } else {
    42             depends_run-append  port:py${python.version}-pil
    43         }
     39            depends_run-append  path:${python.pkgd}/PIL:py${python.version}-Pillow
    4440    }
    4541
    4642    variant avm description {Include support for AVM meta-data} {
  • python/py-psychopy/Portfile

    diff --git a/python/py-psychopy/Portfile b/python/py-psychopy/Portfile
    index 14314c4..210baa8 100644
    a b PortGroup python 1.0 
    66
    77name                    py-psychopy
    88version                 1.64.00
     9revision                1
    910platforms               darwin
    1011supported_archs         noarch
    11 maintainers             jameskyle
     12maintainers             jameskyle openmaintainer
    1213
    1314set gproject            PsychoPy
    1415
    python.versions 26 
    2324if {${name} ne ${subport}} {
    2425    depends_lib         port:py${python.version}-setuptools \
    2526                        port:py${python.version}-matplotlib \
    26                         port:py${python.version}-pil \
     27                        path:${python.pkgd}/PIL:py${python.version}-Pillow \
    2728                        port:py${python.version}-scipy \
    2829                        port:py${python.version}-pyglet
    2930
    checksums md5 645c7218b088588813fb8315900c09a1 \ 
    3536                        sha1    2049c4ea83b747d7026124ab7e432e3fd4581a6d \
    3637                        rmd160  85591572f1335984b09b2d4170b6ef9de458f0c2
    3738
     39patchfiles              patch-pillow-compat.diff
    3840
    3941livecheck.regex         ${gproject}-(\[0-9.\]+)\\.zip
  • new file python/py-psychopy/files/patch-pillow-compat.diff

    diff --git a/python/py-psychopy/files/patch-pillow-compat.diff b/python/py-psychopy/files/patch-pillow-compat.diff
    new file mode 100644
    index 0000000..ce27a69
    - +  
     1--- psychopy/filters.py.old     2014-07-10 21:31:51.000000000 +0200
     2+++ psychopy/filters.py 2014-07-10 21:32:03.000000000 +0200
     3@@ -8,7 +8,7 @@
     4 
     5 import numpy
     6 from numpy.fft import fft2, ifft2, fftshift, ifftshift
     7-import Image
     8+from PIL import Image
     9 from psychopy import log
     10 
     11 def makeGrating(res,
     12--- psychopy/makeMovies.py.old  2014-07-10 21:31:51.000000000 +0200
     13+++ psychopy/makeMovies.py      2014-07-10 21:32:24.000000000 +0200
     14@@ -11,7 +11,7 @@
     15 """
     16 from psychopy import log
     17 import string, time, tempfile, os, glob
     18-import Image, ImageChops
     19+from PIL import Image, ImageChops
     20 from GifImagePlugin import getheader, getdata #part of PIL
     21 try:
     22     import pymedia.video.vcodec as vcodec
     23@@ -390,4 +390,4 @@
     24         #would be nice also to remove self._movTmpFileName, but this fouls up movie writing (even deleting afterwards!?)
     25         files=glob.glob(os.path.join(tmpFolder,'*.psychopyTmp.png'))
     26         for thisFile in files:
     27-            os.remove(thisFile)
     28\ No newline at end of file
     29+            os.remove(thisFile)
     30--- psychopy/misc.py.old        2014-07-10 21:31:51.000000000 +0200
     31+++ psychopy/misc.py    2014-07-10 21:33:00.000000000 +0200
     32@@ -10,7 +10,8 @@
     33 import monitors
     34 
     35 import os, shutil
     36-import Image, cPickle
     37+from PIL import Image
     38+import cPickle
     39 #from random import shuffle #this is core python dist
     40 
     41 def toFile(filename, data):
     42--- psychopy/tests/utils.py.old 2014-07-10 21:31:51.000000000 +0200
     43+++ psychopy/tests/utils.py     2014-07-10 21:33:24.000000000 +0200
     44@@ -1,4 +1,4 @@
     45-import Image
     46+from PIL import Image
     47 import nose
     48 import os
     49 import numpy as np
     50@@ -32,4 +32,4 @@
     51             frame.save(filenameLocal, optimize=1)
     52             print "** Saved copy of actual frame to %s **" %filenameLocal
     53         assert rms<crit
     54-       
     55\ No newline at end of file
     56+       
     57--- psychopy/visual.py.old      2014-07-10 21:31:51.000000000 +0200
     58+++ psychopy/visual.py  2014-07-10 21:33:32.000000000 +0200
     59@@ -10,7 +10,7 @@
     60 import psychopy.event
     61 #misc must only be imported *after* event or MovieStim breaks on win32 (JWP has no idea why!)
     62 import psychopy.misc
     63-import Image
     64+from PIL import Image
     65 import sys, os, platform, time, glob, copy
     66 import makeMovies
     67 
  • python/py-pyphant-imageprocessing/Portfile

    diff --git a/python/py-pyphant-imageprocessing/Portfile b/python/py-pyphant-imageprocessing/Portfile
    index 5107531..9c46983 100644
    a b python.versions 26 27 
    3636if {${name} ne ${subport}} {
    3737    depends_build       port:py${python.version}-setuptools
    3838    depends_lib         port:py${python.version}-pyphant \
    39                         port:py${python.version}-pil \
     39                        path:${python.pkgd}/PIL:py${python.version}-Pillow \
    4040                        port:py${python.version}-numpy \
    4141                        port:py${python.version}-scipy
    4242}
  • python/py-pyphant-osc/Portfile

    diff --git a/python/py-pyphant-osc/Portfile b/python/py-pyphant-osc/Portfile
    index e9890f3..e660e63 100644
    a b long_description This Toolbox offers various workers for the \ 
    2121homepage            http://www.fmf.uni-freiburg.de/service/servicegruppen/sg_wissinfo/projekte/Pyphant
    2222
    2323platforms           darwin
    24 # depends_lib         port:py26-pil
     24# depends_lib         path:${python.pkgd}/PIL:py${python.version}-Pillow
    2525
    2626master_sites        sourceforge:pyphant
    2727#master_sites        http://pyphant.sourceforge.net/nightly-builds/
  • python/py-pyphant-tools/Portfile

    diff --git a/python/py-pyphant-tools/Portfile b/python/py-pyphant-tools/Portfile
    index 9d2c57b..069356d 100644
    a b long_description This toolbox currently provides two workers for the \ 
    2121homepage            http://www.fmf.uni-freiburg.de/service/servicegruppen/sg_wissinfo/projekte/Pyphant
    2222
    2323platforms           darwin
    24 # depends_lib         port:py26-pil
     24# depends_lib         path:${python.pkgd}/PIL:py${python.version}-Pillow
    2525
    2626master_sites        sourceforge:pyphant
    2727# master_sites        http://pyphant.sourceforge.net/nightly-builds/