[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/15: gnu: python-cairocffi: Update to 1.2.0.
From: |
guix-commits |
Subject: |
03/15: gnu: python-cairocffi: Update to 1.2.0. |
Date: |
Sun, 29 Nov 2020 14:08:55 -0500 (EST) |
apteryx pushed a commit to branch master
in repository guix.
commit 4035c2e402eb7ff42ecceacd927f34997367cdf5
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Nov 27 17:07:06 2020 -0500
gnu: python-cairocffi: Update to 1.2.0.
* gnu/packages/python-xyz.scm (python-cairocffi): Update to 1.2.0.
[source]: Fetch from Git.
[patches]: Remove field.
[inputs]: Remove pango.
[native-inputs]: Remove pkg-config and python-docutils. Add python-numpy
and
python-sphinx-rtd-theme.
[phases]{patch-paths}: Adjust. Fix the patching of gdk-3.
{disable-linters}: New phase.
{install-doc}: Adjust. The license file is now installed by a build phase.
* gnu/packages/patches/python-cairocffi-dlopen-path.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register it.
---
gnu/local.mk | 1 -
.../patches/python-cairocffi-dlopen-path.patch | 10 ---
gnu/packages/python-xyz.scm | 77 ++++++++++++----------
3 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8f9ed31..0fd2f78 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1513,7 +1513,6 @@ dist_patch_DATA =
\
%D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \
%D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \
%D%/packages/patches/python-axolotl-AES-fix.patch \
- %D%/packages/patches/python-cairocffi-dlopen-path.patch \
%D%/packages/patches/python-cross-compile.patch \
%D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
%D%/packages/patches/python-configobj-setuptools.patch \
diff --git a/gnu/packages/patches/python-cairocffi-dlopen-path.patch
b/gnu/packages/patches/python-cairocffi-dlopen-path.patch
deleted file mode 100644
index e7a7fe3..0000000
--- a/gnu/packages/patches/python-cairocffi-dlopen-path.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- cairocffi-0.8.0/cairocffi/__init__.py.orig 2018-07-16 11:00:59.075664158
+0200
-+++ cairocffi-0.8.0/cairocffi/__init__.py 2018-07-16 17:09:42.471958015
+0200
-@@ -35,6 +35,7 @@
- return lib
- except OSError:
- pass
-+ return ffi.dlopen(name)
- raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
-
-
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 30dacdc..9317868 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6056,59 +6056,70 @@ support for Python 3 and PyPy. It is based on cffi.")
(define-public python-cairocffi
(package
(name "python-cairocffi")
- (version "0.9.0")
+ (version "1.2.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "cairocffi" version))
+ ;; The PyPI archive does not include the documentation, so use Git.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Kozea/cairocffi")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
- (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
+ "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
(build-system python-build-system)
(outputs '("out" "doc"))
(inputs
`(("glib" ,glib)
("gtk+" ,gtk+)
("gdk-pixbuf" ,gdk-pixbuf)
- ("cairo" ,cairo)
- ("pango" ,pango)))
+ ("cairo" ,cairo)))
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("python-numpy" ,python-numpy)
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-runner" ,python-pytest-runner)
("python-sphinx" ,python-sphinx)
- ("python-docutils" ,python-docutils)))
+ ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
(propagated-inputs
`(("python-xcffib" ,python-xcffib))) ; used at run time
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* (find-files "." "\\.py$")
- (("dlopen\\(ffi, 'cairo'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
- "/lib/libcairo.so.2'"))
- (("dlopen\\(ffi, 'gdk-3'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
- "/lib/libgtk-3.so.0'"))
- (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
- "/lib/libgdk_pixbuf-2.0.so.0'"))
- (("dlopen\\(ffi, 'glib-2.0'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
- "/lib/libglib-2.0.so.0'"))
- (("dlopen\\(ffi, 'gobject-2.0'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
- "/lib/libgobject-2.0.so.0'"))
- (("dlopen\\(ffi, 'pangocairo-1.0'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
- "/lib/libpangocairo-1.0.so.0'"))
- (("dlopen\\(ffi, 'pango-1.0'")
- (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
- "/lib/libpango-1.0.so.0'")))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "cairocffi/__init__.py"
+ ;; Hack the dynamic library loading mechanism.
+ (("find_library\\(library_name\\)")
+ "\"found\"")
+ (("filenames = \\(library_filename,\\) \\+ filenames")
+ "pass")
+ (("libcairo.so.2")
+ (string-append (assoc-ref inputs "cairo")
+ "/lib/libcairo.so.2")))
+ (substitute* "cairocffi/pixbuf.py"
+ (("libgdk_pixbuf-2.0.so.0")
+ (string-append (assoc-ref inputs "gdk-pixbuf")
+ "/lib/libgdk_pixbuf-2.0.so.0"))
+ (("libgobject-2.0.so.0")
+ (string-append (assoc-ref inputs "glib")
+ "/lib/libgobject-2.0.so.0"))
+ (("libglib-2.0.so.0")
+ (string-append (assoc-ref inputs "glib")
+ "/lib/libglib-2.0.so.0"))
+ (("libgdk-3.so.0")
+ (string-append (assoc-ref inputs "gtk+")
+ "/lib/libgdk-3.so.0")))
+ #t))
+ (add-after 'unpack 'disable-linters
+ ;; Their check fails; none of our business.
+ (lambda _
+ (substitute* "setup.cfg"
+ ((".*pytest-flake8.*") "")
+ ((".*pytest-isort.*") "")
+ (("--flake8") "")
+ (("--isort") ""))
#t))
(add-after 'install 'install-doc
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -6123,7 +6134,7 @@ support for Python 3 and PyPy. It is based on cffi.")
(for-each (lambda (file)
(copy-file (string-append "." file)
(string-append doc file)))
- '("/README.rst" "/CHANGES" "/LICENSE"))
+ '("/README.rst" "/NEWS.rst"))
(system* "python" "setup.py" "build_sphinx")
(copy-recursively "docs/_build/html" html)
#t))))))
- branch master updated (0216fc2 -> c601e2b), guix-commits, 2020/11/29
- 04/15: gnu: Add python-iniconfig., guix-commits, 2020/11/29
- 02/15: gnu: python-cairocffi: Fix indentation., guix-commits, 2020/11/29
- 01/15: gnu: python-html5lib: Update to 1.1., guix-commits, 2020/11/29
- 05/15: gnu: Add python-py-next., guix-commits, 2020/11/29
- 03/15: gnu: python-cairocffi: Update to 1.2.0.,
guix-commits <=
- 06/15: gnu: python-typing-extensions: Update to 3.7.4.3., guix-commits, 2020/11/29
- 09/15: gnu: python-mypy: Update to 0.790., guix-commits, 2020/11/29
- 14/15: gnu: python-pyphen: Update to 0.10.0., guix-commits, 2020/11/29
- 07/15: gnu: Add python-pytest-6., guix-commits, 2020/11/29
- 15/15: gnu: weasyprint: Update to 52.1., guix-commits, 2020/11/29
- 13/15: gnu: python-tinycss2: Update to 1.1.0., guix-commits, 2020/11/29
- 08/15: gnu: python-pytest-xdist: Update to 2.1.0., guix-commits, 2020/11/29
- 10/15: gnu: python-cairosvg: Update to 2.5.0., guix-commits, 2020/11/29
- 11/15: gnu: python-cssselect2: Update to 0.4.1., guix-commits, 2020/11/29
- 12/15: gnu: python-flit: Update to 3.0.0., guix-commits, 2020/11/29