gnu: qgis: Improve package style.
* gnu/packages/geo.scm (qgis)[arguments]<#:phases>: Extract ignored-tests to make them more readable. Re-indent. Change-Id: I2373bba49b9d21ff7dfa0014cf34fafa0e1f3175 Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>master
parent
dcc278885c
commit
65f58ade59
|
@ -2931,49 +2931,8 @@ growing set of geoscientific methods.")
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
#~(list "-DWITH_QTWEBKIT=NO")
|
#~(list "-DWITH_QTWEBKIT=NO")
|
||||||
#:phases
|
#:phases
|
||||||
#~(let* ((grass-version #$(package-version (this-package-input "grass")))
|
#~(let* ((ignored-tests (list
|
||||||
(grass-majorminor (string-join
|
;; Disable tests that require network access
|
||||||
(list-head
|
|
||||||
(string-split grass-version #\.) 2)
|
|
||||||
""))
|
|
||||||
(grass-dir (string-append #$(this-package-input "grass")
|
|
||||||
"/grass" grass-majorminor)))
|
|
||||||
(modify-phases %standard-phases
|
|
||||||
;; Configure correct path to PyQt5 SIP directory
|
|
||||||
(add-after 'unpack 'configure-pyqt5-sip-path
|
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
|
||||||
(let ((sip-dir (string-append
|
|
||||||
(assoc-ref inputs "python-pyqt+qscintilla")
|
|
||||||
"/lib/python"
|
|
||||||
(python:python-version (assoc-ref inputs "python"))
|
|
||||||
"/site-packages/PyQt5/bindings")))
|
|
||||||
(substitute* "cmake/FindPyQt5.py"
|
|
||||||
(("sip_dir = cfg.default_sip_dir")
|
|
||||||
(string-append "sip_dir = \"" sip-dir "\"")))
|
|
||||||
(substitute* "cmake/FindPyQt5.cmake"
|
|
||||||
(("SET\\(PYQT5_SIP_DIR \"\\$\\{Python_SITEARCH\\}/PyQt5/bindings\"\\)")
|
|
||||||
(string-append "SET(PYQT5_SIP_DIR \"" sip-dir "\")"))))
|
|
||||||
(substitute* (list "tests/code_layout/test_qt_imports.sh"
|
|
||||||
"tests/code_layout/test_qgsscrollarea.sh")
|
|
||||||
(("\\$\\(git rev-parse --show-toplevel\\)")
|
|
||||||
(getcwd)))))
|
|
||||||
(replace 'check
|
|
||||||
(lambda* (#:key inputs outputs tests? parallel-tests?
|
|
||||||
#:allow-other-keys)
|
|
||||||
(if tests?
|
|
||||||
(begin
|
|
||||||
(setenv "HOME" "/tmp")
|
|
||||||
(system "Xvfb :1 &")
|
|
||||||
(setenv "DISPLAY" ":1")
|
|
||||||
(setenv "TRAVIS" "true")
|
|
||||||
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
|
|
||||||
(setenv "GISBASE" grass-dir)
|
|
||||||
(invoke "ctest"
|
|
||||||
"-j" (if parallel-tests?
|
|
||||||
(number->string (parallel-job-count))
|
|
||||||
"1")
|
|
||||||
"-E" (string-join
|
|
||||||
'(;; Disable tests that require network access
|
|
||||||
"PyQgsExternalStorageAwsS3"
|
"PyQgsExternalStorageAwsS3"
|
||||||
"PyQgsExternalStorageWebDav"
|
"PyQgsExternalStorageWebDav"
|
||||||
"qgis_filedownloader"
|
"qgis_filedownloader"
|
||||||
|
@ -3057,16 +3016,58 @@ growing set of geoscientific methods.")
|
||||||
"PyQgsSelectiveMasking"
|
"PyQgsSelectiveMasking"
|
||||||
"qgis_sipify"
|
"qgis_sipify"
|
||||||
"qgis_sip_include"
|
"qgis_sip_include"
|
||||||
"qgis_sip_uptodate")
|
"qgis_sip_uptodate"))
|
||||||
"|")))
|
(grass-version #$(package-version (this-package-input "grass")))
|
||||||
|
(grass-majorminor (string-join
|
||||||
|
(list-head
|
||||||
|
(string-split grass-version #\.) 2)
|
||||||
|
""))
|
||||||
|
(grass-dir (string-append #$(this-package-input "grass")
|
||||||
|
"/grass" grass-majorminor)))
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
;; Configure correct path to PyQt5 SIP directory
|
||||||
|
(add-after 'unpack 'configure-pyqt5-sip-path
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((sip-dir (string-append
|
||||||
|
(assoc-ref inputs "python-pyqt+qscintilla")
|
||||||
|
"/lib/python"
|
||||||
|
(python:python-version (assoc-ref inputs "python"))
|
||||||
|
"/site-packages/PyQt5/bindings")))
|
||||||
|
(substitute* "cmake/FindPyQt5.py"
|
||||||
|
(("sip_dir = cfg.default_sip_dir")
|
||||||
|
(string-append "sip_dir = \"" sip-dir "\"")))
|
||||||
|
(substitute* "cmake/FindPyQt5.cmake"
|
||||||
|
(("\
|
||||||
|
SET\\(PYQT5_SIP_DIR \"\\$\\{Python_SITEARCH\\}/PyQt5/bindings\"\\)")
|
||||||
|
(string-append "SET(PYQT5_SIP_DIR \"" sip-dir "\")"))))
|
||||||
|
(substitute* (list "tests/code_layout/test_qt_imports.sh"
|
||||||
|
"tests/code_layout/test_qgsscrollarea.sh")
|
||||||
|
(("\\$\\(git rev-parse --show-toplevel\\)")
|
||||||
|
(getcwd)))))
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key inputs outputs tests? parallel-tests?
|
||||||
|
#:allow-other-keys)
|
||||||
|
(if tests?
|
||||||
|
(begin
|
||||||
|
(setenv "HOME" "/tmp")
|
||||||
|
(system "Xvfb :1 &")
|
||||||
|
(setenv "DISPLAY" ":1")
|
||||||
|
(setenv "TRAVIS" "true")
|
||||||
|
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
|
||||||
|
(setenv "GISBASE" grass-dir)
|
||||||
|
(invoke "ctest"
|
||||||
|
"-j" (if parallel-tests?
|
||||||
|
(number->string (parallel-job-count))
|
||||||
|
"1")
|
||||||
|
"-E" (string-join ignored-tests "|")))
|
||||||
(format #t "test suite not run~%"))))
|
(format #t "test suite not run~%"))))
|
||||||
(add-after 'install 'wrap-python
|
(add-after 'install 'wrap-python
|
||||||
(assoc-ref python:%standard-phases 'wrap))
|
(assoc-ref python:%standard-phases 'wrap))
|
||||||
(add-after 'wrap-python 'wrap-qt
|
(add-after 'wrap-python 'wrap-qt
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(wrap-qt-program "qgis" #:output #$output #:inputs inputs)))
|
(wrap-qt-program "qgis" #:output #$output #:inputs inputs)))
|
||||||
(add-after 'wrap-qt 'wrap-gis
|
(add-after 'wrap-qt 'wrap-gis
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; TODO: Find if there is a way to get SAGA to work.
|
;; TODO: Find if there is a way to get SAGA to work.
|
||||||
;; Currently QGIS says "version of SAGA not supported".
|
;; Currently QGIS says "version of SAGA not supported".
|
||||||
;; Disable it for now.
|
;; Disable it for now.
|
||||||
|
|
Reference in New Issue