summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-08-07 16:41:40 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-08-08 23:02:35 +0100
commitbd31c5acf12b813fd3a7e1268bbc0d4b014ccfb7 (patch)
tree99937c85a8b7ae2d0356f404207c54586a5014b8 /gnu/packages
parentd0344c29fcbd91975be1826d98bf70f9db2c882e (diff)
gnu: python-pyside-6: Install dist info.
* gnu/packages/qt.scm (python-pyside-6)[arguments] {imported-modules, modules}: Add pyproject modules. {phases}: Add phase 'install-distinfo, rewrite phase 'fix-qt-module-detection. Relates-to: guix/guix!10412 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/qt.scm44
1 files changed, 29 insertions, 15 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c785925bf75..91bb0049ab2 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -5832,6 +5832,13 @@ Version: ~a~%" name #$version)))))
5832 (arguments 5832 (arguments
5833 (list 5833 (list
5834 #:tests? #f 5834 #:tests? #f
5835 #:imported-modules (append %cmake-build-system-modules
5836 %pyproject-build-system-modules)
5837 #:modules '((guix build cmake-build-system)
5838 ((guix build pyproject-build-system) #:prefix py:)
5839 (guix build utils)
5840 (ice-9 match)
5841 (srfi srfi-1))
5835 #:configure-flags 5842 #:configure-flags
5836 #~(list "-DBUILD_TESTS=FALSE" 5843 #~(list "-DBUILD_TESTS=FALSE"
5837 (string-append "-DPYTHON_EXECUTABLE=" 5844 (string-append "-DPYTHON_EXECUTABLE="
@@ -5840,30 +5847,37 @@ Version: ~a~%" name #$version)))))
5840 #~(modify-phases %standard-phases 5847 #~(modify-phases %standard-phases
5841 (add-after 'unpack 'go-to-source-dir 5848 (add-after 'unpack 'go-to-source-dir
5842 (lambda _ (chdir "sources/pyside6"))) 5849 (lambda _ (chdir "sources/pyside6")))
5850 ;; .dist-info in site-packages is necessary for sanity-check.
5851 (add-after 'install 'install-distinfo
5852 (lambda* (#:key inputs outputs #:allow-other-keys)
5853 (with-directory-excursion (py:site-packages inputs outputs)
5854 (let ((dir (string-append "PySide6-" #$version ".dist-info")))
5855 (mkdir-p dir)
5856 (call-with-output-file (string-append dir "/METADATA")
5857 (lambda (port)
5858 (format port "\
5859Metadata-Version: 1.1
5860Name: PySide6
5861Version: ~a
5862Requires-Dist: shiboken6==~a~%" #$version #$version)))))))
5843 (add-after 'go-to-source-dir 'set-rpath 5863 (add-after 'go-to-source-dir 'set-rpath
5844 (lambda _ 5864 (lambda _
5845 (substitute* "CMakeLists.txt" 5865 (substitute* "CMakeLists.txt"
5846 (("CMAKE_INSTALL_RPATH") 5866 (("CMAKE_INSTALL_RPATH")
5847 (string-append "CMAKE_INSTALL_RPATH " #$output "/lib"))))) 5867 (string-append "CMAKE_INSTALL_RPATH " #$output "/lib")))))
5848 (add-after 'go-to-source-dir 'fix-qt-module-detection 5868 (add-after 'go-to-source-dir 'fix-qt-module-detection
5849 (lambda _ 5869 (lambda* (#:key inputs #:allow-other-keys)
5850 (substitute* "cmake/PySideHelpers.cmake" 5870 (substitute* "cmake/PySideHelpers.cmake"
5851 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") 5871 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
5852 "true")) 5872 "true"))
5853 (let ((dirs (map (lambda (path) 5873 (define (search-input-directories dir)
5854 (string-append path "/include/qt6")) 5874 (filter-map
5855 (list 5875 (match-lambda
5856 #$@(map (lambda (name) 5876 ((name . directory)
5857 (this-package-input name)) 5877 (and (directory-exists? directory)
5858 '("qtdeclarative" 5878 (string-append directory "/" dir))))
5859 "qtmultimedia" 5879 inputs))
5860 "qtnetworkauth" 5880 (let ((dirs (search-input-directories "include/qt6")))
5861 "qtpositioning"
5862 "qtsvg"
5863 "qttools"
5864 "qtwebchannel"
5865 "qtwebengine"
5866 "qtwebsockets"))))))
5867 (substitute* "cmake/Macros/PySideModules.cmake" 5881 (substitute* "cmake/Macros/PySideModules.cmake"
5868 (("set\\(shiboken_include_dir_list " all) 5882 (("set\\(shiboken_include_dir_list " all)
5869 (string-append all (string-join dirs ";") " "))) 5883 (string-append all (string-join dirs ";") " ")))