From 1562b14afb469b7f31121145b2899a37eeb346ba Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 6 Jul 2019 09:13:50 -0700 Subject: [PATCH 04/11] gnu: Add python-shiboken-2. * gnu/packages/python-xyz.scm (python-shiboken-2): New variable. --- gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index d8f144893d..e1a3e387a1 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -64,6 +64,7 @@ ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Pierre Langlois ;;; Copyright © 2019 Jacob MacDonald +;;; Copyright © 2019 John Soo ;;; ;;; This file is part of GNU Guix. ;;; @@ -16041,3 +16042,49 @@ one-off scripts.") time-or-computationally-expensive properties quick and easy and works in Python 2 or 3.") (license license:bsd-3))) + +(define-public python-shiboken-2 + (let ((revision "1") + (commit "4018787a3cc01d632fdca7891ac8aa9487110c26")) + (package + (name "python-shiboken-2") + (version (git-version "v5.11.3" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://code.qt.io/pyside/pyside-setup") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5")))) + (build-system cmake-build-system) + (inputs + `(("llvm-toolchain-6" ,llvm-toolchain-6) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("python-wrapper" ,python-wrapper) + ("qtbase" ,qtbase) + ("qtxmlpatterns" ,qtxmlpatterns))) + (arguments + `(#:tests? #f + #:configure-flags '("-DBUILD_TESTS=off") + #:phases + (modify-phases + %standard-phases + (add-after 'unpack 'use-shiboken-dir-only + (lambda _ (chdir "sources/shiboken2") #t)) + (add-before 'configure 'set-build-env + (lambda* (#:key inputs #:allow-other-keys) + (let ((llvm-toolchain-dir (assoc-ref inputs "llvm-toolchain-6"))) + (setenv "CLANG_INSTALL_DIR" llvm-toolchain-dir) + #t)))))) + (home-page "https://wiki.qt.io/Qt_for_Python") + (synopsis + "Shiboken generates bindings for C++ libraries using CPython source code") + (description + "Shiboken generates bindings for C++ libraries using CPython source code") + ;; Help! + (license `(,license:gpl2+ + ,license:llgpl))))) -- 2.22.0