From 936cbf0156a27cd60adfd3143d257d6745f531c6 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 02:12:48 -0500 Subject: gn: move python2.4 to its own module --- gn/packages/python24.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 gn/packages/python24.scm (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm new file mode 100644 index 0000000..720694d --- /dev/null +++ b/gn/packages/python24.scm @@ -0,0 +1,51 @@ +(define-module (gn packages python24) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (gnu packages python) + #:use-module (srfi srfi-1)) + +;; TODO: Check against 'guix lint -c cve python2.4' list: +;; CVE-2019-9740, CVE-2019-9947, CVE-2019-9948, CVE-2018-1060, CVE-2018-1061, +;; CVE-2014-9365, CVE-2012-0845, CVE-2012-1150, CVE-2011-1521, CVE-2011-4940, +;; CVE-2010-3492, CVE-2008-5031, CVE-2008-5983 +(define-public python-2.4 + (package + (inherit python-2) + (name "python2.4") + (version "2.4.6") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.bz2")) + (sha256 + (base32 + "021y88a4ki07dgq19yhg6zfvmncfiz7h5b2255438i9zmlwl246s")))) + (outputs '("out")) + (arguments + (substitute-keyword-arguments (package-arguments python-2) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'check 'delete-failing-test + (lambda _ + (delete-file "Lib/test/test_socket.py") + #t)) + (add-after 'check 'find-netinet-in-h + (lambda* (#:key inputs #:allow-other-keys) + (let ((glibc (assoc-ref inputs "libc"))) + (substitute* (find-files "Lib/plat-generic" ".*") + (("/usr/include/netinet/in.h") + (string-append glibc "/include/netinet/in.h"))) + #t))) + (delete 'move-tk-inter))))) + ;; Remove the inputs which are not found during building/testing: + (inputs + `(,@(fold alist-delete (package-inputs python-2) + '("bzip2" "gdbm" "tk" "openssl" "zlib")))) + (native-search-paths + (list (search-path-specification + (variable "PYTHONPATH") + (files '("lib/python2.4/site-packages"))))) + (properties '((cpe-name . "python"))))) -- cgit v1.2.3 From 5bb2c01f50dd376cfa8f4c685025008a37f79188 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 11:52:34 -0500 Subject: gn: python24: Link to other libraries. --- gn/packages/python24.scm | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 720694d..6a5612e 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -28,9 +28,29 @@ (substitute-keyword-arguments (package-arguments python-2) ((#:phases phases) `(modify-phases ,phases - (add-before 'check 'delete-failing-test + (add-after 'unpack 'create-setup-local + (lambda* (#:key inputs #:allow-other-keys) + (let ((zlib (assoc-ref inputs "zlib")) + (tcl (assoc-ref inputs "tcl")) + (tk (assoc-ref inputs "tk")) + (gdbm (assoc-ref inputs "gdbm")) + (read (assoc-ref inputs "readline")) + (ssl (assoc-ref inputs "openssl"))) + (with-output-to-file "Modules/Setup.local" + (lambda _ + (format #t "readline readline.c -I~a/include -L~a/lib -lreadline~@ + _ssl _ssl.c -DUSE_SSL -I$~a/include/openssl -L~a/lib -lssl -lcrypto~@ + _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -L~a/lib -I~a/include -L~a/lib -I~a/include -ltk~a -ltcl~a~@ + gdbm gdbmmodule.c -I~a/include -L~a/lib -lgdbm~@ + zlib zlibmodule.c -I~a/include -L~a/lib -lz~%" +read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(version-major+minor (package-version tcl)) gdbm gdbm zlib zlib)))) + #t)) + (add-before 'check 'delete-failing-tests (lambda _ - (delete-file "Lib/test/test_socket.py") + (for-each + (lambda (file) + (delete-file (string-append "Lib/test/" file))) + '("test_socket.py" "test_anydbm.py" "test_whichdb.py" "test_zlib.py")) #t)) (add-after 'check 'find-netinet-in-h (lambda* (#:key inputs #:allow-other-keys) @@ -40,10 +60,6 @@ (string-append glibc "/include/netinet/in.h"))) #t))) (delete 'move-tk-inter))))) - ;; Remove the inputs which are not found during building/testing: - (inputs - `(,@(fold alist-delete (package-inputs python-2) - '("bzip2" "gdbm" "tk" "openssl" "zlib")))) (native-search-paths (list (search-path-specification (variable "PYTHONPATH") -- cgit v1.2.3 From 7d7f7dba9b57ff029f19b71448659ba2fd25800a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 11:53:31 -0500 Subject: gn: prepare to package with python2.4. --- gn/packages/python24.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 6a5612e..4508409 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -3,7 +3,11 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system python) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages tcl) #:use-module (srfi srfi-1)) ;; TODO: Check against 'guix lint -c cve python2.4' list: @@ -65,3 +69,19 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v (variable "PYTHONPATH") (files '("lib/python2.4/site-packages"))))) (properties '((cpe-name . "python"))))) + +(define (default-python2.4) + "Return the default Python-2.4 package." + ;; Lazily resolve the binding. + (let ((python (resolve-interface '(gn packages python24)))) + (module-ref python 'python-2.4))) + +(define package-with-python24 + ((@@ (guix build-system python) package-with-explicit-python) (delay (default-python2.4)) + "python-" "python24-" + #:variant-property 'python24-variant)) + +(define (strip-python24-variant p) + (package + (inherit p) + (properties (alist-delete 'python24-variant (package-properties p))))) -- cgit v1.2.3 From 5c101108581aaa2dc5595f25b10a4ece6d953ea8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 11:54:02 -0500 Subject: gn: Add python24-setuptools. --- gn/packages/python24.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 4508409..55027a2 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -85,3 +85,19 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v (package (inherit p) (properties (alist-delete 'python24-variant (package-properties p))))) + +(define-public python24-setuptools + (package + (inherit python-setuptools) + (name "python24-setuptools") + (version "1.4.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "setuptools" version)) + (sha256 + (base32 + "1gfvalhvzcskwj85r3lh9sx190f8k807vz5zln8agaw31ak8cf96")))) + (arguments + `(#:python ,python-2.4 + #:tests? #f)))) ; skip the tests -- cgit v1.2.3 From 04ab1dc462fced3994038be733791aac5351bd74 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 11:54:26 -0500 Subject: gn: Add python24-htmlgen. --- gn/packages/python24.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 55027a2..e9c8798 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -86,6 +86,31 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v (inherit p) (properties (alist-delete 'python24-variant (package-properties p))))) +(define-public python24-htmlgen + (package + (name "python24-htmlgen") + (version "0.9") + ;(version "0.99") + (source + (origin + (method url-fetch) + (uri (pypi-uri "htmlgen" version)) + (sha256 + (base32 + "14xzjgwdqgs1vs5mq7mg3w48snvgb77yywv64mg8k6qhapmnafdw")))) + ;"1kbn6jcbf2mpb9f8hm5gcsipy7habqrq4794lpdbzm5mqxlclmnl")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4)) + (native-inputs + `(("python24-setuptools" ,python24-setuptools))) + (propagated-inputs + `(("python24-asserts" ,python24-asserts))) + (home-page "https://github.com/srittau/python-htmlgen") + (synopsis "Python HTML 5 Generator") + (description "Python-htmlgen is a library to generate HTML from classes.") + (license license:expat))) + (define-public python24-setuptools (package (inherit python-setuptools) -- cgit v1.2.3 From eac64d6ae88ccc04c15b2e0ddec925bbf8c43d09 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 11:54:50 -0500 Subject: gn: Add python24-asserts. --- gn/packages/python24.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index e9c8798..a44bb09 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -126,3 +126,24 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v (arguments `(#:python ,python-2.4 #:tests? #f)))) ; skip the tests + +(define-public python24-asserts + (package + (name "python24-asserts") + (version "0.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "asserts" version)) + (sha256 + (base32 + "05ffy111giwv6sqx97vzzsvcra0gxzx2ilv16gyw135v583frxbn")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4)) + (native-inputs + `(("python24-setuptools" ,python24-setuptools))) + (home-page "https://github.com/srittau/python-asserts") + (synopsis "Stand-alone Assertions for Python") + (description "Stand-alone Assertions for Python") + (license license:expat))) -- cgit v1.2.3 From 18e08e242dff51b403f209e58aa81a4233d271ff Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 11:55:05 -0500 Subject: gn: Add python24-pyx. --- gn/packages/python24.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index a44bb09..cb9fae5 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -147,3 +147,24 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v (synopsis "Stand-alone Assertions for Python") (description "Stand-alone Assertions for Python") (license license:expat))) + +(define-public python24-pyx + (package + (name "python24-pyx") + (version "0.12.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyx" version)) + (sha256 + (base32 + "13kyhqx19rw7dlv2xapdb68j8l9laq6nrpgkyd6549qwidmb4dz8")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4)) + (native-inputs + `(("python24-setuptools" ,python24-setuptools))) + (home-page "http://pyx.sourceforge.net/") + (synopsis "Python package for the generation of PostScript, PDF, and SVG files") + (description "Python package for the generation of PostScript, PDF, and SVG files") + (license license:gpl2+))) -- cgit v1.2.3 From b8b07d916af715dd6dfb81aa4b1345907b6f6fa4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 12:09:45 -0500 Subject: gn: Add python24-pyxlwriter. --- gn/packages/python24.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index cb9fae5..adc575c 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -5,6 +5,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system python) + #:use-module (gnu packages compression) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tcl) @@ -168,3 +169,29 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v (synopsis "Python package for the generation of PostScript, PDF, and SVG files") (description "Python package for the generation of PostScript, PDF, and SVG files") (license license:gpl2+))) + +(define-public python24-pyxlwriter + (package + (name "python24-pyxlwriter") + (version "0.4a3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/pyxlwriter/pyxlwriter/" + version "/pyXLWriter-" version ".zip")) + (sha256 + (base32 + "1kfsi6la9y53rwayszgayfmkjfknpp650v69a0hwd1fcfk1df735")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4)) + (native-inputs + `(("python24-setuptools" ,python24-setuptools) + ("unzip" ,unzip))) + (home-page "https://sourceforge.net/projects/pyxlwriter/") + (synopsis "Python library for generating Excel compatible spreadsheets") + (description "PyXLWriter is a Python library for generating Excel compatible +spreadsheets. It's a port of John McNamara's Perl @code{Spreadsheet::WriteExcel} +module version 1.01 to Python. It allows writing of Excel compatible +spreadsheets without the need for COM objects.") + (license license:lgpl2.1+))) -- cgit v1.2.3 From bd76831ad1c50b87e2a631daa585295df73c4ac3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 13:04:41 -0500 Subject: gn: add python24-pil. --- gn/packages/python24.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index adc575c..8ad5b6b 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -6,6 +6,9 @@ #:use-module (guix git-download) #:use-module (guix build-system python) #:use-module (gnu packages compression) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages image) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tcl) @@ -195,3 +198,71 @@ spreadsheets. It's a port of John McNamara's Perl @code{Spreadsheet::WriteExcel module version 1.01 to Python. It allows writing of Excel compatible spreadsheets without the need for COM objects.") (license license:lgpl2.1+))) + +;; TKINTER and LITTLECMS are not found +(define-public python24-pil + (package + (name "python24-pil") + (version "1.1.7") + (source + (origin + (method url-fetch) + (uri (string-append "http://effbot.org/downloads/Imaging-" + version ".tar.gz")) + (sha256 + (base32 + "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9")) + (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/freetype/"))))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'link-libraries + (lambda* (#:key inputs #:allow-other-keys) + (let ((freetype (assoc-ref inputs "freetype")) + (jpeg (assoc-ref inputs "libjpeg")) + (lcms (assoc-ref inputs "lcms")) + (tcl (assoc-ref inputs "tcl")) + (tiff (assoc-ref inputs "libtiff")) + (zlib (assoc-ref inputs "zlib"))) + (substitute* "setup.py" + (("FREETYPE_ROOT .*") + (string-append "FREETYPE_ROOT = libinclude(\"" freetype "\")\n")) + (("JPEG_ROOT .*") + (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")\n")) + (("LCMS_ROOT .*") + (string-append "LCMS_ROOT = libinclude(\"" lcms "\")\n")) + (("^TCL_ROOT .*") + (string-append "TCL_ROOT = libinclude(\"" tcl "\")\n")) + (("TIFF_ROOT .*") + (string-append "TIFF_ROOT = libinclude(\"" tiff "\")\n")) + (("ZLIB_ROOT .*") + (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")\n"))) + (substitute* '("setup.py" + "_imagingcms.c") + (("lcms.h") "lcms2.h"))) + #t))))) + (native-inputs + `(("python24-setuptools" ,python24-setuptools))) + (inputs + `(("freetype" ,freetype) + ("lcms" ,lcms) + ("libjpeg" ,libjpeg) + ("libtiff" ,libtiff) + ("tcl" ,tcl) + ("zlib" ,zlib))) + (home-page "http://www.pythonware.com/products/pil/") + (synopsis "Python Imaging Library") + (description "The @dfn{Python Imaging Library} (PIL) adds image processing +capabilities to your Python interpreter. This library supports many file +formats, and provides powerful image processing and graphics capabilities.") + (license (license:x11-style + "file://README" + "See 'README' in the distribution.")))) -- cgit v1.2.3 From 44d85ed9e538d55d7380ad3e5e3e747fc5ded9ff Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 13:38:30 -0500 Subject: gn: add python24-piddle. --- gn/packages/python24.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 8ad5b6b..3fb060d 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -266,3 +266,30 @@ formats, and provides powerful image processing and graphics capabilities.") (license (license:x11-style "file://README" "See 'README' in the distribution.")))) + +(define-public python24-piddle + (package + (name "python24-piddle") + (version "1.0.15") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/piddle/piddle/" + version "/piddle-" version ".zip")) + (sha256 + (base32 + "0jaxfsrcgqb5cf2wznxnpdws5khlrdixmg85lrhq2zl9cy6dfdya")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4)) + (native-inputs + `(("python24-setuptools" ,python24-setuptools) + ("unzip" ,unzip))) + (propagated-inputs + `(("python24-pil" ,python24-pil))) + (home-page "http://www.strout.net/info/coding/python/piddle/") + (synopsis "Plug-In Drawing, Does Little Else") + (description "PIDDLE is designed for vector graphics -- i.e., drawing of +primitives such as lines and ellipses, rather than manipulation of individual +pixels.") + (license license:gpl2+))) -- cgit v1.2.3 From 52b1d76a78aa9203d4fbdffb0ee50f66803e47e2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Jun 2019 13:54:14 -0500 Subject: gn: Add python24-simplejson. --- gn/packages/python24.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 3fb060d..56a4280 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -293,3 +293,20 @@ formats, and provides powerful image processing and graphics capabilities.") primitives such as lines and ellipses, rather than manipulation of individual pixels.") (license license:gpl2+))) + +;; Apparently this is the library which mimics python-2.6+'s json library +(define-public python24-simplejson + (let ((base (package-with-python24 python-simplejson))) + (package + (inherit base) + (version "2.0.9") ; last version to officially support python2.4 + (source + (origin + (method url-fetch) + (uri (pypi-uri "simplejson" version)) + (sha256 + (base32 + "1vlkxibal9ljabybawnqr3jh6f6g21c5pbrzl65z9vwbfxhg9kdb")))) + (native-inputs + `(("python24-setuptools" ,python24-setuptools) + ,@(package-native-inputs base)))))) -- cgit v1.2.3 From 4c2d42ffb02f40d23a7d8ff74243bbf68735c20e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 28 Jun 2019 06:31:10 -0500 Subject: gn: Add python24-numarray. --- gn/packages/python24.scm | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 56a4280..bc04f40 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -9,6 +9,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) #:use-module (gnu packages image) + #:use-module (gnu packages maths) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tcl) @@ -310,3 +311,61 @@ pixels.") (native-inputs `(("python24-setuptools" ,python24-setuptools) ,@(package-native-inputs base)))))) + +(define-public python24-numarray + (package + (name "python24-numarray") + (version "1.5.2") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/numpy/Old Numarray/" version + "/numarray-" version ".tar.gz")) + (sha256 + (base32 + "0x1i4j7yni7k4p9kjxs1lgln1psdmyrz65wp2yr35yn292iw2vbg")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (invoke "python" "setup.py" "config" "build" + "--gencode" "--use_lapack"))) + (add-after 'unpack 'find-lapack-and-openblas + (lambda* (#:key inputs #:allow-other-keys) + (let ((lapack (assoc-ref inputs "lapack")) + (blas (assoc-ref inputs "openblas"))) + (substitute* "cfg_packages.py" + (("lapack_libs = .*'m']") + "lapack_libs = ['lapack', 'openblas', 'm']\n") + (("lapack_dirs = .*") + (string-append "lapack_dirs = ['" + lapack "/lib', '" blas "/lib']\n")) + (("lapack_include_dirs = .*") + (string-append "lapack_include_dirs = ['" + lapack "/include', '" blas "/include']\n"))) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "python" "setup.py" "config" + "install" "--use_lapack" + (string-append "--prefix=" out)))))) + #:tests? #f)) ; no test target + (native-inputs + `(("python24-setuptools" ,python24-setuptools))) + (inputs + `(("lapack" ,lapack) + ("openblas" ,openblas))) + (home-page "http://www.numpy.org/") + (synopsis "Array processing of numbers, strings, records and objects") + (description "Numarray is an array processing package designed to +efficiently manipulate large multi-dimensional arrays. Numarray is modelled +after Numeric and features c-code generated from python template scripts, the +capacity to operate directly on arrays in files, and improved type promotions. +Numarray provides support for manipulating arrays consisting of numbers, +strings, records, or objects using the same basic infrastructure and syntax.") + (license license:bsd-3))) -- cgit v1.2.3 From faedb91fb2aa57e482841f18ac869223990f820b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 28 Jun 2019 06:44:52 -0500 Subject: gn: Add python24-pp. --- gn/packages/python24.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index bc04f40..5bceb2d 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -369,3 +369,28 @@ capacity to operate directly on arrays in files, and improved type promotions. Numarray provides support for manipulating arrays consisting of numbers, strings, records, or objects using the same basic infrastructure and syntax.") (license license:bsd-3))) + +(define-public python24-pp + (package + (name "python24-pp") + (version "1.6.1") + (source + (origin + (method url-fetch) + (uri (string-append + "http://www.parallelpython.com/downloads/pp/pp-" version ".zip")) + (sha256 + (base32 + "0qkxcyclz3vgwpl6xvsrg76q59dj0wwy8qx15567bafv659ypyb1")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4)) + (native-inputs + `(("python24-setuptools" ,python24-setuptools) + ("unzip" ,unzip))) + (home-page "http://www.parallelpython.com") + (synopsis "Parallel and distributed programming for Python") + (description "PP is a python module which provides mechanism for parallel +execution of python code on SMP (systems with multiple processors or cores) and +clusters (computers connected via network).") + (license license:bsd-3))) -- cgit v1.2.3 From 534d4edbbe1efcdf76262df436423dccb707ee1e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Jul 2019 09:19:53 -0500 Subject: gn: Add GN1 thirdparty packages. --- gn/packages/python24.scm | 199 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 5bceb2d..a44597f 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -394,3 +394,202 @@ strings, records, or objects using the same basic infrastructure and syntax.") execution of python code on SMP (systems with multiple processors or cores) and clusters (computers connected via network).") (license license:bsd-3))) + +(define GN1-thirdparty-sources + (origin + (method url-fetch/tarbomb) + ;; ipfs get QmTPwYT2pehdxdG1TiHEzVzLgbeuhJ4utXShuz3twA84AB + (uri "file:///gnu/store/p33a2sh3x2nhiiphdw9nly80njg6p8fi-thirdparty.tgz") + (file-name "GN1-thirdparty") + (sha256 + (base32 + "0nnp6g412hjfrcn3k2yrfb14sxv06k0149whc7qmv678nyj5zhfa")))) + +(define-public python24-json-GN1 + (package + (name "python24-json-GN1") + (version "GN1") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sitedir (string-append out "/lib/python2.4/site-packages/json/"))) + (mkdir-p sitedir) + (copy-recursively "thirdparty/json" sitedir) + #t)))))) + (home-page "") + (synopsis "") + (description "") + (license license:lgpl2.1+))) + +(define-public python24-svg-GN1 + (package + (name "python24-svg-GN1") + (version "1.0") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sitedir (string-append out "/lib/python2.4/site-packages/svg/"))) + (mkdir-p sitedir) + (copy-recursively "thirdparty/svg" sitedir) + #t)))))) + (home-page "") + (synopsis "") + (description "") + (license license:bsd-4))) + +(define-public python24-htmlgen-GN1 + (package + (name "python24-htmlgen-GN1") + (version "2.5") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sitedir (string-append out "/lib/python2.4/site-packages/htmlgen/"))) + (mkdir-p sitedir) + (copy-recursively "thirdparty/htmlgen" sitedir) + #t)))))) + (home-page "") + (synopsis "") + (description "") + (license license:bsd-2))) ; I'm not actually sure, checked HTMLgen.py + +(define-public python24-pyx-GN1 + (package + (name "python24-pyx-GN1") + (version "0.8") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sitedir (string-append out "/lib/python2.4/site-packages/pyx/"))) + (mkdir-p sitedir) + (copy-recursively "thirdparty/pyx" sitedir) + #t)))))) + (home-page "") + (synopsis "") + (description "") + (license license:gpl2+))) + +(define-public python24-pyxlwriter-GN1 + (package + (name "python24-pyxlwriter-GN1") + (version "0.4a3") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sitedir (string-append out "/lib/python2.4/site-packages/pyXLWriter/"))) + (mkdir-p sitedir) + (copy-recursively "thirdparty/pyXLWriter" sitedir) + #t)))))) + (home-page "") + (synopsis "") + (description "") + (license license:lgpl2.1+))) + +(define-public python24-pp-GN1 + (package + (name "python24-pp-GN1") + (version "1.5.7") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "thirdparty/pp-1.5.7") #t))))) + (native-inputs `(("python24-setuptools" ,python24-setuptools))) + (home-page "") + (synopsis "") + (description "") + (license license:bsd-3))) + +(define-public python24-numarray-GN1 + (package + (name "python24-numarray-GN1") + (version "1.5.2") + (source GN1-thirdparty-sources) + (build-system python-build-system) + (arguments + `(#:python ,python-2.4 + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (invoke "python" "setup.py" "config" "build" + "--gencode" "--use_lapack"))) + (add-after 'unpack 'find-lapack-and-openblas + (lambda* (#:key inputs #:allow-other-keys) + (let ((lapack (assoc-ref inputs "lapack")) + (blas (assoc-ref inputs "openblas"))) + (substitute* "cfg_packages.py" + (("lapack_libs = .*'m']") + "lapack_libs = ['lapack', 'openblas', 'm']\n") + (("lapack_dirs = .*") + (string-append "lapack_dirs = ['" + lapack "/lib', '" blas "/lib']\n")) + (("lapack_include_dirs = .*") + (string-append "lapack_include_dirs = ['" + lapack "/include', '" blas "/include']\n"))) + #t))) + (add-after 'unpack 'change-directory + (lambda _ + (chdir "thirdparty/numarray-1.5.2") + (for-each make-file-writable (find-files ".")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "python" "setup.py" "config" + "install" "--use_lapack" + (string-append "--prefix=" out)))))) + #:tests? #f)) ; no test target + (native-inputs + `(("python24-setuptools" ,python24-setuptools))) + (inputs + `(("lapack" ,lapack) + ("openblas" ,openblas))) + (home-page "") + (synopsis "") + (description "") + (license license:bsd-3))) -- cgit v1.2.3 From 6f1a1c2b4a5cbd43ff0436cd27ac9cfef51d6bdd Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Jul 2019 13:58:37 -0500 Subject: gn: python24: build without setuptools when possible --- gn/packages/python24.scm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index a44597f..b77d6ef 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -188,10 +188,11 @@ read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(v "1kfsi6la9y53rwayszgayfmkjfknpp650v69a0hwd1fcfk1df735")))) (build-system python-build-system) (arguments - `(#:python ,python-2.4)) + `(#:python ,python-2.4 + #:use-setuptools? #f + #:tests? #f)) ; no tests (native-inputs - `(("python24-setuptools" ,python24-setuptools) - ("unzip" ,unzip))) + `(("unzip" ,unzip))) (home-page "https://sourceforge.net/projects/pyxlwriter/") (synopsis "Python library for generating Excel compatible spreadsheets") (description "PyXLWriter is a Python library for generating Excel compatible @@ -223,6 +224,8 @@ spreadsheets without the need for COM objects.") (build-system python-build-system) (arguments `(#:python ,python-2.4 + #:use-setuptools? #f + #:tests? #f ; no tests #:phases (modify-phases %standard-phases (add-after 'unpack 'link-libraries @@ -250,8 +253,6 @@ spreadsheets without the need for COM objects.") "_imagingcms.c") (("lcms.h") "lcms2.h"))) #t))))) - (native-inputs - `(("python24-setuptools" ,python24-setuptools))) (inputs `(("freetype" ,freetype) ("lcms" ,lcms) @@ -282,10 +283,11 @@ formats, and provides powerful image processing and graphics capabilities.") "0jaxfsrcgqb5cf2wznxnpdws5khlrdixmg85lrhq2zl9cy6dfdya")))) (build-system python-build-system) (arguments - `(#:python ,python-2.4)) + `(#:python ,python-2.4 + #:use-setuptools? #f + #:tests? #f)) ; tests are interactive (native-inputs - `(("python24-setuptools" ,python24-setuptools) - ("unzip" ,unzip))) + `(("unzip" ,unzip))) (propagated-inputs `(("python24-pil" ,python24-pil))) (home-page "http://www.strout.net/info/coding/python/piddle/") @@ -328,6 +330,7 @@ pixels.") (build-system python-build-system) (arguments `(#:python ,python-2.4 + #:use-setuptools? #f #:phases (modify-phases %standard-phases (replace 'build @@ -355,8 +358,6 @@ pixels.") "install" "--use_lapack" (string-append "--prefix=" out)))))) #:tests? #f)) ; no test target - (native-inputs - `(("python24-setuptools" ,python24-setuptools))) (inputs `(("lapack" ,lapack) ("openblas" ,openblas))) @@ -384,10 +385,11 @@ strings, records, or objects using the same basic infrastructure and syntax.") "0qkxcyclz3vgwpl6xvsrg76q59dj0wwy8qx15567bafv659ypyb1")))) (build-system python-build-system) (arguments - `(#:python ,python-2.4)) + `(#:python ,python-2.4 + #:use-setuptools? #f + #:tests? #f)) ; no tests (native-inputs - `(("python24-setuptools" ,python24-setuptools) - ("unzip" ,unzip))) + `(("unzip" ,unzip))) (home-page "http://www.parallelpython.com") (synopsis "Parallel and distributed programming for Python") (description "PP is a python module which provides mechanism for parallel @@ -533,12 +535,13 @@ clusters (computers connected via network).") (build-system python-build-system) (arguments `(#:python ,python-2.4 + #:use-setuptools? #f + #:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'change-directory (lambda _ (chdir "thirdparty/pp-1.5.7") #t))))) - (native-inputs `(("python24-setuptools" ,python24-setuptools))) (home-page "") (synopsis "") (description "") @@ -552,6 +555,7 @@ clusters (computers connected via network).") (build-system python-build-system) (arguments `(#:python ,python-2.4 + #:use-setuptools? #f #:phases (modify-phases %standard-phases (replace 'build @@ -584,8 +588,6 @@ clusters (computers connected via network).") "install" "--use_lapack" (string-append "--prefix=" out)))))) #:tests? #f)) ; no test target - (native-inputs - `(("python24-setuptools" ,python24-setuptools))) (inputs `(("lapack" ,lapack) ("openblas" ,openblas))) -- cgit v1.2.3 From f89f08a06bd944de230920f4d9ca00bcb7c2f52d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 14 Jul 2019 02:21:26 -0500 Subject: gn: python24-pil: Inherit from python2-pil1. * gn/packages/python24.scm (python24-pil): Inherit from python2-pil1. --- gn/packages/python24.scm | 67 +++--------------------------------------------- 1 file changed, 4 insertions(+), 63 deletions(-) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index b77d6ef..1751c0b 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -5,6 +5,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system python) + #:use-module (gn packages python) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) @@ -201,73 +202,13 @@ module version 1.01 to Python. It allows writing of Excel compatible spreadsheets without the need for COM objects.") (license license:lgpl2.1+))) -;; TKINTER and LITTLECMS are not found (define-public python24-pil (package + (inherit python2-pil1) (name "python24-pil") - (version "1.1.7") - (source - (origin - (method url-fetch) - (uri (string-append "http://effbot.org/downloads/Imaging-" - version ".tar.gz")) - (sha256 - (base32 - "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9")) - (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/freetype/"))))) - (build-system python-build-system) (arguments - `(#:python ,python-2.4 - #:use-setuptools? #f - #:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'link-libraries - (lambda* (#:key inputs #:allow-other-keys) - (let ((freetype (assoc-ref inputs "freetype")) - (jpeg (assoc-ref inputs "libjpeg")) - (lcms (assoc-ref inputs "lcms")) - (tcl (assoc-ref inputs "tcl")) - (tiff (assoc-ref inputs "libtiff")) - (zlib (assoc-ref inputs "zlib"))) - (substitute* "setup.py" - (("FREETYPE_ROOT .*") - (string-append "FREETYPE_ROOT = libinclude(\"" freetype "\")\n")) - (("JPEG_ROOT .*") - (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")\n")) - (("LCMS_ROOT .*") - (string-append "LCMS_ROOT = libinclude(\"" lcms "\")\n")) - (("^TCL_ROOT .*") - (string-append "TCL_ROOT = libinclude(\"" tcl "\")\n")) - (("TIFF_ROOT .*") - (string-append "TIFF_ROOT = libinclude(\"" tiff "\")\n")) - (("ZLIB_ROOT .*") - (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")\n"))) - (substitute* '("setup.py" - "_imagingcms.c") - (("lcms.h") "lcms2.h"))) - #t))))) - (inputs - `(("freetype" ,freetype) - ("lcms" ,lcms) - ("libjpeg" ,libjpeg) - ("libtiff" ,libtiff) - ("tcl" ,tcl) - ("zlib" ,zlib))) - (home-page "http://www.pythonware.com/products/pil/") - (synopsis "Python Imaging Library") - (description "The @dfn{Python Imaging Library} (PIL) adds image processing -capabilities to your Python interpreter. This library supports many file -formats, and provides powerful image processing and graphics capabilities.") - (license (license:x11-style - "file://README" - "See 'README' in the distribution.")))) + (substitute-keyword-arguments (package-arguments python2-pil1) + ((#:python _) python-2.4))))) (define-public python24-piddle (package -- cgit v1.2.3 From 62f4ca3bff753d6353557d4e9d8d54deb6640a4c Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 14 Jul 2019 02:43:16 -0500 Subject: gn: Add python2-piddle-1.0.15. * gn/packages/python.scm (python2-piddle-1.0.15): New variable. * gn/packages/python24.scm (python24-piddle): Inherit from python2-piddle-1.0.15. --- gn/packages/python.scm | 28 ++++++++++++++++++++++++++++ gn/packages/python24.scm | 26 ++++---------------------- 2 files changed, 32 insertions(+), 22 deletions(-) (limited to 'gn/packages/python24.scm') diff --git a/gn/packages/python.scm b/gn/packages/python.scm index 0eda295..e56844b 100644 --- a/gn/packages/python.scm +++ b/gn/packages/python.scm @@ -675,6 +675,34 @@ version ".tgz")) (description #f) (license #f))) +(define-public python2-piddle-1.0.15 + (package + (name "python2-piddle") + (version "1.0.15") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/piddle/piddle/" + version "/piddle-" version ".zip")) + (sha256 + (base32 + "0jaxfsrcgqb5cf2wznxnpdws5khlrdixmg85lrhq2zl9cy6dfdya")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:use-setuptools? #f + #:tests? #f)) ; tests are interactive + (native-inputs + `(("unzip" ,unzip))) + (propagated-inputs + `(("python2-pil" ,python2-pil1))) + (home-page "http://www.strout.net/info/coding/python/piddle/") + (synopsis "Plug-In Drawing, Does Little Else") + (description "PIDDLE is designed for vector graphics -- i.e., drawing of +primitives such as lines and ellipses, rather than manipulation of individual +pixels.") + (license license:gpl2+))) + (define-public python2-parallel ; guix fix number of things (package (name "python2-parallel") diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm index 1751c0b..cc5e61c 100644 --- a/gn/packages/python24.scm +++ b/gn/packages/python24.scm @@ -212,31 +212,13 @@ spreadsheets without the need for COM objects.") (define-public python24-piddle (package + (inherit python2-piddle-1.0.15) (name "python24-piddle") - (version "1.0.15") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/piddle/piddle/" - version "/piddle-" version ".zip")) - (sha256 - (base32 - "0jaxfsrcgqb5cf2wznxnpdws5khlrdixmg85lrhq2zl9cy6dfdya")))) - (build-system python-build-system) (arguments - `(#:python ,python-2.4 - #:use-setuptools? #f - #:tests? #f)) ; tests are interactive - (native-inputs - `(("unzip" ,unzip))) + (substitute-keyword-arguments (package-arguments python2-piddle-1.0.15) + ((#:python _) python-2.4))) (propagated-inputs - `(("python24-pil" ,python24-pil))) - (home-page "http://www.strout.net/info/coding/python/piddle/") - (synopsis "Plug-In Drawing, Does Little Else") - (description "PIDDLE is designed for vector graphics -- i.e., drawing of -primitives such as lines and ellipses, rather than manipulation of individual -pixels.") - (license license:gpl2+))) + `(("python24-pil" ,python24-pil))))) ;; Apparently this is the library which mimics python-2.6+'s json library (define-public python24-simplejson -- cgit v1.2.3