Archived
1
0
Fork 0

gnu: python-pyside: Update to 5.12.6.

* gnu/packages/qt.scm (python-shiboken-2): Update to 5.12.6.
[source]: Download tarball release instead of git repository.
[arguments]: Add phase to make files writable and update timestamps.
(python-pyside-2): Inherit version and source from PYTHON-SHIBOKEN-2.
[native-inputs]: Remove LIBCXX-6.  Rename "python-wrapper" input to "python".
Change from CMAKE to CMAKE-MINIMAL.
[arguments]: Remove libcxx substitution.  Add "-DPYTHON_EXECUTABLE" in
 #:configure-flags.
(python-pyside-2-tools)[native-inputs]: Add PYTHON-WRAPPER.
[arguments]: Set "-DPYTHON_EXECUTABLE" in #:configure-flags.  Add phase
'go-to-source-dir'.
This commit is contained in:
Marius Bakke 2020-03-15 13:27:53 +01:00
parent 0b6de85a4a
commit 76e0b5ba26
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -2515,25 +2515,18 @@ color-related widgets.")
(license license:lgpl3+)))) (license license:lgpl3+))))
(define-public python-shiboken-2 (define-public python-shiboken-2
(let ((revision "1")
;; Pinned to branches with support for qt 5.11.3
(commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
(package (package
(name "python-shiboken-2") (name "python-shiboken-2")
(version (git-version "v5.11.3" revision commit)) (version "5.12.6")
(source (source (origin
(origin (method url-fetch)
(method git-fetch) (uri (string-append "https://download.qt.io/official_releases"
(uri (git-reference "/QtForPython/pyside2/PySide2-" version
;; The latest versions of Shiboken live in the pyside repo. "-src/pyside-setup-everywhere-src-"
;; There is another standalone repo only for Shiboken version ".tar.xz"))
;; but it is outdated
(url "https://code.qt.io/pyside/pyside-setup")
(commit commit)))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5")))) "1n45l6xxyxs6cfp2l4rp8qs1c2fyfwyrdxa4qcpwfsqsi51rydsk"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(inputs (inputs
`(("clang-toolchain" ,clang-toolchain-6) `(("clang-toolchain" ,clang-toolchain-6)
@ -2550,6 +2543,18 @@ color-related widgets.")
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'use-shiboken-dir-only (add-after 'unpack 'use-shiboken-dir-only
(lambda _ (chdir "sources/shiboken2") #t)) (lambda _ (chdir "sources/shiboken2") #t))
(add-before 'configure 'make-files-writable-and-update-timestamps
(lambda _
;; The build scripts need to modify some files in
;; the read-only source directory, and also attempts
;; to create Zip files which fails because the Zip
;; format does not support timestamps before 1980.
(let ((circa-1980 (* 10 366 24 60 60)))
(for-each (lambda (file)
(make-file-writable file)
(utime file circa-1980 circa-1980))
(find-files ".")))
#t))
(add-before 'configure 'set-build-env (add-before 'configure 'set-build-env
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((llvm (assoc-ref inputs "clang-toolchain"))) (let ((llvm (assoc-ref inputs "clang-toolchain")))
@ -2566,29 +2571,16 @@ color-related widgets.")
;; Examples are BSD-3. ;; Examples are BSD-3.
license:gpl3 license:gpl3
license:lgpl3 license:lgpl3
license:bsd-3))))) license:bsd-3))))
(define-public python-pyside-2 (define-public python-pyside-2
(let ((revision "1")
;; Pinned to branches with support for qt 5.11.3
(commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
(package (package
(name "python-pyside-2") (name "python-pyside-2")
(version (git-version "v5.11.3" revision commit)) (version (package-version python-shiboken-2))
(source (source (package-source python-shiboken-2))
(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) (build-system cmake-build-system)
(inputs (inputs
`(("libcxx" ,libcxx-6) `(("libxml2" ,libxml2)
("libxml2" ,libxml2)
("libxslt" ,libxslt) ("libxslt" ,libxslt)
("clang-toolchain" ,clang-toolchain-6) ("clang-toolchain" ,clang-toolchain-6)
("qtbase" ,qtbase) ("qtbase" ,qtbase)
@ -2606,27 +2598,27 @@ color-related widgets.")
("qtx11extras" ,qtx11extras) ("qtx11extras" ,qtx11extras)
("qtxmlpatterns" ,qtxmlpatterns))) ("qtxmlpatterns" ,qtxmlpatterns)))
(native-inputs (native-inputs
`(("cmake" ,cmake) `(("cmake" ,cmake-minimal)
("python-shiboken-2" ,python-shiboken-2) ("python-shiboken-2" ,python-shiboken-2)
("python-wrapper" ,python-wrapper) ("python" ,python-wrapper)
("qttools" ,qttools) ("qttools" ,qttools)
("which" ,which))) ("which" ,which)))
(arguments (arguments
`(#:tests? #f `(#:tests? #f
;; FIXME: Building tests fail. ;; FIXME: Building tests fail.
#:configure-flags '("-DBUILD_TESTS=FALSE") #:configure-flags
(list "-DBUILD_TESTS=FALSE"
(string-append "-DPYTHON_EXECUTABLE="
(assoc-ref %build-inputs "python")
"/bin/python"))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'go-to-source-dir (add-after 'unpack 'go-to-source-dir
(lambda _ (chdir "sources/pyside2") #t)) (lambda _ (chdir "sources/pyside2") #t))
(add-before 'configure 'set-clang-dir (add-before 'configure 'set-clang-dir
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((clang (assoc-ref inputs "clang-toolchain")) (let ((clang (assoc-ref inputs "clang-toolchain")))
(libcxx (assoc-ref inputs "libcxx")))
(setenv "CLANG_INSTALL_DIR" clang) (setenv "CLANG_INSTALL_DIR" clang)
(substitute* "cmake/Macros/PySideModules.cmake"
(("--include-paths=")
(string-append "--include-paths=" libcxx "/include/c++/v1:")))
#t)))))) #t))))))
(home-page "https://wiki.qt.io/Qt_for_Python") (home-page "https://wiki.qt.io/Qt_for_Python")
(synopsis (synopsis
@ -2647,36 +2639,33 @@ generate Python bindings for your C or C++ code.")
;; approved by the KDE Free Qt Foundation. ;; approved by the KDE Free Qt Foundation.
;; Thus, it is currently v2 or v3, but no "+". ;; Thus, it is currently v2 or v3, but no "+".
license:gpl3 license:gpl3
license:gpl2))))) license:gpl2))))
(define-public python-pyside-2-tools (define-public python-pyside-2-tools
(let ((revision "1")
;; Pinned to branches with support for qt 5.11.3
(commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
(package (package
(name "python-pyside-2-tools") (name "python-pyside-2-tools")
(version (git-version "v5.11.2" revision commit)) (version (package-version python-shiboken-2))
(source (source (package-source python-shiboken-2))
(origin
(method git-fetch)
(uri (git-reference
(url "https://code.qt.io/pyside/pyside-tools")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(inputs (inputs
`(("python-pyside-2" ,python-pyside-2) `(("python-pyside-2" ,python-pyside-2)
("python-shiboken-2" ,python-shiboken-2) ("python-shiboken-2" ,python-shiboken-2)
("qtbase" ,qtbase))) ("qtbase" ,qtbase)))
(native-inputs
`(("python" ,python-wrapper)))
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:configure-flags '("-DBUILD_TESTS=off"))) #:configure-flags
(list "-DBUILD_TESTS=off"
(string-append "-DPYTHON_EXECUTABLE="
(assoc-ref %build-inputs "python")
"/bin/python"))
#:phases (modify-phases %standard-phases
(add-after 'unpack 'go-to-source-dir
(lambda _ (chdir "sources/pyside2-tools") #t)))))
(home-page "https://wiki.qt.io/Qt_for_Python") (home-page "https://wiki.qt.io/Qt_for_Python")
(synopsis (synopsis
"Contains command line tools for PySide2") "Contains command line tools for PySide2")
(description (description
"Contains lupdate, rcc and uic tools for PySide2") "Contains lupdate, rcc and uic tools for PySide2")
(license license:gpl2)))) (license license:gpl2)))