From 362952ac8741a7f44b8176de3e7b15fbb8fae0b1 Mon Sep 17 00:00:00 2001 From: pjotrp Date: Thu, 25 Feb 2016 09:28:24 +0000 Subject: Add older version of python-pil --- gn/packages/python.scm | 86 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 15 deletions(-) (limited to 'gn') diff --git a/gn/packages/python.scm b/gn/packages/python.scm index 8f2bc80..61d186b 100644 --- a/gn/packages/python.scm +++ b/gn/packages/python.scm @@ -357,23 +357,79 @@ project)") (description #f) (license #f))) -(define-public python2-piddle +(define-public python2-pil-1.1.6 (package - (name "python2-piddle") - (version "1.0.15") + (name "python2-pil") + (version "1.1.6") (source - (origin - (method url-fetch) - (uri (string-append - ;; http://sourceforge.net/projects/numpy/files/Old%20Numarray/1.5.2/numarray-1.5.2.tar.gz/download - "mirror://sourceforge/piddle/piddle-" version ".zip" - )) - ;; (file-name (string-append name "-" version ".zip")) - (sha256 - (base32 - "0jaxfsrcgqb5cf2wznxnpdws5khlrdixmg85lrhq2zl9cy6dfdya")))) - (native-inputs - `(("unzip" ,unzip))) + (origin + (method url-fetch) + (uri (string-append + "http://effbot.org/downloads/Imaging-" + version ".tar.gz")) + (sha256 + (base32 + "141zidl3s9v4vfi3nsbg42iq1lc2a932gprqr1kij5hrnn53bmvx")) + (modules '((guix build utils))) + (snippet + ;; Adapt to newer freetype. As the package is unmaintained upstream, + ;; there is no use in creating a patch and reporting it. + '(substitute* "_imagingft.c" + (("freetype/") + "freetype2/"))))) + (build-system python-build-system) + (inputs + `(("freetype" ,freetype) + ("libjpeg" ,libjpeg) + ("libtiff" ,libtiff) + ("python-setuptools" ,python-setuptools) + ("zlib" ,zlib))) + (arguments + ;; Only the fork python-pillow works with Python 3. + `(#:python ,python-2 + #:tests? #f ; no check target + #:phases + (alist-cons-before + 'build 'configure + ;; According to README and setup.py, manual configuration is + ;; the preferred way of "searching" for inputs. + ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter. + (lambda* (#:key inputs #:allow-other-keys) + (let ((jpeg (assoc-ref inputs "libjpeg")) + (zlib (assoc-ref inputs "zlib")) + (tiff (assoc-ref inputs "libtiff")) + (freetype (assoc-ref inputs "freetype"))) + (substitute* "setup.py" + (("JPEG_ROOT = None") + (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")")) + (("ZLIB_ROOT = None") + (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")")) + (("TIFF_ROOT = None") + (string-append "TIFF_ROOT = libinclude(\"" tiff "\")")) + (("FREETYPE_ROOT = None") + (string-append "FREETYPE_ROOT = libinclude(\"" + freetype "\")"))))) + %standard-phases))) + (home-page "http://www.pythonware.com/products/pil/") + (synopsis "Python Imaging Library") + (description "The Python Imaging Library (PIL) adds image processing +capabilities to the Python interpreter.") + (license (license:x11-style + "file://README" + "See 'README' in the distribution.")))) + +(define-public python2-piddle-gn + (package + (name "python2-piddle") + (version "1.0.15-gn") + (source (origin + (method url-fetch) + (uri (string-append + "http://files.genenetwork.org/software/contrib/piddle-" +version "-gn.tgz")) + (sha256 + (base32 + "0yl6frmhy94cmwzdks7ndc7nzh1ml2a4ch86gz2l7wcwpxjhwgmk")))) (build-system python-build-system) ;; (native-inputs -- cgit v1.2.3