[122800] trunk/dports/python/py-pyphant

rowue at macports.org rowue at macports.org
Wed Jul 30 03:34:35 PDT 2014


Revision: 122800
          https://trac.macports.org/changeset/122800
Author:   rowue at macports.org
Date:     2014-07-30 03:34:35 -0700 (Wed, 30 Jul 2014)
Log Message:
-----------
py-pyphant: replace PIL dependency by Pillow in imageprocessing subport (see #44472)

The py??-pil dependency in py??-pyphant-imageprocessing
is replaced by py??-Pillow.
The changed dependency is also patched in the source in the setup.py script
and in the requires.txt file in the egg-info folder.

A new fallback variant (pil) is automatically added as default,
when py??-pil is still active.

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

Added Paths:
-----------
    trunk/dports/python/py-pyphant/files/Pillow_patch-pyphant.imageprocessing.egg-info-requires.txt.diff
    trunk/dports/python/py-pyphant/files/Pillow_patch-setup.py.diff

Modified: trunk/dports/python/py-pyphant/Portfile
===================================================================
--- trunk/dports/python/py-pyphant/Portfile	2014-07-30 07:04:12 UTC (rev 122799)
+++ trunk/dports/python/py-pyphant/Portfile	2014-07-30 10:34:35 UTC (rev 122800)
@@ -141,11 +141,26 @@
         distname            ${distname}.imageprocessing-${version}
         checksums           rmd160  e4d160989c0e5b07528577052dd451b47828a7d4 \
                             sha256  9e1619cf3abbe94ce785b9b5b02383b5a31f9ba2ef0bc75922c785195620229f
+        revision            2
 
         # numpy and scipy are already dependencies of pyphant
-        depends_lib-append  port:py${python.version}-pil \
+        depends_lib-append  port:py${python.version}-Pillow \
                             port:py${python.version}-numpy \
                             port:py${python.version}-scipy
+
+        patchfiles          Pillow_patch-setup.py.diff \
+                            Pillow_patch-pyphant.imageprocessing.egg-info-requires.txt.diff
+
+        variant pil description {Use PIL instead of Pillow as the imaging library} {
+            depends_lib-replace    port:py${python.version}-Pillow port:py${python.version}-pil
+
+            patchfiles-delete      Pillow_patch-setup.py.diff
+            patchfiles-delete      Pillow_patch-pyphant.imageprocessing.egg-info-requires.txt.diff
+        }
+
+        if {![catch {set pil_installed [lindex [registry_active py${python.version}-pil] 0]}]} {
+            default_variants    +pil
+        }
     }
 
     subport py${python.vers}-${distname}-osc {

Added: trunk/dports/python/py-pyphant/files/Pillow_patch-pyphant.imageprocessing.egg-info-requires.txt.diff
===================================================================
--- trunk/dports/python/py-pyphant/files/Pillow_patch-pyphant.imageprocessing.egg-info-requires.txt.diff	                        (rev 0)
+++ trunk/dports/python/py-pyphant/files/Pillow_patch-pyphant.imageprocessing.egg-info-requires.txt.diff	2014-07-30 10:34:35 UTC (rev 122800)
@@ -0,0 +1,9 @@
+--- pyphant.imageprocessing.egg-info/requires.txt.orig	2014-02-24 19:00:45.000000000 +0100
++++ pyphant.imageprocessing.egg-info/requires.txt	2014-07-30 11:15:48.000000000 +0200
+@@ -1,4 +1,4 @@
+ pyphant>=1.0b3
+-PIL
++Pillow
+ numpy
+ scipy
+\ No newline at end of file

Added: trunk/dports/python/py-pyphant/files/Pillow_patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-pyphant/files/Pillow_patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py-pyphant/files/Pillow_patch-setup.py.diff	2014-07-30 10:34:35 UTC (rev 122800)
@@ -0,0 +1,11 @@
+--- setup.py.orig	2014-02-24 18:49:04.000000000 +0100
++++ setup.py	2014-07-30 11:06:06.000000000 +0200
+@@ -25,7 +25,7 @@
+     description=__doc__,
+     install_requires=[
+         'pyphant>=1.0b3',
+-        'PIL',
++        'Pillow',
+         'numpy',
+         'scipy',
+         ],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140730/27ec4695/attachment.html>


More information about the macports-changes mailing list