gnu: conan: Do not hard-code package versions.
* gnu/packages/package-management.scm (conan) [arguments]: Add #:modules argument. Avoid hard-coding package versions in configure-tests phase.
This commit is contained in:
parent
11956155e5
commit
b8152d668d
1 changed files with 15 additions and 8 deletions
|
@ -1151,6 +1151,9 @@ (define-public conan
|
|||
(build-system python-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:modules '((guix build python-build-system)
|
||||
(guix build utils)
|
||||
(ice-9 format))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-paths
|
||||
|
@ -1175,22 +1178,26 @@ (define-public conan
|
|||
"@pytest.mark.tool(\"cmake\")"))))
|
||||
(add-before 'check 'configure-tests
|
||||
(lambda _
|
||||
(call-with-output-file "conans/test/conftest_user.py"
|
||||
(lambda (port)
|
||||
(format port "\
|
||||
(let* ((cmake-version #$(version-major+minor
|
||||
(package-version cmake)))
|
||||
(pkg-config-version #$(version-major+minor
|
||||
(package-version pkg-config))))
|
||||
(call-with-output-file "conans/test/conftest_user.py"
|
||||
(lambda (port)
|
||||
(format port "\
|
||||
tools_locations = {
|
||||
'apt_get': {'disabled': True},
|
||||
'bazel': {'disabled': True},
|
||||
'cmake': {'default': '3.25',
|
||||
'cmake': {'default': '~a',
|
||||
'3.15': {'disabled': True},
|
||||
'3.16': {'disabled': True},
|
||||
'3.17': {'disabled': True},
|
||||
'3.19': {'disabled': True},
|
||||
'3.25': {}},
|
||||
'~:*~a': {}},
|
||||
'pkg_config': {'exe': 'pkg-config',
|
||||
'default': '0.29',
|
||||
'0.29': {}},
|
||||
'svn': {'disabled': True}}~%")))))
|
||||
'default': '~a',
|
||||
'~:*~a': {}},
|
||||
'svn': {'disabled': True}}~%" cmake-version pkg-config-version))))))
|
||||
(add-before 'check 'set-home
|
||||
(lambda _
|
||||
(setenv "HOME" "/tmp")))
|
||||
|
|
Loading…
Reference in a new issue