gnu: python-brotli: Move to python-compression and switch to pyproject.

Fixes gnu/gnu#1730

python-brotli does not benefit from being inherited from brotli, it's
built from scratch, this change moves it to python-compression as a
stand along package, a collection of Python bindings and swap build
system to pyproject.

* gnu/packages/compression.scm (python-brotli, python-google-brotli):
Move from here ...
* gnu/packages/python-compression.scm: ... to here.
* gnu/packages/django.scm: Add python-compression module.
* gnu/packages/fonts.scm: Likewise.
* gnu/packages/gnome.scm: Likewise.
* gnu/packages/video.scm: Likewise.

Change-Id: I592d84321893e5967181fd48d3037246c3cd4796
This commit is contained in:
Sharlatan Hellseher 2025-07-31 20:56:29 +01:00
parent e146256401
commit 25565cb637
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5
6 changed files with 38 additions and 14 deletions

View file

@ -71,7 +71,6 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
@ -2428,19 +2427,6 @@ The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
(define-public google-brotli
(deprecated-package "google-brotli" brotli))
(define-public python-brotli
(package
(inherit brotli)
(name "python-brotli")
(build-system python-build-system)
(arguments '())
(synopsis "Python interface to Brotli")
(description "This package provides a Python interface to the @code{brotli}
package, an implementation of the Brotli lossless compression algorithm.")))
(define-public python-google-brotli
(deprecated-package "python-google-brotli" python-brotli))
(define-public java-brotli
(package
(inherit brotli)

View file

@ -52,6 +52,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-compression)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)

View file

@ -109,6 +109,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-compression)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sdl)
#:use-module (gnu packages xorg))

View file

@ -198,6 +198,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-compression)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)

View file

@ -34,6 +34,7 @@
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix build-system cargo)
#:use-module (guix build-system gnu)
@ -150,6 +151,39 @@ Python-Blosc2 also reproduces the API of Python-Blosc and is meant to be able
to access its data, so it can be used as a drop-in replacement.")
(license license:bsd-3)))
(define-public python-brotli
(package
(name "python-brotli")
(version "1.0.9")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/google/brotli")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1fikasxf7r2dwlk8mv8w7nmjkn0jw5ic31ky3mvpkdzwgd4xfndl"))
(modules '((guix build utils)))
(snippet
#~(begin
;; Cherry-picked from upstream since the latest release
;; https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc
(substitute* (find-files "scripts" "^lib.*pc\\.in")
(("-R\\$\\{libdir\\} ") ""))))))
(build-system pyproject-build-system)
(native-inputs
(list python-pytest
python-setuptools))
(home-page "https://github.com/google/brotli")
(synopsis "Python interface to Brotli")
(description "This package provides a Python interface to the @code{brotli}
package, an implementation of the Brotli lossless compression algorithm.")
(license license:expat)))
(define-public python-google-brotli
(deprecated-package "python-google-brotli" python-brotli))
(define-public python-multivolumefile
(package
(name "python-multivolumefile")

View file

@ -203,6 +203,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-compression)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)