summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2019-01-15 17:42:59 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-01-15 17:45:33 +0100
commit4fec042b54d65a2f44cc3602f7d6f82292e3d1a9 (patch)
treef520114b54f9428d0e52ffd423070286d885be43 /gnu/packages
parent22e623aef08cc08c14073dca0193e9238ca88e9e (diff)
gnu: Move Python compression packages to new module.
* gnu/packages/compression.scm (python-lzo, python2-lzo, python-lz4, python2-lz4, python-lzstring, python2-lzstring, bitshuffle, bitshuffle-for-snappy): Move variables from here... * gnu/packages/python-compression.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/bioinformatics.scm, gnu/packages/java-compression.scm, gnu/packages/xorg.scm: Adjust module references.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/bioinformatics.scm1
-rw-r--r--gnu/packages/compression.scm173
-rw-r--r--gnu/packages/java-compression.scm3
-rw-r--r--gnu/packages/python-compression.scm206
-rw-r--r--gnu/packages/xorg.scm1
5 files changed, 210 insertions, 174 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1254d21c872..28dbdca13bd 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -98,6 +98,7 @@
98 #:use-module (gnu packages popt) 98 #:use-module (gnu packages popt)
99 #:use-module (gnu packages protobuf) 99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages python) 100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-compression)
101 #:use-module (gnu packages python-web) 102 #:use-module (gnu packages python-web)
102 #:use-module (gnu packages python-xyz) 103 #:use-module (gnu packages python-xyz)
103 #:use-module (gnu packages readline) 104 #:use-module (gnu packages readline)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 956cac7a1fe..327951fded7 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -47,7 +47,6 @@
47 #:use-module (guix git-download) 47 #:use-module (guix git-download)
48 #:use-module (guix build-system cmake) 48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu) 49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system python)
51 #:use-module (gnu packages) 50 #:use-module (gnu packages)
52 #:use-module (gnu packages assembly) 51 #:use-module (gnu packages assembly)
53 #:use-module (gnu packages autotools) 52 #:use-module (gnu packages autotools)
@@ -61,7 +60,6 @@
61 #:use-module (gnu packages perl) 60 #:use-module (gnu packages perl)
62 #:use-module (gnu packages pkg-config) 61 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages python) 62 #:use-module (gnu packages python)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages tls) 63 #:use-module (gnu packages tls)
66 #:use-module (gnu packages valgrind) 64 #:use-module (gnu packages valgrind)
67 #:use-module (ice-9 match) 65 #:use-module (ice-9 match)
@@ -462,44 +460,6 @@ LZO is written in ANSI C. Both the source code and the compressed data
462format are designed to be portable across platforms.") 460format are designed to be portable across platforms.")
463 (license license:gpl2+))) 461 (license license:gpl2+)))
464 462
465(define-public python-lzo
466 (package
467 (name "python-lzo")
468 (version "1.12")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (pypi-uri "python-lzo" version))
473 (sha256
474 (base32
475 "0iakqgd51n1cd7r3lpdylm2rgbmd16y74cra9kcapwg84mlf9a4p"))))
476 (build-system python-build-system)
477 (arguments
478 `(#:test-target "check"
479 #:phases
480 (modify-phases %standard-phases
481 (add-after 'unpack 'patch-setuppy
482 (lambda _
483 (substitute* "setup.py"
484 (("include_dirs.append\\(.*\\)")
485 (string-append "include_dirs.append('"
486 (assoc-ref %build-inputs "lzo")
487 "/include/lzo"
488 "')")))
489 #t)))))
490 (inputs
491 `(("lzo" ,lzo)))
492 (home-page "https://github.com/jd-boyd/python-lzo")
493 (synopsis "Python bindings for the LZO data compression library")
494 (description
495 "Python-LZO provides Python bindings for LZO, i.e. you can access
496the LZO library from your Python scripts thereby compressing ordinary
497Python strings.")
498 (license license:gpl2+)))
499
500(define-public python2-lzo
501 (package-with-python2 python-lzo))
502
503(define-public lzop 463(define-public lzop
504 (package 464 (package
505 (name "lzop") 465 (name "lzop")
@@ -741,54 +701,6 @@ time for compression ratio.")
741 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. 701 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
742 (license (list license:bsd-2 license:gpl2+)))) 702 (license (list license:bsd-2 license:gpl2+))))
743 703
744(define-public python-lz4
745 (package
746 (name "python-lz4")
747 (version "0.10.1")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (pypi-uri "lz4" version))
752 (sha256
753 (base32
754 "0ghv1xbaq693kgww1x9c22bplz479ls9szjsaa4ig778ls834hm0"))))
755 (build-system python-build-system)
756 (native-inputs
757 `(("python-nose" ,python-nose)
758 ("python-setuptools-scm" ,python-setuptools-scm)))
759 (home-page "https://github.com/python-lz4/python-lz4")
760 (synopsis "LZ4 bindings for Python")
761 (description
762 "This package provides python bindings for the lz4 compression library
763by Yann Collet. The project contains bindings for the LZ4 block format and
764the LZ4 frame format.")
765 (license license:bsd-3)))
766
767(define-public python2-lz4
768 (package-with-python2 python-lz4))
769
770(define-public python-lzstring
771 (package
772 (name "python-lzstring")
773 (version "1.0.4")
774 (source
775 (origin
776 (method url-fetch)
777 (uri (pypi-uri "lzstring" version))
778 (sha256
779 (base32
780 "18ly9pppy2yspxzw7k1b23wk77k7m44rz2g0271bqgqrk3jn3yhs"))))
781 (build-system python-build-system)
782 (propagated-inputs
783 `(("python-future" ,python-future)))
784 (home-page "https://github.com/gkovacs/lz-string-python")
785 (synopsis "String compression")
786 (description "Lz-string is a string compressor library for Python.")
787 (license license:expat)))
788
789(define-public python2-lzstring
790 (package-with-python2 python-lzstring))
791
792(define-public squashfs-tools 704(define-public squashfs-tools
793 (package 705 (package
794 (name "squashfs-tools") 706 (name "squashfs-tools")
@@ -1118,54 +1030,6 @@ well as bzip2.")
1118 (license (list license:gpl3+ 1030 (license (list license:gpl3+
1119 license:public-domain)))) ; most files in lzma/ 1031 license:public-domain)))) ; most files in lzma/
1120 1032
1121(define-public bitshuffle
1122 (package
1123 (name "bitshuffle")
1124 (version "0.3.5")
1125 (source (origin
1126 (method url-fetch)
1127 (uri (pypi-uri "bitshuffle" version))
1128 (sha256
1129 (base32
1130 "1823x61kyax4dc2hjmc1xraskxi1193y8lvxd03vqv029jrj8cjy"))
1131 (modules '((guix build utils)))
1132 (snippet
1133 '(begin
1134 ;; Remove generated Cython files.
1135 (delete-file "bitshuffle/h5.c")
1136 (delete-file "bitshuffle/ext.c")
1137 #t))))
1138 (build-system python-build-system)
1139 (arguments
1140 `(#:tests? #f ; fail: https://github.com/h5py/h5py/issues/769
1141 #:phases
1142 (modify-phases %standard-phases
1143 (add-after 'unpack 'fix-neon-detection
1144 ;; Neon is only for aarch64 ATM
1145 ;; see: https://github.com/kiyo-masui/bitshuffle/pull/73
1146 (lambda _
1147 (substitute* "src/bitshuffle_core.c"
1148 (("#define USEARMNEON")
1149 "#ifdef __aarch64__\n#define USEARMNEON\n#endif"))
1150 #t))
1151 (add-after 'unpack 'dont-build-native
1152 (lambda _
1153 (substitute* "setup.py"
1154 (("'-march=native', ") ""))
1155 #t)))))
1156 (inputs
1157 `(("numpy" ,python-numpy)
1158 ("h5py" ,python-h5py)
1159 ("hdf5" ,hdf5)))
1160 (native-inputs
1161 `(("cython" ,python-cython)))
1162 (home-page "https://github.com/kiyo-masui/bitshuffle")
1163 (synopsis "Filter for improving compression of typed binary data")
1164 (description "Bitshuffle is an algorithm that rearranges typed, binary data
1165for improving compression, as well as a python/C package that implements this
1166algorithm within the Numpy framework.")
1167 (license license:expat)))
1168
1169(define-public snappy 1033(define-public snappy
1170 (package 1034 (package
1171 (name "snappy") 1035 (name "snappy")
@@ -1192,43 +1056,6 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
1192100% bigger.") 1056100% bigger.")
1193 (license license:asl2.0))) 1057 (license license:asl2.0)))
1194 1058
1195(define-public bitshuffle-for-snappy
1196 (package
1197 (inherit bitshuffle)
1198 (name "bitshuffle-for-snappy")
1199 (build-system gnu-build-system)
1200 (arguments
1201 `(#:tests? #f
1202 #:phases
1203 (modify-phases %standard-phases
1204 (replace 'configure
1205 (lambda* (#:key outputs #:allow-other-keys)
1206 (with-output-to-file "Makefile"
1207 (lambda _
1208 (format #t "\
1209libbitshuffle.so: src/bitshuffle.o src/bitshuffle_core.o src/iochain.o lz4/lz4.o
1210\tgcc -O3 -ffast-math -std=c99 -o $@ -shared -fPIC $^
1211
1212%.o: %.c
1213\tgcc -O3 -ffast-math -std=c99 -fPIC -Isrc -Ilz4 -c $< -o $@
1214
1215PREFIX:=~a
1216LIBDIR:=$(PREFIX)/lib
1217INCLUDEDIR:=$(PREFIX)/include
1218
1219install: libbitshuffle.so
1220\tinstall -dm755 $(LIBDIR)
1221\tinstall -dm755 $(INCLUDEDIR)
1222\tinstall -m755 libbitshuffle.so $(LIBDIR)
1223\tinstall -m644 src/bitshuffle.h $(INCLUDEDIR)
1224\tinstall -m644 src/bitshuffle_core.h $(INCLUDEDIR)
1225\tinstall -m644 src/iochain.h $(INCLUDEDIR)
1226\tinstall -m644 lz4/lz4.h $(INCLUDEDIR)
1227" (assoc-ref outputs "out"))))
1228 #t)))))
1229 (inputs '())
1230 (native-inputs '())))
1231
1232(define-public p7zip 1059(define-public p7zip
1233 (package 1060 (package
1234 (name "p7zip") 1061 (name "p7zip")
diff --git a/gnu/packages/java-compression.scm b/gnu/packages/java-compression.scm
index 8cebfc65a5d..3102c70d887 100644
--- a/gnu/packages/java-compression.scm
+++ b/gnu/packages/java-compression.scm
@@ -29,7 +29,8 @@
29 #:use-module (gnu packages) 29 #:use-module (gnu packages)
30 #:use-module (gnu packages compression) 30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages java) 31 #:use-module (gnu packages java)
32 #:use-module (gnu packages perl)) 32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages python-compression))
33 34
34(define-public java-snappy 35(define-public java-snappy
35 (package 36 (package
diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm
new file mode 100644
index 00000000000..3792f373281
--- /dev/null
+++ b/gnu/packages/python-compression.scm
@@ -0,0 +1,206 @@
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
4;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
5;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
6;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages python-compression)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix utils)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system python)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages check)
33 #:use-module (gnu packages maths)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages python-xyz))
36
37(define-public python-lzo
38 (package
39 (name "python-lzo")
40 (version "1.12")
41 (source
42 (origin
43 (method url-fetch)
44 (uri (pypi-uri "python-lzo" version))
45 (sha256
46 (base32
47 "0iakqgd51n1cd7r3lpdylm2rgbmd16y74cra9kcapwg84mlf9a4p"))))
48 (build-system python-build-system)
49 (arguments
50 `(#:test-target "check"
51 #:phases
52 (modify-phases %standard-phases
53 (add-after 'unpack 'patch-setuppy
54 (lambda _
55 (substitute* "setup.py"
56 (("include_dirs.append\\(.*\\)")
57 (string-append "include_dirs.append('"
58 (assoc-ref %build-inputs "lzo")
59 "/include/lzo"
60 "')")))
61 #t)))))
62 (inputs
63 `(("lzo" ,lzo)))
64 (home-page "https://github.com/jd-boyd/python-lzo")
65 (synopsis "Python bindings for the LZO data compression library")
66 (description
67 "Python-LZO provides Python bindings for LZO, i.e. you can access
68the LZO library from your Python scripts thereby compressing ordinary
69Python strings.")
70 (license license:gpl2+)))
71
72(define-public python2-lzo
73 (package-with-python2 python-lzo))
74
75(define-public python-lz4
76 (package
77 (name "python-lz4")
78 (version "0.10.1")
79 (source
80 (origin
81 (method url-fetch)
82 (uri (pypi-uri "lz4" version))
83 (sha256
84 (base32
85 "0ghv1xbaq693kgww1x9c22bplz479ls9szjsaa4ig778ls834hm0"))))
86 (build-system python-build-system)
87 (native-inputs
88 `(("python-nose" ,python-nose)
89 ("python-setuptools-scm" ,python-setuptools-scm)))
90 (home-page "https://github.com/python-lz4/python-lz4")
91 (synopsis "LZ4 bindings for Python")
92 (description
93 "This package provides python bindings for the lz4 compression library
94by Yann Collet. The project contains bindings for the LZ4 block format and
95the LZ4 frame format.")
96 (license license:bsd-3)))
97
98(define-public python2-lz4
99 (package-with-python2 python-lz4))
100
101(define-public python-lzstring
102 (package
103 (name "python-lzstring")
104 (version "1.0.4")
105 (source
106 (origin
107 (method url-fetch)
108 (uri (pypi-uri "lzstring" version))
109 (sha256
110 (base32
111 "18ly9pppy2yspxzw7k1b23wk77k7m44rz2g0271bqgqrk3jn3yhs"))))
112 (build-system python-build-system)
113 (propagated-inputs
114 `(("python-future" ,python-future)))
115 (home-page "https://github.com/gkovacs/lz-string-python")
116 (synopsis "String compression")
117 (description "Lz-string is a string compressor library for Python.")
118 (license license:expat)))
119
120(define-public python2-lzstring
121 (package-with-python2 python-lzstring))
122
123(define-public bitshuffle
124 (package
125 (name "bitshuffle")
126 (version "0.3.5")
127 (source (origin
128 (method url-fetch)
129 (uri (pypi-uri "bitshuffle" version))
130 (sha256
131 (base32
132 "1823x61kyax4dc2hjmc1xraskxi1193y8lvxd03vqv029jrj8cjy"))
133 (modules '((guix build utils)))
134 (snippet
135 '(begin
136 ;; Remove generated Cython files.
137 (delete-file "bitshuffle/h5.c")
138 (delete-file "bitshuffle/ext.c")
139 #t))))
140 (build-system python-build-system)
141 (arguments
142 `(#:tests? #f ; fail: https://github.com/h5py/h5py/issues/769
143 #:phases
144 (modify-phases %standard-phases
145 (add-after 'unpack 'fix-neon-detection
146 ;; Neon is only for aarch64 ATM
147 ;; see: https://github.com/kiyo-masui/bitshuffle/pull/73
148 (lambda _
149 (substitute* "src/bitshuffle_core.c"
150 (("#define USEARMNEON")
151 "#ifdef __aarch64__\n#define USEARMNEON\n#endif"))
152 #t))
153 (add-after 'unpack 'dont-build-native
154 (lambda _
155 (substitute* "setup.py"
156 (("'-march=native', ") ""))
157 #t)))))
158 (inputs
159 `(("numpy" ,python-numpy)
160 ("h5py" ,python-h5py)
161 ("hdf5" ,hdf5)))
162 (native-inputs
163 `(("cython" ,python-cython)))
164 (home-page "https://github.com/kiyo-masui/bitshuffle")
165 (synopsis "Filter for improving compression of typed binary data")
166 (description "Bitshuffle is an algorithm that rearranges typed, binary data
167for improving compression, as well as a python/C package that implements this
168algorithm within the Numpy framework.")
169 (license license:expat)))
170
171(define-public bitshuffle-for-snappy
172 (package
173 (inherit bitshuffle)
174 (name "bitshuffle-for-snappy")
175 (build-system gnu-build-system)
176 (arguments
177 `(#:tests? #f
178 #:phases
179 (modify-phases %standard-phases
180 (replace 'configure
181 (lambda* (#:key outputs #:allow-other-keys)
182 (with-output-to-file "Makefile"
183 (lambda _
184 (format #t "\
185libbitshuffle.so: src/bitshuffle.o src/bitshuffle_core.o src/iochain.o lz4/lz4.o
186\tgcc -O3 -ffast-math -std=c99 -o $@ -shared -fPIC $^
187
188%.o: %.c
189\tgcc -O3 -ffast-math -std=c99 -fPIC -Isrc -Ilz4 -c $< -o $@
190
191PREFIX:=~a
192LIBDIR:=$(PREFIX)/lib
193INCLUDEDIR:=$(PREFIX)/include
194
195install: libbitshuffle.so
196\tinstall -dm755 $(LIBDIR)
197\tinstall -dm755 $(INCLUDEDIR)
198\tinstall -m755 libbitshuffle.so $(LIBDIR)
199\tinstall -m644 src/bitshuffle.h $(INCLUDEDIR)
200\tinstall -m644 src/bitshuffle_core.h $(INCLUDEDIR)
201\tinstall -m644 src/iochain.h $(INCLUDEDIR)
202\tinstall -m644 lz4/lz4.h $(INCLUDEDIR)
203" (assoc-ref outputs "out"))))
204 #t)))))
205 (inputs '())
206 (native-inputs '())))
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index a6a2e603aa0..67b38246ecf 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -71,6 +71,7 @@
71 #:use-module (gnu packages perl-check) 71 #:use-module (gnu packages perl-check)
72 #:use-module (gnu packages pkg-config) 72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages python) 73 #:use-module (gnu packages python)
74 #:use-module (gnu packages python-compression)
74 #:use-module (gnu packages python-crypto) 75 #:use-module (gnu packages python-crypto)
75 #:use-module (gnu packages python-xyz) 76 #:use-module (gnu packages python-xyz)
76 #:use-module (gnu packages qt) 77 #:use-module (gnu packages qt)