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>
This commit is contained in:
parent
dcc278885c
commit
65f58ade59
1 changed files with 151 additions and 150 deletions
|
@ -2931,7 +2931,93 @@ 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
|
||||||
|
;; Disable tests that require network access
|
||||||
|
"PyQgsExternalStorageAwsS3"
|
||||||
|
"PyQgsExternalStorageWebDav"
|
||||||
|
"qgis_filedownloader"
|
||||||
|
"test_core_networkaccessmanager"
|
||||||
|
"test_core_tiledownloadmanager"
|
||||||
|
"test_gui_filedownloader"
|
||||||
|
"test_provider_wcsprovider"
|
||||||
|
;; Disable tests that need OGR built with
|
||||||
|
;; libspatialite support
|
||||||
|
"PyQgsAttributeTableModel"
|
||||||
|
"PyQgsOGRProviderSqlite"
|
||||||
|
"PyQgsWFSProvider"
|
||||||
|
"PyQgsOapifProvider"
|
||||||
|
;; Disable tests that need Python compiled
|
||||||
|
;; with loadable SQLite extensions.
|
||||||
|
"PyQgsFieldFormattersTest"
|
||||||
|
"PyQgsSpatialiteProvider"
|
||||||
|
"PyQgsLayerDependencies"
|
||||||
|
"PyQgsDBManagerGpkg"
|
||||||
|
"PyQgsDBManagerSpatialite"
|
||||||
|
;; Disable tests that need poppler (with Cairo)
|
||||||
|
"PyQgsLayoutExporter"
|
||||||
|
"PyQgsPalLabelingLayout"
|
||||||
|
;; Disable tests that need Orfeo ToolBox
|
||||||
|
"ProcessingOtbAlgorithmsTest"
|
||||||
|
;; TODO: Find why the following tests fail
|
||||||
|
"ProcessingQgisAlgorithmsTestPt1"
|
||||||
|
"ProcessingQgisAlgorithmsTestPt3"
|
||||||
|
"ProcessingQgisAlgorithmsTestPt4"
|
||||||
|
"ProcessingGdalAlgorithmsRasterTest"
|
||||||
|
"ProcessingGdalAlgorithmsVectorTest"
|
||||||
|
"ProcessingGrass7AlgorithmsImageryTest"
|
||||||
|
"ProcessingGrass7AlgorithmsRasterTestPt1"
|
||||||
|
"ProcessingGrass7AlgorithmsRasterTestPt2"
|
||||||
|
"ProcessingGrass7AlgorithmsVectorTest"
|
||||||
|
"test_core_authconfig"
|
||||||
|
"test_core_authmanager"
|
||||||
|
"test_core_compositionconverter"
|
||||||
|
"test_core_expression"
|
||||||
|
"test_core_gdalutils"
|
||||||
|
"test_core_labelingengine"
|
||||||
|
"test_core_layoutpicture"
|
||||||
|
"test_core_layouttable"
|
||||||
|
"test_core_pointcloudlayerexporter"
|
||||||
|
"test_core_projectstorage"
|
||||||
|
"test_core_coordinatereferencesystem"
|
||||||
|
"test_core_overlayexpression"
|
||||||
|
"test_gui_queryresultwidget"
|
||||||
|
"test_provider_copcprovider"
|
||||||
|
"test_provider_eptprovider"
|
||||||
|
"test_analysis_processingalgspt1"
|
||||||
|
"test_analysis_processingalgspt2"
|
||||||
|
"test_analysis_processing"
|
||||||
|
"test_app_gpsintegration"
|
||||||
|
"PyQgsAnnotation"
|
||||||
|
"PyQgsAuthenticationSystem"
|
||||||
|
"PyQgsConnectionRegistry"
|
||||||
|
"PyQgsDatumTransform"
|
||||||
|
"PyQgsFileUtils"
|
||||||
|
"PyQgsGeometryTest"
|
||||||
|
"PyQgsGoogleMapsGeocoder"
|
||||||
|
"PyQgsGroupLayer"
|
||||||
|
"PyQgsHashLineSymbolLayer"
|
||||||
|
"PyQgsLayerMetadataProviderPython"
|
||||||
|
"PyQgsLayoutHtml"
|
||||||
|
"PyQgsLineSymbolLayers"
|
||||||
|
"PyQgsMapLayer"
|
||||||
|
"PyQgsOGRProviderGpkg"
|
||||||
|
"PyQgsProcessExecutablePt1"
|
||||||
|
"PyQgsProcessExecutablePt2"
|
||||||
|
"PyQgsProjectionSelectionWidgets"
|
||||||
|
"PyQgsProviderConnectionGpkg"
|
||||||
|
"PyQgsProviderConnectionSpatialite"
|
||||||
|
"PyQgsOGRProvider"
|
||||||
|
"PyQgsSettingsTreeNode"
|
||||||
|
"PyQgsTextRenderer"
|
||||||
|
"PyQgsVectorFileWriter"
|
||||||
|
"PyQgsVectorLayerEditBuffer"
|
||||||
|
"PyQgsVirtualLayerProvider"
|
||||||
|
"PyQgsAuxiliaryStorage"
|
||||||
|
"PyQgsSelectiveMasking"
|
||||||
|
"qgis_sipify"
|
||||||
|
"qgis_sip_include"
|
||||||
|
"qgis_sip_uptodate"))
|
||||||
|
(grass-version #$(package-version (this-package-input "grass")))
|
||||||
(grass-majorminor (string-join
|
(grass-majorminor (string-join
|
||||||
(list-head
|
(list-head
|
||||||
(string-split grass-version #\.) 2)
|
(string-split grass-version #\.) 2)
|
||||||
|
@ -2939,142 +3025,57 @@ growing set of geoscientific methods.")
|
||||||
(grass-dir (string-append #$(this-package-input "grass")
|
(grass-dir (string-append #$(this-package-input "grass")
|
||||||
"/grass" grass-majorminor)))
|
"/grass" grass-majorminor)))
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
;; Configure correct path to PyQt5 SIP directory
|
;; Configure correct path to PyQt5 SIP directory
|
||||||
(add-after 'unpack 'configure-pyqt5-sip-path
|
(add-after 'unpack 'configure-pyqt5-sip-path
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((sip-dir (string-append
|
(let ((sip-dir (string-append
|
||||||
(assoc-ref inputs "python-pyqt+qscintilla")
|
(assoc-ref inputs "python-pyqt+qscintilla")
|
||||||
"/lib/python"
|
"/lib/python"
|
||||||
(python:python-version (assoc-ref inputs "python"))
|
(python:python-version (assoc-ref inputs "python"))
|
||||||
"/site-packages/PyQt5/bindings")))
|
"/site-packages/PyQt5/bindings")))
|
||||||
(substitute* "cmake/FindPyQt5.py"
|
(substitute* "cmake/FindPyQt5.py"
|
||||||
(("sip_dir = cfg.default_sip_dir")
|
(("sip_dir = cfg.default_sip_dir")
|
||||||
(string-append "sip_dir = \"" sip-dir "\"")))
|
(string-append "sip_dir = \"" sip-dir "\"")))
|
||||||
(substitute* "cmake/FindPyQt5.cmake"
|
(substitute* "cmake/FindPyQt5.cmake"
|
||||||
(("SET\\(PYQT5_SIP_DIR \"\\$\\{Python_SITEARCH\\}/PyQt5/bindings\"\\)")
|
(("\
|
||||||
(string-append "SET(PYQT5_SIP_DIR \"" sip-dir "\")"))))
|
SET\\(PYQT5_SIP_DIR \"\\$\\{Python_SITEARCH\\}/PyQt5/bindings\"\\)")
|
||||||
(substitute* (list "tests/code_layout/test_qt_imports.sh"
|
(string-append "SET(PYQT5_SIP_DIR \"" sip-dir "\")"))))
|
||||||
"tests/code_layout/test_qgsscrollarea.sh")
|
(substitute* (list "tests/code_layout/test_qt_imports.sh"
|
||||||
(("\\$\\(git rev-parse --show-toplevel\\)")
|
"tests/code_layout/test_qgsscrollarea.sh")
|
||||||
(getcwd)))))
|
(("\\$\\(git rev-parse --show-toplevel\\)")
|
||||||
(replace 'check
|
(getcwd)))))
|
||||||
(lambda* (#:key inputs outputs tests? parallel-tests?
|
(replace 'check
|
||||||
#:allow-other-keys)
|
(lambda* (#:key inputs outputs tests? parallel-tests?
|
||||||
(if tests?
|
#:allow-other-keys)
|
||||||
(begin
|
(if tests?
|
||||||
(setenv "HOME" "/tmp")
|
(begin
|
||||||
(system "Xvfb :1 &")
|
(setenv "HOME" "/tmp")
|
||||||
(setenv "DISPLAY" ":1")
|
(system "Xvfb :1 &")
|
||||||
(setenv "TRAVIS" "true")
|
(setenv "DISPLAY" ":1")
|
||||||
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
|
(setenv "TRAVIS" "true")
|
||||||
(setenv "GISBASE" grass-dir)
|
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
|
||||||
(invoke "ctest"
|
(setenv "GISBASE" grass-dir)
|
||||||
"-j" (if parallel-tests?
|
(invoke "ctest"
|
||||||
(number->string (parallel-job-count))
|
"-j" (if parallel-tests?
|
||||||
"1")
|
(number->string (parallel-job-count))
|
||||||
"-E" (string-join
|
"1")
|
||||||
'(;; Disable tests that require network access
|
"-E" (string-join ignored-tests "|")))
|
||||||
"PyQgsExternalStorageAwsS3"
|
(format #t "test suite not run~%"))))
|
||||||
"PyQgsExternalStorageWebDav"
|
(add-after 'install 'wrap-python
|
||||||
"qgis_filedownloader"
|
(assoc-ref python:%standard-phases 'wrap))
|
||||||
"test_core_networkaccessmanager"
|
(add-after 'wrap-python 'wrap-qt
|
||||||
"test_core_tiledownloadmanager"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
"test_gui_filedownloader"
|
(wrap-qt-program "qgis" #:output #$output #:inputs inputs)))
|
||||||
"test_provider_wcsprovider"
|
(add-after 'wrap-qt 'wrap-gis
|
||||||
;; Disable tests that need OGR built with
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; libspatialite support
|
;; TODO: Find if there is a way to get SAGA to work.
|
||||||
"PyQgsAttributeTableModel"
|
;; Currently QGIS says "version of SAGA not supported".
|
||||||
"PyQgsOGRProviderSqlite"
|
;; Disable it for now.
|
||||||
"PyQgsWFSProvider"
|
(wrap-program (string-append #$output "/bin/qgis")
|
||||||
"PyQgsOapifProvider"
|
;; `("PATH" ":" prefix
|
||||||
;; Disable tests that need Python compiled
|
;; (,(dirname (search-input-file inputs "/bin/saga_cmd"))))
|
||||||
;; with loadable SQLite extensions.
|
`("QGIS_PREFIX_PATH" = (,#$output))
|
||||||
"PyQgsFieldFormattersTest"
|
`("GISBASE" = (,grass-dir)))))))))
|
||||||
"PyQgsSpatialiteProvider"
|
|
||||||
"PyQgsLayerDependencies"
|
|
||||||
"PyQgsDBManagerGpkg"
|
|
||||||
"PyQgsDBManagerSpatialite"
|
|
||||||
;; Disable tests that need poppler (with Cairo)
|
|
||||||
"PyQgsLayoutExporter"
|
|
||||||
"PyQgsPalLabelingLayout"
|
|
||||||
;; Disable tests that need Orfeo ToolBox
|
|
||||||
"ProcessingOtbAlgorithmsTest"
|
|
||||||
;; TODO: Find why the following tests fail
|
|
||||||
"ProcessingQgisAlgorithmsTestPt1"
|
|
||||||
"ProcessingQgisAlgorithmsTestPt3"
|
|
||||||
"ProcessingQgisAlgorithmsTestPt4"
|
|
||||||
"ProcessingGdalAlgorithmsRasterTest"
|
|
||||||
"ProcessingGdalAlgorithmsVectorTest"
|
|
||||||
"ProcessingGrass7AlgorithmsImageryTest"
|
|
||||||
"ProcessingGrass7AlgorithmsRasterTestPt1"
|
|
||||||
"ProcessingGrass7AlgorithmsRasterTestPt2"
|
|
||||||
"ProcessingGrass7AlgorithmsVectorTest"
|
|
||||||
"test_core_authconfig"
|
|
||||||
"test_core_authmanager"
|
|
||||||
"test_core_compositionconverter"
|
|
||||||
"test_core_expression"
|
|
||||||
"test_core_gdalutils"
|
|
||||||
"test_core_labelingengine"
|
|
||||||
"test_core_layoutpicture"
|
|
||||||
"test_core_layouttable"
|
|
||||||
"test_core_pointcloudlayerexporter"
|
|
||||||
"test_core_projectstorage"
|
|
||||||
"test_core_coordinatereferencesystem"
|
|
||||||
"test_core_overlayexpression"
|
|
||||||
"test_gui_queryresultwidget"
|
|
||||||
"test_provider_copcprovider"
|
|
||||||
"test_provider_eptprovider"
|
|
||||||
"test_analysis_processingalgspt1"
|
|
||||||
"test_analysis_processingalgspt2"
|
|
||||||
"test_analysis_processing"
|
|
||||||
"test_app_gpsintegration"
|
|
||||||
"PyQgsAnnotation"
|
|
||||||
"PyQgsAuthenticationSystem"
|
|
||||||
"PyQgsConnectionRegistry"
|
|
||||||
"PyQgsDatumTransform"
|
|
||||||
"PyQgsFileUtils"
|
|
||||||
"PyQgsGeometryTest"
|
|
||||||
"PyQgsGoogleMapsGeocoder"
|
|
||||||
"PyQgsGroupLayer"
|
|
||||||
"PyQgsHashLineSymbolLayer"
|
|
||||||
"PyQgsLayerMetadataProviderPython"
|
|
||||||
"PyQgsLayoutHtml"
|
|
||||||
"PyQgsLineSymbolLayers"
|
|
||||||
"PyQgsMapLayer"
|
|
||||||
"PyQgsOGRProviderGpkg"
|
|
||||||
"PyQgsProcessExecutablePt1"
|
|
||||||
"PyQgsProcessExecutablePt2"
|
|
||||||
"PyQgsProjectionSelectionWidgets"
|
|
||||||
"PyQgsProviderConnectionGpkg"
|
|
||||||
"PyQgsProviderConnectionSpatialite"
|
|
||||||
"PyQgsOGRProvider"
|
|
||||||
"PyQgsSettingsTreeNode"
|
|
||||||
"PyQgsTextRenderer"
|
|
||||||
"PyQgsVectorFileWriter"
|
|
||||||
"PyQgsVectorLayerEditBuffer"
|
|
||||||
"PyQgsVirtualLayerProvider"
|
|
||||||
"PyQgsAuxiliaryStorage"
|
|
||||||
"PyQgsSelectiveMasking"
|
|
||||||
"qgis_sipify"
|
|
||||||
"qgis_sip_include"
|
|
||||||
"qgis_sip_uptodate")
|
|
||||||
"|")))
|
|
||||||
(format #t "test suite not run~%"))))
|
|
||||||
(add-after 'install 'wrap-python
|
|
||||||
(assoc-ref python:%standard-phases 'wrap))
|
|
||||||
(add-after 'wrap-python 'wrap-qt
|
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
|
||||||
(wrap-qt-program "qgis" #:output #$output #:inputs inputs)))
|
|
||||||
(add-after 'wrap-qt 'wrap-gis
|
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
||||||
;; TODO: Find if there is a way to get SAGA to work.
|
|
||||||
;; Currently QGIS says "version of SAGA not supported".
|
|
||||||
;; Disable it for now.
|
|
||||||
(wrap-program (string-append #$output "/bin/qgis")
|
|
||||||
;; `("PATH" ":" prefix
|
|
||||||
;; (,(dirname (search-input-file inputs "/bin/saga_cmd"))))
|
|
||||||
`("QGIS_PREFIX_PATH" = (,#$output))
|
|
||||||
`("GISBASE" = (,grass-dir)))))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
(list bash-minimal
|
(list bash-minimal
|
||||||
exiv2
|
exiv2
|
||||||
|
@ -3124,19 +3125,19 @@ growing set of geoscientific methods.")
|
||||||
(list zstd "lib")))
|
(list zstd "lib")))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(append
|
(append
|
||||||
(list bison
|
(list bison
|
||||||
flex
|
flex
|
||||||
perl
|
perl
|
||||||
perl-yaml-tiny
|
perl-yaml-tiny
|
||||||
pkg-config
|
pkg-config
|
||||||
python-mock
|
python-mock
|
||||||
python-nose2
|
python-nose2
|
||||||
python-pyqt-builder
|
python-pyqt-builder
|
||||||
qttools-5)
|
qttools-5)
|
||||||
(if (supported-package? shellcheck)
|
(if (supported-package? shellcheck)
|
||||||
(list shellcheck)
|
(list shellcheck)
|
||||||
'())
|
'())
|
||||||
(list xorg-server-for-tests)))
|
(list xorg-server-for-tests)))
|
||||||
(home-page "https://qgis.org")
|
(home-page "https://qgis.org")
|
||||||
(synopsis "Geographical information system")
|
(synopsis "Geographical information system")
|
||||||
(description "QGIS is an easy to use Geographical Information
|
(description "QGIS is an easy to use Geographical Information
|
||||||
|
|
Reference in a new issue