| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 |
|
| 30 | (define-module (gnu packages python-compression)
|
| 31 | #:use-module ((guix licenses) #:prefix license:)
|
| 32 | #:use-module (guix utils)
|
| 33 | #:use-module (guix packages)
|
| 34 | #:use-module (guix download)
|
| 35 | #:use-module (guix gexp)
|
| 36 | #:use-module (guix build-system cargo)
|
| 37 | #:use-module (guix build-system gnu)
|
| 38 | #:use-module (guix build-system python)
|
| 39 | #:use-module (guix build-system pyproject)
|
| 40 | #:use-module (gnu packages)
|
| 41 | #:use-module (gnu packages libffi)
|
| 42 | #:use-module (gnu packages compression)
|
| 43 | #:use-module (gnu packages crates-compression)
|
| 44 | #:use-module (gnu packages crates-io)
|
| 45 | #:use-module (gnu packages cmake)
|
| 46 | #:use-module (gnu packages check)
|
| 47 | #:use-module (gnu packages maths)
|
| 48 | #:use-module (gnu packages pkg-config)
|
| 49 | #:use-module (gnu packages python)
|
| 50 | #:use-module (gnu packages python-build)
|
| 51 | #:use-module (gnu packages python-check)
|
| 52 | #:use-module (gnu packages python-crypto)
|
| 53 | #:use-module (gnu packages python-science)
|
| 54 | #:use-module (gnu packages python-xyz)
|
| 55 | #:use-module (gnu packages rust-apps)
|
| 56 | #:use-module (gnu packages sphinx))
|
| 57 |
|
| 58 | (define-public python-blosc
|
| 59 | (package
|
| 60 | (name "python-blosc")
|
| 61 | (version "1.11.1")
|
| 62 | (source
|
| 63 | (origin
|
| 64 | (method url-fetch)
|
| 65 | (uri (pypi-uri "blosc" version))
|
| 66 | (sha256
|
| 67 | (base32
|
| 68 | "0xmjs28sgpnb940zrhw010dq2m9d8a5h4fgnjyk6645fgfr1j8f2"))
|
| 69 | (snippet
|
| 70 | #~(begin (use-modules (guix build utils))
|
| 71 | (delete-file-recursively "blosc/c-blosc")))))
|
| 72 | (build-system python-build-system)
|
| 73 | (arguments
|
| 74 | (list #:phases
|
| 75 | #~(modify-phases %standard-phases
|
| 76 | (add-after 'unpack 'find-blosc
|
| 77 | (lambda _
|
| 78 | (setenv "USE_SYSTEM_BLOSC" "1")
|
| 79 | (setenv "Blosc_ROOT" #$(this-package-input "c-blosc"))))
|
| 80 | (replace 'check
|
| 81 | (lambda* (#:key tests? #:allow-other-keys)
|
| 82 | (when tests?
|
| 83 | (invoke "python" "-m" "blosc.test")))))))
|
| 84 | (propagated-inputs
|
| 85 | (list python-scikit-build python-numpy))
|
| 86 | (inputs (list c-blosc))
|
| 87 | (native-inputs (list cmake-minimal))
|
| 88 | (home-page "https://github.com/blosc/python-blosc")
|
| 89 | (synopsis "Python wrapper for the Blosc data compressor library")
|
| 90 | (description "Blosc is a high performance compressor optimized for binary
|
| 91 | data. It has been designed to transmit data to the processor cache faster
|
| 92 | than the traditional, non-compressed, direct memory fetch approach via a
|
| 93 | @code{memcpy()} system call.
|
| 94 |
|
| 95 | Blosc works well for compressing numerical arrays that contains data with
|
| 96 | relatively low entropy, like sparse data, time series, grids with
|
| 97 | regular-spaced values, etc.
|
| 98 |
|
| 99 | This Python package wraps the Blosc library.")
|
| 100 | (license license:bsd-3)))
|
| 101 |
|
| 102 | (define-public python-blosc2
|
| 103 | (package
|
| 104 | (name "python-blosc2")
|
| 105 | (version "2.7.1") |
| 106 | (source
|
| 107 | (origin
|
| 108 | (method url-fetch)
|
| 109 | (uri (pypi-uri "blosc2" version))
|
| 110 | (sha256
|
| 111 | (base32 "1s4gpdf1hfbw5w3hpx0g8bfwjrws1b8wgmh7snafh5ivai0lvnrl"))))
|
| 112 | (build-system python-build-system)
|
| 113 | (arguments
|
| 114 | (list #:phases #~(modify-phases %standard-phases
|
| 115 | (replace 'build
|
| 116 | (lambda* (#:key inputs #:allow-other-keys)
|
| 117 | (invoke "python" "setup.py" "build"
|
| 118 | "-DUSE_SYSTEM_BLOSC2=ON")))
|
| 119 | (replace 'check
|
| 120 | (lambda* (#:key tests? #:allow-other-keys)
|
| 121 | (when tests?
|
| 122 | (invoke "python" "-m" "pytest" "-vv")))))))
|
| 123 | (inputs (list c-blosc2))
|
| 124 | (propagated-inputs
|
| 125 | (list python-msgpack
|
| 126 | python-ndindex
|
| 127 | python-numexpr
|
| 128 | python-numpy
|
| 129 | python-py-cpuinfo))
|
| 130 | (native-inputs
|
| 131 | (list cmake-minimal
|
| 132 | pkg-config
|
| 133 | python-cython-3
|
| 134 | python-pytest
|
| 135 | python-scikit-build))
|
| 136 | (home-page "https://github.com/blosc/python-blosc2")
|
| 137 | (synopsis "Python wrapper for the Blosc2 data compressor library")
|
| 138 | (description
|
| 139 | "Blosc2 is a high performance compressor optimized for binary
|
| 140 | data. It has been designed to transmit data to the processor cache faster
|
| 141 | than the traditional, non-compressed, direct memory fetch approach via a
|
| 142 | @code{memcpy()} system call.
|
| 143 |
|
| 144 | Python-Blosc2 wraps the C-Blosc2 library, and it aims to leverage its new API
|
| 145 | so as to support super-chunks, multi-dimensional arrays, serialization and
|
| 146 | other features introduced in C-Blosc2.
|
| 147 |
|
| 148 | Python-Blosc2 also reproduces the API of Python-Blosc and is meant to be able
|
| 149 | to access its data, so it can be used as a drop-in replacement.")
|
| 150 | (license license:bsd-3)))
|
| 151 |
|
| 152 | (define-public python-multivolumefile
|
| 153 | (package
|
| 154 | (name "python-multivolumefile")
|
| 155 | (version "0.2.3")
|
| 156 | (source
|
| 157 | (origin
|
| 158 | (method url-fetch)
|
| 159 | (uri (pypi-uri "multivolumefile" version))
|
| 160 | (sha256
|
| 161 | (base32
|
| 162 | "1mh9sz50s1p8ik83a455pqd57syprad7xhfmk28yb5mwmw58sr50"))))
|
| 163 | (build-system pyproject-build-system)
|
| 164 | (native-inputs
|
| 165 | (list python-setuptools-scm
|
| 166 | python-coverage
|
| 167 | python-coveralls
|
| 168 | python-hypothesis
|
| 169 | python-pyannotate
|
| 170 | python-pytest
|
| 171 | python-pytest-cov
|
| 172 | python-setuptools
|
| 173 | python-wheel))
|
| 174 | (home-page "https://github.com/miurahr/multivolume")
|
| 175 | (synopsis "Treat multiple files as one")
|
| 176 | (description "MultiVolumefile is a Python library that provides a
|
| 177 | file-object abstraction, making it possible to use multiple files as if they
|
| 178 | were a single file.")
|
| 179 | (license license:lgpl2.1+)))
|
| 180 |
|
| 181 | (define-public python-cramjam
|
| 182 | (package
|
| 183 | (name "python-cramjam")
|
| 184 | (version "2.7.0")
|
| 185 | (source
|
| 186 | (origin
|
| 187 | (method url-fetch)
|
| 188 | (uri (pypi-uri "cramjam" version))
|
| 189 | (sha256
|
| 190 | (base32 "1b69qlr0q7q3spa7zy55xc1dr5pjgsdavxx8ijhv2j60xqjbg7sp"))))
|
| 191 | (build-system cargo-build-system)
|
| 192 | (arguments
|
| 193 | (list
|
| 194 | #:imported-modules `(,@%cargo-build-system-modules
|
| 195 | ,@%pyproject-build-system-modules)
|
| 196 | #:modules '((guix build cargo-build-system)
|
| 197 | ((guix build pyproject-build-system)
|
| 198 | #:prefix py:)
|
| 199 | (guix build utils))
|
| 200 | #:phases #~(modify-phases %standard-phases
|
| 201 | |
| 202 | (replace 'build
|
| 203 | (assoc-ref py:%standard-phases
|
| 204 | 'build))
|
| 205 | |
| 206 | |
| 207 | (delete 'install)
|
| 208 | (add-after 'build 'install
|
| 209 | (assoc-ref py:%standard-phases
|
| 210 | 'install))
|
| 211 | (add-after 'install 'add-install-to-pythonpath
|
| 212 | (assoc-ref py:%standard-phases
|
| 213 | 'add-install-to-pythonpath))
|
| 214 | |
| 215 | (replace 'check
|
| 216 | (lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
| 217 | (when tests?
|
| 218 | |
| 219 | |
| 220 | |
| 221 | (setenv "CI" "1")
|
| 222 | (invoke "pytest" "-vv" "tests")))))
|
| 223 | #:cargo-inputs `(("rust-brotli" ,rust-brotli-3)
|
| 224 | ("rust-bzip2" ,rust-bzip2-0.4)
|
| 225 | ("rust-flate2" ,rust-flate2-1)
|
| 226 | ("rust-lz4" ,rust-lz4-1)
|
| 227 | ("rust-pyo3" ,rust-pyo3-0.18)
|
| 228 | ("rust-snap" ,rust-snap-1)
|
| 229 | ("rust-zstd" ,rust-zstd-0.11))
|
| 230 | #:install-source? #f))
|
| 231 | (native-inputs (list maturin
|
| 232 | pkg-config
|
| 233 | python-pytest
|
| 234 | python-pytest-xdist
|
| 235 | python-numpy
|
| 236 | python-hypothesis
|
| 237 | python-wrapper))
|
| 238 | (inputs (list `(,zstd "lib")))
|
| 239 | (home-page "https://github.com/milesgranger/cramjam")
|
| 240 | (synopsis "Python bindings to compression algorithms in Rust")
|
| 241 | (description
|
| 242 | "This package provides thin Python bindings to compression and
|
| 243 | decomporession algorithms implemented in Rust. This allows for using
|
| 244 | algorithms such as Snappy without additional system dependencies. The
|
| 245 | following algorithms are available:
|
| 246 |
|
| 247 | @itemize
|
| 248 | @item Snappy
|
| 249 | @item Brotli
|
| 250 | @item Bzip2
|
| 251 | @item LZ4
|
| 252 | @item Gzip
|
| 253 | @item Deflate
|
| 254 | @item Zstd
|
| 255 | @end itemize")
|
| 256 | (license license:expat)))
|
| 257 |
|
| 258 | (define-public python-ewah-bool-utils
|
| 259 | (package
|
| 260 | (name "python-ewah-bool-utils")
|
| 261 | (version "1.2.2")
|
| 262 | (source
|
| 263 | (origin
|
| 264 | (method url-fetch)
|
| 265 | (uri (pypi-uri "ewah_bool_utils" version))
|
| 266 | (sha256
|
| 267 | (base32 "1hvs1fvf3g7kq6hnzxyxfrwvmykw503cmxf1l3irs67gr931z47b"))))
|
| 268 | (build-system pyproject-build-system)
|
| 269 | (arguments
|
| 270 | (list
|
| 271 | #:phases
|
| 272 | #~(modify-phases %standard-phases
|
| 273 | (add-before 'check 'build-extensions
|
| 274 | (lambda _
|
| 275 | (invoke "python" "setup.py" "build_ext" "--inplace"))))))
|
| 276 | (native-inputs
|
| 277 | (list python-cython
|
| 278 | python-pytest
|
| 279 | python-setuptools
|
| 280 | python-wheel))
|
| 281 | (propagated-inputs
|
| 282 | (list python-numpy))
|
| 283 | (home-page "https://github.com/yt-project/ewah_bool_utils")
|
| 284 | (synopsis "EWAH Bool Array compression")
|
| 285 | (description "This package provide a Python wrapper to @acronym{EWAH,
|
| 286 | Enhanced Word-Aligned Hybrid} compression bitarray method.")
|
| 287 | (license (list
|
| 288 | |
| 289 | license:bsd-3
|
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | license:asl2.0))))
|
| 295 |
|
| 296 | (define-public python-pybcj
|
| 297 | (package
|
| 298 | (name "python-pybcj")
|
| 299 | (version "1.0.1")
|
| 300 | (source (origin
|
| 301 | (method url-fetch)
|
| 302 | (uri (pypi-uri "pybcj" version))
|
| 303 | (sha256
|
| 304 | (base32
|
| 305 | "1hvm3c3mb20z25kmbzyyn6pr5inx50z0ignl8b0bggxaik82ws4b"))))
|
| 306 | (build-system pyproject-build-system)
|
| 307 | (propagated-inputs (list python-importlib-metadata))
|
| 308 | (native-inputs
|
| 309 | (list python-coverage
|
| 310 | python-hypothesis
|
| 311 | python-pytest
|
| 312 | python-pytest-cov
|
| 313 | python-setuptools-scm
|
| 314 | python-setuptools
|
| 315 | python-wheel))
|
| 316 | (home-page "https://codeberg.org/miurahr/pybcj")
|
| 317 | (synopsis "BCJ filter library")
|
| 318 | (description "In data compression, BCJ, short for Branch-Call-Jump, refers
|
| 319 | to a technique that improves the compression of machine code of executable
|
| 320 | binaries by replacing relative branch addresses with absolute ones. This
|
| 321 | allows a LZMA compressor to identify duplicate targets and archive higher
|
| 322 | compression rate. BCJ is used in the 7-zip compression utility as the default
|
| 323 | filter for executable binaries.
|
| 324 |
|
| 325 | pybcj provides Python bindings to a BCJ implementation in C.")
|
| 326 | (license license:lgpl2.1+)))
|
| 327 |
|
| 328 | (define-public python-bcj-cffi
|
| 329 | (package
|
| 330 | (name "python-bcj-cffi")
|
| 331 | (version "0.5.0")
|
| 332 | (source
|
| 333 | (origin
|
| 334 | (method url-fetch)
|
| 335 | (uri (pypi-uri "bcj-cffi" version))
|
| 336 | (sha256
|
| 337 | (base32
|
| 338 | "1jcczrb8zgg6w7v76w1wpz3nw75fghk3xwxkn09ll7kck7sdf68d"))))
|
| 339 | (build-system python-build-system)
|
| 340 | (propagated-inputs
|
| 341 | (list python-cffi python-toml python-setuptools-scm))
|
| 342 | (native-inputs
|
| 343 | (list python-setuptools python-coverage python-pytest
|
| 344 | python-pytest-cov))
|
| 345 | (home-page "https://github.com/miurahr/bcj-cffi")
|
| 346 | (synopsis "Branch / Call /Jump CFFI library in Python")
|
| 347 | (description "This package provides an implementation of the Branch / Call /
|
| 348 | Jump conversion filter by CFFI for Python.")
|
| 349 | (license license:lgpl2.1+)))
|
| 350 |
|
| 351 | (define-public python-brotlicffi
|
| 352 | (package
|
| 353 | (name "python-brotlicffi")
|
| 354 | (version "1.0.9.2")
|
| 355 | (source (origin
|
| 356 | (method url-fetch)
|
| 357 | (uri (pypi-uri "brotlicffi" version))
|
| 358 | (sha256
|
| 359 | (base32
|
| 360 | "15kxgdiqcg0cm6h5xq3vkbhw7674673hcx3n2yicd3wx29l8l90c"))
|
| 361 | (snippet
|
| 362 | #~(begin
|
| 363 | (use-modules (guix build utils))
|
| 364 | (delete-file-recursively "libbrotli")))))
|
| 365 | (build-system pyproject-build-system)
|
| 366 | (arguments
|
| 367 | (list
|
| 368 | #:phases
|
| 369 | #~(modify-phases %standard-phases
|
| 370 | (add-after 'unpack 'use-shared-brotli
|
| 371 | (lambda _
|
| 372 | (setenv "USE_SHARED_BROTLI" "1"))))))
|
| 373 | (propagated-inputs (list python-cffi))
|
| 374 | (inputs (list brotli))
|
| 375 | (native-inputs (list python-setuptools python-wheel))
|
| 376 | (home-page "https://github.com/python-hyper/brotlicffi")
|
| 377 | (synopsis "Python CFFI bindings to the Brotli library")
|
| 378 | (description "This package provides Python CFFI bindings to the Brotli
|
| 379 | library.")
|
| 380 | (license license:expat)))
|
| 381 |
|
| 382 | (define-public python-inflate64
|
| 383 | (package
|
| 384 | (name "python-inflate64")
|
| 385 | (version "0.3.1")
|
| 386 | (source (origin
|
| 387 | (method url-fetch)
|
| 388 | (uri (pypi-uri "inflate64" version))
|
| 389 | (sha256
|
| 390 | (base32
|
| 391 | "0767j35gkwaykl1iq9qn8rc25j1ggv56x3d1vzjpk89bzpzdhbdm"))))
|
| 392 | (build-system pyproject-build-system)
|
| 393 | (propagated-inputs (list python-importlib-metadata))
|
| 394 | (native-inputs
|
| 395 | (list python-pyannotate
|
| 396 | python-pytest
|
| 397 | python-setuptools-scm
|
| 398 | python-setuptools
|
| 399 | python-wheel))
|
| 400 | (home-page "https://pypi.org/project/inflate64/")
|
| 401 | (synopsis "Compression/decompression library")
|
| 402 | (description "The @code{inflate64} package provides @code{Deflater} and
|
| 403 | @code{Inflater} classes to compress and decompress with the Enhanced Deflate
|
| 404 | compression algorithm.")
|
| 405 | (license license:lgpl2.1+)))
|
| 406 |
|
| 407 | (define-public python-isal
|
| 408 | (package
|
| 409 | (name "python-isal")
|
| 410 | (version "1.1.0")
|
| 411 | (source
|
| 412 | (origin
|
| 413 | (method url-fetch)
|
| 414 | (uri (pypi-uri "isal" version))
|
| 415 | (sha256
|
| 416 | (base32 "01914gwfrb95dagz9sqnsmvc0hssg2pb6aj204fdamss4piz8r0k"))
|
| 417 | |
| 418 | (modules '((guix build utils)))
|
| 419 | (snippet
|
| 420 | '(delete-file-recursively "src/isal/isa-l"))))
|
| 421 | (build-system pyproject-build-system)
|
| 422 | (arguments
|
| 423 | `(#:phases
|
| 424 | (modify-phases %standard-phases
|
| 425 | (add-after 'unpack 'use-dynamic-linking
|
| 426 | (lambda _ (setenv "PYTHON_ISAL_LINK_DYNAMIC" "1"))))))
|
| 427 | (inputs (list isa-l))
|
| 428 | (native-inputs (list python-cython python-setuptools python-wheel))
|
| 429 | (home-page "https://github.com/pycompression/python-isal")
|
| 430 | (synopsis "Python bindings for the ISA-L compression library")
|
| 431 | (description
|
| 432 | "This package aims to provide faster zlib and gzip compatible compression
|
| 433 | and decompression by implementing Python bindings for the ISA-L library.")
|
| 434 | (license license:expat)))
|
| 435 |
|
| 436 | (define-public python-pylsqpack
|
| 437 | (package
|
| 438 | (name "python-pylsqpack")
|
| 439 | (version "0.3.17")
|
| 440 | (source (origin
|
| 441 | (method url-fetch)
|
| 442 | (uri (pypi-uri "pylsqpack" version))
|
| 443 | (sha256
|
| 444 | (base32
|
| 445 | "1qiwmavmxy6ba89mrdkzk52hqrd4awnp4yca395pxp2np66pf81g"))))
|
| 446 | |
| 447 | (build-system pyproject-build-system)
|
| 448 | (native-inputs (list python-setuptools python-wheel))
|
| 449 | (home-page "https://github.com/aiortc/pylsqpack")
|
| 450 | (synopsis "Python bindings for @code{ls-qpack}")
|
| 451 | (description
|
| 452 | "@code{pylsqpack} is a wrapper around the @code{ls-qpack} library.
|
| 453 | It provides Python Decoder and Encoder objects to read or write HTTP/3
|
| 454 | headers compressed with QPACK.")
|
| 455 | (license license:expat)))
|
| 456 |
|
| 457 | (define-public python-pyppmd
|
| 458 | (package
|
| 459 | (name "python-pyppmd")
|
| 460 | (version "1.0.0")
|
| 461 | (source (origin
|
| 462 | (method url-fetch)
|
| 463 | (uri (pypi-uri "pyppmd" version))
|
| 464 | (sha256
|
| 465 | (base32
|
| 466 | "03w4x26mar0ha73c3v39psn1i0k6xrzwmaxfsxysic73jz99np07"))))
|
| 467 | (build-system pyproject-build-system)
|
| 468 | (native-inputs
|
| 469 | (list python-coverage
|
| 470 | python-hypothesis
|
| 471 | python-pytest
|
| 472 | python-pytest-benchmark
|
| 473 | python-pytest-cov
|
| 474 | python-pytest-timeout
|
| 475 | python-setuptools-scm
|
| 476 | python-setuptools
|
| 477 | python-wheel))
|
| 478 | (home-page "https://github.com/miurahr/pyppmd")
|
| 479 | (synopsis "PPMd compression/decompression library")
|
| 480 | (description "Pyppmd provides classes and functions for compressing and
|
| 481 | decompressing text data, using the @dfn{Prediction by partial matching} (PPM)
|
| 482 | compression algorithm variation H and I.2. It provides an API similar to
|
| 483 | Python's zlib/bz2/lzma modules.")
|
| 484 | (license license:lgpl2.1+)))
|
| 485 |
|
| 486 | (define-public python-ppmd-cffi
|
| 487 | (package
|
| 488 | (name "python-ppmd-cffi")
|
| 489 | (version "0.5.0")
|
| 490 | (source
|
| 491 | (origin
|
| 492 | (method url-fetch)
|
| 493 | (uri (pypi-uri "ppmd-cffi" version))
|
| 494 | (sha256
|
| 495 | (base32
|
| 496 | "0vprpl29fkflqx0m6anfpx7q7i4cw0d0qxcdm91k4pl82dcad81g"))))
|
| 497 | (build-system python-build-system)
|
| 498 | (propagated-inputs
|
| 499 | (list python-cffi))
|
| 500 | (native-inputs
|
| 501 | (list python-hypothesis
|
| 502 | python-setuptools-scm
|
| 503 | python-coverage
|
| 504 | python-pytest
|
| 505 | python-pytest-cov))
|
| 506 | (home-page "https://github.com/miurahr/ppmd")
|
| 507 | (synopsis "Prediction by Partial Matching compression library")
|
| 508 | (description "PPMd is a compression algorithm library using the Prediction
|
| 509 | by Partial Matching statistical technique. It is used in RAR and 7-Zip as one of
|
| 510 | several possible methods.")
|
| 511 | (license license:lgpl2.1+)))
|
| 512 |
|
| 513 | (define-public python-py7zr
|
| 514 | (package
|
| 515 | (name "python-py7zr")
|
| 516 | (version "0.20.2")
|
| 517 | (source
|
| 518 | (origin
|
| 519 | (method url-fetch)
|
| 520 | (uri (pypi-uri "py7zr" version))
|
| 521 | (sha256
|
| 522 | (base32
|
| 523 | "0lwniinfr3rb10n0c203a09vz06vxnnj637yqn8ipdlml89gj7kr"))))
|
| 524 | (build-system pyproject-build-system)
|
| 525 | (propagated-inputs
|
| 526 | (list python-brotli
|
| 527 | python-brotlicffi
|
| 528 | python-importlib-metadata
|
| 529 | python-inflate64
|
| 530 | python-multivolumefile
|
| 531 | python-psutil
|
| 532 | python-pybcj
|
| 533 | python-pycryptodomex
|
| 534 | python-pyppmd
|
| 535 | python-pyzstd
|
| 536 | python-texttable))
|
| 537 | (native-inputs
|
| 538 | (list python-coverage
|
| 539 | python-setuptools
|
| 540 | python-coveralls
|
| 541 | python-libarchive-c
|
| 542 | python-py-cpuinfo
|
| 543 | python-pyannotate
|
| 544 | python-pytest
|
| 545 | python-pytest-benchmark
|
| 546 | python-pytest-cov
|
| 547 | python-pytest-remotedata
|
| 548 | python-pytest-timeout
|
| 549 | python-setuptools-scm
|
| 550 | python-wheel))
|
| 551 | (home-page "https://github.com/miurahr/py7zr")
|
| 552 | (synopsis "7-zip in Python")
|
| 553 | (description "This package provides py7zr, which implements 7-zip
|
| 554 | archive compression, decompression, encryption and decryption in
|
| 555 | Python.")
|
| 556 | (license license:lgpl2.1+)))
|
| 557 |
|
| 558 | (define-public python-lzo
|
| 559 | (package
|
| 560 | (name "python-lzo")
|
| 561 | (version "1.14")
|
| 562 | (source
|
| 563 | (origin
|
| 564 | (method url-fetch)
|
| 565 | (uri (pypi-uri "python-lzo" version))
|
| 566 | (sha256
|
| 567 | (base32 "0315nq6r39n51n8qqamb7xv0ib0qrh76q7g3a1977172mbndijw3"))))
|
| 568 | (build-system python-build-system)
|
| 569 | (arguments
|
| 570 | (list
|
| 571 | #:test-target "check"
|
| 572 | #:phases
|
| 573 | #~(modify-phases %standard-phases
|
| 574 | (add-after 'unpack 'patch-setuppy
|
| 575 | (lambda _
|
| 576 | (substitute* "setup.py"
|
| 577 | (("include_dirs.append\\(.*\\)")
|
| 578 | (string-append "include_dirs.append('"
|
| 579 | #$(this-package-input "lzo")
|
| 580 | "/include/lzo"
|
| 581 | "')"))))))))
|
| 582 | (inputs
|
| 583 | (list lzo))
|
| 584 | (home-page "https://github.com/jd-boyd/python-lzo")
|
| 585 | (synopsis "Python bindings for the LZO data compression library")
|
| 586 | (description
|
| 587 | "Python-LZO provides Python bindings for LZO, i.e. you can access
|
| 588 | the LZO library from your Python scripts thereby compressing ordinary
|
| 589 | Python strings.")
|
| 590 | (license license:gpl2+)))
|
| 591 |
|
| 592 | (define-public python-lz4
|
| 593 | (package
|
| 594 | (name "python-lz4")
|
| 595 | (version "4.3.2")
|
| 596 | (source
|
| 597 | (origin
|
| 598 | (method url-fetch)
|
| 599 | (uri (pypi-uri "lz4" version))
|
| 600 | (sha256
|
| 601 | (base32
|
| 602 | "1nmc36j5xnk7mvwwpm0nb1sddjk5iv77h877fdkkxcngm621shz1"))
|
| 603 | (modules '((guix build utils)))
|
| 604 | (snippet '(begin
|
| 605 | |
| 606 | (delete-file-recursively "lz4libs")))))
|
| 607 | (build-system python-build-system)
|
| 608 | (arguments
|
| 609 | (list #:phases
|
| 610 | #~(modify-phases %standard-phases
|
| 611 | (replace 'check
|
| 612 | (lambda* (#:key tests? #:allow-other-keys)
|
| 613 | (when tests?
|
| 614 | |
| 615 | (invoke "pytest" "-vv" "tests/block" "tests/frame")))))))
|
| 616 | (native-inputs
|
| 617 | (list pkg-config python-pytest python-pkgconfig python-setuptools-scm
|
| 618 | |
| 619 | python-psutil))
|
| 620 | (inputs
|
| 621 | (list lz4))
|
| 622 | (home-page "https://github.com/python-lz4/python-lz4")
|
| 623 | (synopsis "LZ4 bindings for Python")
|
| 624 | (description
|
| 625 | "This package provides python bindings for the lz4 compression library
|
| 626 | by Yann Collet. The project contains bindings for the LZ4 block format and
|
| 627 | the LZ4 frame format.")
|
| 628 | (license license:bsd-3)))
|
| 629 |
|
| 630 | (define-public python-lzstring
|
| 631 | (package
|
| 632 | (name "python-lzstring")
|
| 633 | (version "1.0.4")
|
| 634 | (source
|
| 635 | (origin
|
| 636 | (method url-fetch)
|
| 637 | (uri (pypi-uri "lzstring" version))
|
| 638 | (sha256
|
| 639 | (base32
|
| 640 | "18ly9pppy2yspxzw7k1b23wk77k7m44rz2g0271bqgqrk3jn3yhs"))))
|
| 641 | (build-system python-build-system)
|
| 642 | (propagated-inputs
|
| 643 | (list python-future))
|
| 644 | (home-page "https://github.com/gkovacs/lz-string-python")
|
| 645 | (synopsis "String compression")
|
| 646 | (description "Lz-string is a string compressor library for Python.")
|
| 647 | (license license:expat)))
|
| 648 |
|
| 649 | (define-public python-python-snappy
|
| 650 | (package
|
| 651 | |
| 652 | |
| 653 | |
| 654 | (name "python-python-snappy")
|
| 655 | (version "0.6.1")
|
| 656 | (source
|
| 657 | (origin
|
| 658 | (method url-fetch)
|
| 659 | (uri (pypi-uri "python-snappy" version))
|
| 660 | (sha256
|
| 661 | (base32 "0amv12w0ybn6n1lk36x70a3l8bdjv4mn7iflb59wqsi00smhg8dn"))))
|
| 662 | (build-system python-build-system)
|
| 663 | (arguments
|
| 664 | '(#:phases (modify-phases %standard-phases
|
| 665 | (replace 'check
|
| 666 | (lambda* (#:key tests? #:allow-other-keys)
|
| 667 | (when tests?
|
| 668 | (invoke "pytest" "-vv" "-k"
|
| 669 | |
| 670 | (string-append "not test_snappy_cffi_enum "
|
| 671 | "and not test_snappy_all_cffi"))))))))
|
| 672 | (inputs (list snappy))
|
| 673 | (native-inputs (list python-pytest))
|
| 674 | (home-page "https://github.com/andrix/python-snappy")
|
| 675 | (synopsis "Python bindings for the Snappy compression library")
|
| 676 | (description
|
| 677 | "@code{python-python-snappy} provides bindings to the Snappy library and
|
| 678 | can be used to compress and decompress files and streams. It can also be used
|
| 679 | directly from the command line.")
|
| 680 | (license license:bsd-3)))
|
| 681 |
|
| 682 | (define-public bitshuffle
|
| 683 | (package
|
| 684 | (name "bitshuffle")
|
| 685 | (version "0.3.5")
|
| 686 | (source (origin
|
| 687 | (method url-fetch)
|
| 688 | (uri (pypi-uri "bitshuffle" version))
|
| 689 | (sha256
|
| 690 | (base32
|
| 691 | "1823x61kyax4dc2hjmc1xraskxi1193y8lvxd03vqv029jrj8cjy"))
|
| 692 | (modules '((guix build utils)))
|
| 693 | (snippet
|
| 694 | '(begin
|
| 695 | |
| 696 | (delete-file "bitshuffle/h5.c")
|
| 697 | (delete-file "bitshuffle/ext.c")
|
| 698 | #t))))
|
| 699 | (build-system python-build-system)
|
| 700 | (arguments
|
| 701 | `(#:tests? #f |
| 702 | #:phases
|
| 703 | (modify-phases %standard-phases
|
| 704 | (add-after 'unpack 'fix-neon-detection
|
| 705 | |
| 706 | |
| 707 | (lambda _
|
| 708 | (substitute* "src/bitshuffle_core.c"
|
| 709 | (("#define USEARMNEON")
|
| 710 | "#ifdef __aarch64__\n#define USEARMNEON\n#endif"))
|
| 711 | #t))
|
| 712 | (add-after 'unpack 'dont-build-native
|
| 713 | (lambda _
|
| 714 | (substitute* "setup.py"
|
| 715 | (("'-march=native', ") ""))
|
| 716 | #t)))))
|
| 717 | (inputs
|
| 718 | `(("numpy" ,python-numpy)
|
| 719 | ("h5py" ,python-h5py)
|
| 720 | ("hdf5" ,hdf5)))
|
| 721 | (native-inputs
|
| 722 | `(("cython" ,python-cython)))
|
| 723 | (home-page "https://github.com/kiyo-masui/bitshuffle")
|
| 724 | (synopsis "Filter for improving compression of typed binary data")
|
| 725 | (description "Bitshuffle is an algorithm that rearranges typed, binary data
|
| 726 | for improving compression, as well as a python/C package that implements this
|
| 727 | algorithm within the Numpy framework.")
|
| 728 | (license license:expat)))
|
| 729 |
|
| 730 | (define-public bitshuffle-for-snappy
|
| 731 | (package/inherit bitshuffle
|
| 732 | (name "bitshuffle-for-snappy")
|
| 733 | (build-system gnu-build-system)
|
| 734 | (arguments
|
| 735 | (substitute-keyword-arguments (package-arguments bitshuffle)
|
| 736 | ((#:tests? _ #f) #f)
|
| 737 | ((#:phases phases)
|
| 738 | `(modify-phases %standard-phases
|
| 739 | (replace 'configure
|
| 740 | (lambda* (#:key outputs #:allow-other-keys)
|
| 741 | (with-output-to-file "Makefile"
|
| 742 | (lambda _
|
| 743 | (format #t "\
|
| 744 | libbitshuffle.so: src/bitshuffle.o src/bitshuffle_core.o src/iochain.o lz4/lz4.o
|
| 745 | \tgcc -O3 -ffast-math -std=c99 -o $@ -shared -fPIC $^
|
| 746 |
|
| 747 | %.o: %.c
|
| 748 | \tgcc -O3 -ffast-math -std=c99 -fPIC -Isrc -Ilz4 -c $< -o $@
|
| 749 |
|
| 750 | PREFIX:=~a
|
| 751 | LIBDIR:=$(PREFIX)/lib
|
| 752 | INCLUDEDIR:=$(PREFIX)/include
|
| 753 |
|
| 754 | install: libbitshuffle.so
|
| 755 | \tinstall -dm755 $(LIBDIR)
|
| 756 | \tinstall -dm755 $(INCLUDEDIR)
|
| 757 | \tinstall -m755 libbitshuffle.so $(LIBDIR)
|
| 758 | \tinstall -m644 src/bitshuffle.h $(INCLUDEDIR)
|
| 759 | \tinstall -m644 src/bitshuffle_core.h $(INCLUDEDIR)
|
| 760 | \tinstall -m644 src/iochain.h $(INCLUDEDIR)
|
| 761 | \tinstall -m644 lz4/lz4.h $(INCLUDEDIR)
|
| 762 | " (assoc-ref outputs "out"))))
|
| 763 | #t))))))
|
| 764 | (inputs '())
|
| 765 | (native-inputs '())))
|
| 766 |
|
| 767 | (define-public python-zipp
|
| 768 | (package
|
| 769 | (name "python-zipp")
|
| 770 | (version "1.0.0")
|
| 771 | (source
|
| 772 | (origin
|
| 773 | (method url-fetch)
|
| 774 | (uri (pypi-uri "zipp" version))
|
| 775 | (sha256
|
| 776 | (base32
|
| 777 | "0v3qayhqv7vyzydpydwcp51bqciw8p2ajddw68x5k8zppc0vx3yk"))))
|
| 778 | (build-system python-build-system)
|
| 779 | (propagated-inputs
|
| 780 | (list python-more-itertools))
|
| 781 | (native-inputs
|
| 782 | (list python-setuptools-scm))
|
| 783 | (home-page "https://github.com/jaraco/zipp")
|
| 784 | (synopsis
|
| 785 | "Backport of pathlib-compatible object wrapper for zip files")
|
| 786 | (description
|
| 787 | "This package provides a @code{pathlib}-compatible @code{Zipfile} object
|
| 788 | wrapper. It provides a backport of the @code{Path} object.")
|
| 789 | (license license:expat)))
|
| 790 |
|
| 791 | (define-public python-zipstream-ng
|
| 792 | (package
|
| 793 | (name "python-zipstream-ng")
|
| 794 | (version "1.7.1")
|
| 795 | (source
|
| 796 | (origin
|
| 797 | (method url-fetch)
|
| 798 | (uri (pypi-uri "zipstream-ng" version))
|
| 799 | (sha256
|
| 800 | (base32 "1z4zdqqs2rg3z36khgj96bpggv34av337isfv7yxg32prawj687r"))))
|
| 801 | (build-system pyproject-build-system)
|
| 802 | (native-inputs
|
| 803 | (list python-pytest python-pytest-cov python-setuptools python-wheel))
|
| 804 | (home-page "https://github.com/pR0Ps/zipstream-ng")
|
| 805 | (synopsis "Streamable zip file generator")
|
| 806 | (description
|
| 807 | "This package provides a modern and easy to use streamable zip file
|
| 808 | generator")
|
| 809 | (license license:lgpl3)))
|
| 810 |
|
| 811 | (define-public python-zopfli
|
| 812 | (package
|
| 813 | (name "python-zopfli")
|
| 814 | (version "0.2.2")
|
| 815 | (source
|
| 816 | (origin
|
| 817 | (method url-fetch)
|
| 818 | (uri (pypi-uri "zopfli" version ".zip"))
|
| 819 | (sha256
|
| 820 | (base32 "1z1akqx3fjnwa75insch9p08hafikqdvqkj6mxv1k6fr81sxnj9d"))))
|
| 821 | (build-system python-build-system)
|
| 822 | (arguments
|
| 823 | (list
|
| 824 | #:phases #~(modify-phases %standard-phases
|
| 825 | (add-after 'unpack 'use-system-zopfli
|
| 826 | (lambda _
|
| 827 | (setenv "USE_SYSTEM_ZOPFLI" "1")))
|
| 828 | (add-before 'build 'set-version
|
| 829 | (lambda _
|
| 830 | (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
|
| 831 | (replace 'check
|
| 832 | (lambda* (#:key tests? #:allow-other-keys)
|
| 833 | (when tests?
|
| 834 | (invoke "pytest" "-vv")))))))
|
| 835 | (native-inputs (list unzip python-pytest python-setuptools-scm))
|
| 836 | (inputs (list zopfli))
|
| 837 | (home-page "https://github.com/fonttools/py-zopfli")
|
| 838 | (synopsis "Python bindings for Zopfli")
|
| 839 | (description "@code{pyzopfli} is a straight forward wrapper around the
|
| 840 | @code{ZlibCompress} method of the the @code{zopfli} library.")
|
| 841 | (license license:asl2.0)))
|
| 842 |
|
| 843 | (define-public python-zstandard
|
| 844 | (package
|
| 845 | (name "python-zstandard")
|
| 846 | (version "0.19.0")
|
| 847 | (source
|
| 848 | (origin
|
| 849 | (method url-fetch)
|
| 850 | (uri (pypi-uri "zstandard" version))
|
| 851 | (sha256
|
| 852 | (base32 "0qvqhs121spk7yc1l20samflxx47waxv3xm55ksxpn1djk6jzl9i"))))
|
| 853 | (build-system python-build-system)
|
| 854 | (propagated-inputs
|
| 855 | (list python-cffi))
|
| 856 | (native-inputs
|
| 857 | (list python-hypothesis))
|
| 858 | (home-page "https://github.com/indygreg/python-zstandard")
|
| 859 | (synopsis "Zstandard bindings for Python")
|
| 860 | (description "This project provides Python bindings for interfacing with
|
| 861 | the Zstandard compression library. A C extension and CFFI interface are
|
| 862 | provided.")
|
| 863 | (license license:bsd-3)))
|
| 864 |
|
| 865 | (define-public python-pyzstd
|
| 866 | (package
|
| 867 | (name "python-pyzstd")
|
| 868 | (version "0.15.9")
|
| 869 | (source
|
| 870 | (origin
|
| 871 | (method url-fetch)
|
| 872 | (uri (pypi-uri "pyzstd" version))
|
| 873 | (sha256
|
| 874 | (base32 "1iycfmif15v1jhv0gsza1hyd1hn3sz0vn9s1y79abzv8axndxzfb"))
|
| 875 | (modules '((guix build utils)))
|
| 876 | (snippet
|
| 877 | '(begin
|
| 878 | |
| 879 | (delete-file-recursively "zstd")))))
|
| 880 | (build-system python-build-system)
|
| 881 | (arguments
|
| 882 | (list
|
| 883 | #:configure-flags
|
| 884 | #~(list "--dynamic-link-zstd")
|
| 885 | #:phases
|
| 886 | #~(modify-phases %standard-phases
|
| 887 | (replace 'build
|
| 888 | |
| 889 | (lambda* (#:key configure-flags #:allow-other-keys)
|
| 890 | (apply invoke "python" "./setup.py" "build"
|
| 891 | configure-flags)))
|
| 892 | (replace 'check
|
| 893 | |
| 894 | (lambda* (#:key tests? test-target configure-flags
|
| 895 | #:allow-other-keys)
|
| 896 | (when tests?
|
| 897 | (apply invoke "python" "./setup.py" test-target
|
| 898 | configure-flags)))))))
|
| 899 | (inputs (list `(,zstd "lib")))
|
| 900 | (home-page "https://github.com/animalize/pyzstd")
|
| 901 | (synopsis "Zstandard bindings for Python")
|
| 902 | (description "This package provides Python bindings to the Zstandard (zstd)
|
| 903 | compression library. The API is similar to Python's bz2/lzma/zlib module.")
|
| 904 | (license license:bsd-3)))
|