From acfc9b8a1d29f51018f286ac7f2408cce323239e Mon Sep 17 00:00:00 2001 From: John Soo Date: Mon, 2 Sep 2019 07:27:15 -0700 Subject: [PATCH 05/10] gnu: Add python-pyside-2. * gnu/packages/qt.scm (python-pyside-2): New variable. --- gnu/packages/qt.scm | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 4ccb8a84b2..63c8fc7da3 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2331,3 +2331,83 @@ color-related widgets.") ;; Help! (license `(,license:gpl2+ ,license:llgpl))))) + +(define-public python-pyside-2 + (let ((revision "1") + (commit "4018787a3cc01d632fdca7891ac8aa9487110c26")) + (package + (name "python-pyside-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 + `(("libcxx" ,libcxx-6) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("llvm-toolchain-6" ,llvm-toolchain-6) + ("qtbase" ,qtbase) + ("qtdatavis3d" ,qtdatavis3d) + ("qtlocation" ,qtlocation) + ("qtmultimedia" ,qtmultimedia) + ("qtquickcontrols" ,qtquickcontrols) + ("qtscript" ,qtscript) + ("qtscxml" ,qtscxml) + ("qtsensors" ,qtsensors) + ("qtspeech" ,qtspeech) + ("qtsvg" ,qtsvg) + ("qtwebchannel" ,qtwebchannel) + ("qtwebsockets" ,qtwebsockets) + ("qtx11extras" ,qtx11extras) + ("qtxmlpatterns" ,qtxmlpatterns))) + (native-inputs + `(("cmake" ,cmake) + ("git" ,git) + ("python-shiboken-2" ,python-shiboken-2) + ("python-wrapper" ,python-wrapper) + ("qttools" ,qttools) + ("which" ,which))) + (arguments + `(#:tests? #f + ;; FIXME: Building tests fail. + #:configure-flags '("-DBUILD_TESTS=FALSE") + #:phases + (modify-phases + %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside2") #t)) + (add-before 'configure 'set-clang-dir + (lambda* (#:key inputs #:allow-other-keys) + (let ((clang (assoc-ref inputs "llvm-toolchain-6")) + (libcxx (assoc-ref inputs "libcxx"))) + (setenv "CLANG_INSTALL_DIR" clang) + (substitute* "cmake/Macros/PySideModules.cmake" + (("--include-paths=") + (string-append "--include-paths=" libcxx "/include/c++/v1:"))) + #t)))))) + (home-page "https://wiki.qt.io/Qt_for_Python") + (synopsis + "The Qt for Python product enables the use of Qt5 APIs in Python applications") + (description + "The Qt for Python product enables the use of Qt5 APIs in Python +applications. It lets Python developers utilize the full potential of Qt, +using the PySide2 module. The PySide2 module provides access to the +individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also +comes with the Shiboken2 CPython binding code generator, which can be used to +generate Python bindings for your C or C++ code.") + ;; Help! + (license + `(,license:fdl1.3+ + ,license:gpl2+ + ,license:gpl3+ + ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT + ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL + ,license:lgpl3))))) -- 2.23.0