comix-4.0.4-pillow.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. From 9d31aa97c8bcc7828e6d04ec4375a75a9bf06836 Mon Sep 17 00:00:00 2001
  2. From: Alexandre Rostovtsev <tetromino@gentoo.org>
  3. Date: Sun, 16 Jun 2013 13:36:08 -0400
  4. Subject: [PATCH] Update PIL import statements for compatibility with Pillow
  5. (PIL-2)
  6. https://bugs.gentoo.org/show_bug.cgi?id=471522
  7. ---
  8. install.py | 2 +-
  9. mime/comicthumb | 2 +-
  10. src/comix.py | 2 +-
  11. src/histogram.py | 6 +++---
  12. src/image.py | 8 ++++----
  13. src/library.py | 4 ++--
  14. src/thumbbar.py | 4 ++--
  15. src/thumbnail.py | 2 +-
  16. src/thumbremover.py | 2 +-
  17. 9 files changed, 16 insertions(+), 16 deletions(-)
  18. diff --git a/install.py b/install.py
  19. index f8be7cb..d72d8d1 100755
  20. --- a/install.py
  21. +++ b/install.py
  22. @@ -240,7 +240,7 @@ def check_dependencies():
  23. print ' !!! PyGTK .................... Not found'
  24. required_found = False
  25. try:
  26. - import Image
  27. + from PIL import Image
  28. assert Image.VERSION >= '1.1.5'
  29. print ' Python Imaging Library ....... OK'
  30. except ImportError:
  31. diff --git a/mime/comicthumb b/mime/comicthumb
  32. index 1081dac..a3e6a83 100755
  33. --- a/mime/comicthumb
  34. +++ b/mime/comicthumb
  35. @@ -22,7 +22,7 @@ import tarfile
  36. import subprocess
  37. try:
  38. - import Image
  39. + from PIL import Image
  40. except ImportError:
  41. print '! Could not import the Image module (PIL).'
  42. print __doc__
  43. diff --git a/src/comix.py b/src/comix.py
  44. index f3f9e1b..ebc73e9 100755
  45. --- a/src/comix.py
  46. +++ b/src/comix.py
  47. @@ -51,7 +51,7 @@ except ImportError:
  48. sys.exit(1)
  49. try:
  50. - import Image
  51. + from PIL import Image
  52. assert Image.VERSION >= '1.1.5'
  53. except AssertionError:
  54. print "You don't have the required version of the Python Imaging",
  55. diff --git a/src/histogram.py b/src/histogram.py
  56. index e9fc68d..42ac9b8 100644
  57. --- a/src/histogram.py
  58. +++ b/src/histogram.py
  59. @@ -1,9 +1,9 @@
  60. """histogram.py - Draw histograms (RGB) from pixbufs."""
  61. import gtk
  62. -import Image
  63. -import ImageDraw
  64. -import ImageOps
  65. +from PIL import Image
  66. +from PIL import ImageDraw
  67. +from PIL import ImageOps
  68. import image
  69. diff --git a/src/image.py b/src/image.py
  70. index 0603f0a..db51525 100644
  71. --- a/src/image.py
  72. +++ b/src/image.py
  73. @@ -1,10 +1,10 @@
  74. """image.py - Various image manipulations."""
  75. import gtk
  76. -import Image
  77. -import ImageEnhance
  78. -import ImageOps
  79. -import ImageStat
  80. +from PIL import Image
  81. +from PIL import ImageEnhance
  82. +from PIL import ImageOps
  83. +from PIL import ImageStat
  84. from preferences import prefs
  85. diff --git a/src/library.py b/src/library.py
  86. index a4fc29b..e14a197 100644
  87. --- a/src/library.py
  88. +++ b/src/library.py
  89. @@ -8,8 +8,8 @@ from xml.sax.saxutils import escape as xmlescape
  90. import gtk
  91. import gobject
  92. import pango
  93. -import Image
  94. -import ImageDraw
  95. +from PIL import Image
  96. +from PIL import ImageDraw
  97. import archive
  98. import encoding
  99. diff --git a/src/thumbbar.py b/src/thumbbar.py
  100. index ba4b94c..0a4c33f 100644
  101. --- a/src/thumbbar.py
  102. +++ b/src/thumbbar.py
  103. @@ -4,8 +4,8 @@ import urllib
  104. import gtk
  105. import gobject
  106. -import Image
  107. -import ImageDraw
  108. +from PIL import Image
  109. +from PIL import ImageDraw
  110. import image
  111. from preferences import prefs
  112. diff --git a/src/thumbnail.py b/src/thumbnail.py
  113. index 25f333e..b565162 100644
  114. --- a/src/thumbnail.py
  115. +++ b/src/thumbnail.py
  116. @@ -15,7 +15,7 @@ import shutil
  117. import tempfile
  118. import gtk
  119. -import Image
  120. +from PIL import Image
  121. import archive
  122. import constants
  123. diff --git a/src/thumbremover.py b/src/thumbremover.py
  124. index fc2fa37..03aa6e6 100644
  125. --- a/src/thumbremover.py
  126. +++ b/src/thumbremover.py
  127. @@ -7,7 +7,7 @@ import urllib
  128. import gtk
  129. import pango
  130. -import Image
  131. +from PIL import Image
  132. import encoding
  133. import labels
  134. --
  135. 1.8.2.1