diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index bc5e6820f3..c4bdb6aca0 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -2082,7 +2082,21 @@ (define-public qgis (("sip_dir = cfg.default_sip_dir") (string-append "sip_dir = \"" (assoc-ref inputs "python-pyqt+qscintilla") - "/share/sip\""))) + "/share/sip\"")) + ;; Fix building with python-sip@5. + ;; + ;; The reason for this is that python-sip@5 introduces some + ;; changes such as a new build system 'sip-build' as well as the + ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/" + ;; instead of "/share/sip/" for .sip files. However, we do not + ;; actually use that those yet. QGIS detects SIP5 and assumes we + ;; are, messing up the build. The long term solution is to fully + ;; upgrade SIP, use sip-build and fix all failing packages, but + ;; for now I just want to get the build working. + ((".pyqt_sip_dir...os.path.join.*,") + (string-append "'pyqt_sip_dir': \"" + (assoc-ref inputs "python-pyqt+qscintilla") + "/share/sip" "\","))) (substitute* (list "scripts/prepare_commit.sh" "scripts/qstringfixup.sh" "scripts/release.pl" diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ff1b46f095..c1c29bc1d3 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2290,7 +2290,8 @@ (define-public veusz (native-inputs `(("pkg-config" ,pkg-config) ;;("python-astropy" ,python-astropy) ;; FIXME: Package this. - ("qttools" ,qttools))) + ("qttools" ,qttools) + ("python-sip" ,python-sip-4))) (inputs `(("ghostscript" ,ghostscript) ;optional, for EPS/PS output ("python-dbus" ,python-dbus) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index cbbdf68f5b..689d03afc8 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -339,7 +339,7 @@ (define-public python-poppler-qt5 (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("python-sip" ,python-sip) + `(("python-sip" ,python-sip-4) ("python-pyqt" ,python-pyqt) ("poppler-qt5" ,poppler-qt5) ("qtbase" ,qtbase))) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 21ccf15dc3..83501b82ca 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2020 Jonathan Brielmaier ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2021 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ (define-module (gnu packages qt) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) #:use-module (gnu packages regex) #:use-module (gnu packages ruby) @@ -1806,6 +1808,42 @@ (define (delete-unwanted-files child stat flag base level) (define-public python-sip (package + (name "python-sip") + (version "5.5.0") + (source + (origin + (method url-fetch) + (uri (list (pypi-uri "sip" version) + (string-append "https://www.riverbankcomputing.com/static/" + "Downloads/sip/" version + "/sip-" version ".tar.gz"))) + (sha256 + (base32 + "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx")))) + (build-system python-build-system) + (native-inputs + `(("python" ,python-wrapper))) + (propagated-inputs + `(("python-toml" ,python-toml) + ("python-packaging" ,python-packaging))) + (home-page "https://www.riverbankcomputing.com/software/sip/intro") + (synopsis "Python binding creator for C and C++ libraries") + (description + "SIP is a tool to create Python bindings for C and C++ libraries. It +was originally developed to create PyQt, the Python bindings for the Qt +toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator +processes a set of specification files and generates C or C++ code, which +is then compiled to create the bindings extension module. The SIP Python +module provides support functions to the automatically generated code.") + ;; There is a choice between a python like license, gpl2 and gpl3. + ;; For compatibility with pyqt, we need gpl3. + (license license:gpl3))) + +(define-public python-sip-4 + (package + (inherit python-sip) (name "python-sip") (version "4.19.24") (source @@ -1821,6 +1859,7 @@ (define-public python-sip (build-system gnu-build-system) (native-inputs `(("python" ,python-wrapper))) + (propagated-inputs `()) (arguments `(#:tests? #f ; no check target #:imported-modules ((guix build python-build-system) @@ -1843,23 +1882,10 @@ (define-public python-sip "--bindir" bin "--destdir" lib "--incdir" include))))))) - (home-page "https://www.riverbankcomputing.com/software/sip/intro") - (synopsis "Python binding creator for C and C++ libraries") - (description - "SIP is a tool to create Python bindings for C and C++ libraries. It -was originally developed to create PyQt, the Python bindings for the Qt -toolkit, but can be used to create bindings for any C or C++ library. - -SIP comprises a code generator and a Python module. The code generator -processes a set of specification files and generates C or C++ code, which -is then compiled to create the bindings extension module. The SIP Python -module provides support functions to the automatically generated code.") - ;; There is a choice between a python like license, gpl2 and gpl3. - ;; For compatibility with pyqt, we need gpl3. (license license:gpl3))) (define-public python2-sip - (package/inherit python-sip + (package/inherit python-sip-4 (name "python2-sip") (native-inputs `(("python" ,python-2)))))