[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
150/222: gnu: python-xcffib: Move to (gnu packages xorg).
From: |
guix-commits |
Subject: |
150/222: gnu: python-xcffib: Move to (gnu packages xorg). |
Date: |
Fri, 1 Nov 2024 10:56:41 -0400 (EDT) |
sharlatan pushed a commit to branch python-team
in repository guix.
commit 171be4f90dc2603082483fda98b0fa07503c83c9
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Fri May 10 00:53:10 2024 +0200
gnu: python-xcffib: Move to (gnu packages xorg).
* /gnu/packages/python-xyz.scm (python-xcffib): Move from here…
* gnu/packages/xorg.scm (python-xcffib): …to here.
The package's build is fully rewritten and updated to version 1.5.0.
Change-Id: Ia77b9fc2160dacd77c3eaf4199278046a52515d7
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
gnu/packages/python-xyz.scm | 44 --------------------------------------------
gnu/packages/xorg.scm | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 44 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 454ca02933..12cacac712 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11456,50 +11456,6 @@ using Cython.
ManimPango is internally used in Manim to render (non-LaTeX) text.")
(license license:expat)))
-(define-public python-xcffib
- (package
- (name "python-xcffib")
- (version "0.11.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "xcffib" version))
- (sha256
- (base32
- "0nkglsm9nbhv238iagmmsjcz6lf1yfdvp5kmspphdj385vz9r50j"))))
- (build-system python-build-system)
- (inputs
- (list libxcb))
- (propagated-inputs
- (list python-cffi ; used at run time
- python-six))
- (arguments
- `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-libxcb-path
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libxcb (assoc-ref inputs "libxcb")))
- (substitute* '("xcffib/__init__.py")
- (("soname = ctypes.util.find_library.*xcb.*")
- (string-append "soname = \"" libxcb "/lib/libxcb.so\"\n")))
- #t)))
- (add-after 'install 'install-doc
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((doc (string-append (assoc-ref outputs "out") "/share"
- "/doc/" ,name "-" ,version)))
- (mkdir-p doc)
- (copy-file "README.md"
- (string-append doc "/README.md"))
- #t))))))
- (home-page "https://github.com/tych0/xcffib")
- (synopsis "XCB Python bindings")
- (description
- "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
-support for Python 3 and PyPy. It is based on cffi.")
- (license license:expat)))
-
(define-public python-cairocffi
(package
(name "python-cairocffi")
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 7f149bc68c..601c5747b7 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -66,6 +66,7 @@
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (guix build-system pyproject)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages aidc)
@@ -94,6 +95,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libedit)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages m4)
@@ -1705,6 +1707,45 @@ network-transparent printing system.")
generate code for the @code{python-xcbffib} package.")
(license license:expat)))
+(define-public python-xcffib
+ (package
+ (name "python-xcffib")
+ (version "1.5.0")
+ (source (package-source xcffibgen))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list pkg-config which xcb-proto xcffibgen))
+ (inputs
+ (list libxcb))
+ (propagated-inputs
+ (list python-cffi ; used at run time
+ python-six))
+ (arguments
+ (list
+ ;; Tests seem to require version 3.12 of Python.
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'generate-bindings
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile"
+ (("^GEN=.*")
+ (format #f "GEN=~a~%"
+ (search-input-file inputs "/bin/xcffibgen"))))
+ (invoke "make" "xcffib")))
+ (add-before 'build 'fix-libxcb-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "xcffib/__init__.py"
+ (("ctypes\\.util\\.find_library\\(\"xcb\"\\)")
+ (format #f "~s"
+ (search-input-file inputs "/lib/libxcb.so.1")))))))))
+ (home-page "https://github.com/tych0/xcffib")
+ (synopsis "XCB Python bindings")
+ (description
+ "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
+support for Python 3 and PyPy. It is based on cffi.")
+ (license license:expat)))
+
(define-public randrproto
(package
(name "randrproto")
- 61/222: gnu: python-nbclient: Add Setuptools and Wheel., (continued)
- 61/222: gnu: python-nbclient: Add Setuptools and Wheel., guix-commits, 2024/11/01
- 82/222: gnu: python-prometheus-client: Update to 0.20.0., guix-commits, 2024/11/01
- 94/222: gnu: python-jsonpointer: Update to 1.14., guix-commits, 2024/11/01
- 96/222: gnu: Add python-jupyter-events., guix-commits, 2024/11/01
- 105/222: gnu: python-sparqlkernel: Patch install script., guix-commits, 2024/11/01
- 110/222: gnu: python-openapi-core: Update to 0.19.1., guix-commits, 2024/11/01
- 106/222: gnu: Add python-pathable., guix-commits, 2024/11/01
- 126/222: gnu: python-sphinx-4: Inherit from python-sphinx-5., guix-commits, 2024/11/01
- 134/222: gnu: python-jupyterlab-widgets: Update to 3.0.10., guix-commits, 2024/11/01
- 174/222: gnu: python-amqp: Move to pyproject-build-system., guix-commits, 2024/11/01
- 150/222: gnu: python-xcffib: Move to (gnu packages xorg).,
guix-commits <=
- 129/222: gnu: python-mistune: Update to 3.0.2., guix-commits, 2024/11/01
- 175/222: gnu: python-sphinx-autodoc-typehints: Move to pyproject-build-system., guix-commits, 2024/11/01
- 180/222: gnu: python-pytest-toolbox: Move to pyproject-build-system., guix-commits, 2024/11/01
- 194/222: gnu: python-autoflake: Update to 2.3.1., guix-commits, 2024/11/01
- 201/222: gnu: python-uqbar: Improve package style., guix-commits, 2024/11/01
- 208/222: gnu: tuir: Move to pyproject-build-system., guix-commits, 2024/11/01
- 209/222: gnu: python-fenics-dijitso: Move to pyproject-build-system., guix-commits, 2024/11/01
- 211/222: gnu: python-numpydoc: Move to pyproject-build-sytem., guix-commits, 2024/11/01
- 214/222: gnu: python-certauth: Move to pyproject-build-system., guix-commits, 2024/11/01
- 218/222: gnu: python-cssselect2: Move to pyproject-build-system., guix-commits, 2024/11/01