gnu: conan: Update to 2.0.2.
* gnu/packages/package-management.scm (conan): Update to 2.0.2. [arguments]: Delete relax-requirements phase. Update patch-paths phase. Add new patch-hard-coded-GCC-references, use-current-cmake-for-tests and configure-tests phases. Update check phase. [native-inputs]: Replace autoconf with autoconf-wrapper. Add libtool.
This commit is contained in:
parent
57c3662ddd
commit
7ceedc7df7
1 changed files with 48 additions and 51 deletions
|
@ -1137,7 +1137,7 @@ written entirely in Python.")
|
||||||
(define-public conan
|
(define-public conan
|
||||||
(package
|
(package
|
||||||
(name "conan")
|
(name "conan")
|
||||||
(version "1.50.0")
|
(version "2.0.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch) ;no tests in PyPI archive
|
(method git-fetch) ;no tests in PyPI archive
|
||||||
|
@ -1147,31 +1147,50 @@ written entirely in Python.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1jjrinz5wkcxfvwdpldrv4h7vacdyz88cc4af5vi3sdnjra0i0m5"))))
|
"1y4qmqnw3s8xv64lgp388qpj9vqharyfqi5s8dxvgsns6cafv7lf"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'relax-requirements
|
|
||||||
(lambda _
|
|
||||||
(substitute* "conans/requirements.txt"
|
|
||||||
(("node-semver==0.6.1")
|
|
||||||
"node-semver>=0.6.1")
|
|
||||||
(("Jinja2>=2.9, <3")
|
|
||||||
"Jinja2>=2.9")
|
|
||||||
(("PyYAML>=3.11, <6.0")
|
|
||||||
"PyYAML"))))
|
|
||||||
(add-after 'unpack 'patch-paths
|
(add-after 'unpack 'patch-paths
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; It seems that PATH is manipulated, as printenv is not found
|
;; It seems that PATH is manipulated, as printenv is not found
|
||||||
;; during tests. Patch in its exact location.
|
;; during tests. Patch in its exact location.
|
||||||
(substitute* "conan/tools/env/environment.py"
|
(substitute* "conan/tools/env/environment.py"
|
||||||
(("printenv")
|
(("printenv")
|
||||||
(search-input-file inputs "bin/printenv")))
|
(search-input-file inputs "bin/printenv")))))
|
||||||
(substitute* "conans/client/envvars/environment.py"
|
(add-after 'unpack 'patch-hard-coded-GCC-references
|
||||||
(("#!/usr/bin/env")
|
(lambda _
|
||||||
(string-append "#!" (search-input-file inputs "bin/env"))))))
|
;; The test suite expects GCC 9 to be used (see:
|
||||||
|
;; https://github.com/conan-io/conan/issues/13575). Render the
|
||||||
|
;; check version agnostic.
|
||||||
|
(substitute* "conans/test/functional/toolchains/meson/_base.py"
|
||||||
|
(("__GNUC__9")
|
||||||
|
"__GNUC__"))))
|
||||||
|
(add-after 'unpack 'use-current-cmake-for-tests
|
||||||
|
(lambda _
|
||||||
|
(substitute* (find-files "conans/test" "\\.py$")
|
||||||
|
(("@pytest.mark.tool\\(\"cmake\", \"3.23\")")
|
||||||
|
"@pytest.mark.tool(\"cmake\")"))))
|
||||||
|
(add-before 'check 'configure-tests
|
||||||
|
(lambda _
|
||||||
|
(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',
|
||||||
|
'3.15': {'disabled': True},
|
||||||
|
'3.16': {'disabled': True},
|
||||||
|
'3.17': {'disabled': True},
|
||||||
|
'3.19': {'disabled': True},
|
||||||
|
'3.25': {}},
|
||||||
|
'pkg_config': {'exe': 'pkg-config',
|
||||||
|
'default': '0.29',
|
||||||
|
'0.29': {}},
|
||||||
|
'svn': {'disabled': True}}~%")))))
|
||||||
(add-before 'check 'set-home
|
(add-before 'check 'set-home
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "HOME" "/tmp")))
|
(setenv "HOME" "/tmp")))
|
||||||
|
@ -1180,45 +1199,27 @@ written entirely in Python.")
|
||||||
(define system #$(or (%current-target-system)
|
(define system #$(or (%current-target-system)
|
||||||
(%current-system)))
|
(%current-system)))
|
||||||
(when tests?
|
(when tests?
|
||||||
|
(setenv "CONFIG_SHELL" (which "sh"))
|
||||||
(setenv "PATH" (string-append (getenv "PATH") ":"
|
(setenv "PATH" (string-append (getenv "PATH") ":"
|
||||||
#$output "/bin"))
|
#$output "/bin"))
|
||||||
(invoke "python" "-m" "pytest"
|
(invoke "python" "-m" "pytest"
|
||||||
"-n" "auto" ;parallelize tests
|
"-n" (number->string (parallel-job-count))
|
||||||
"-m" "not slow and not tool_svn"
|
"-m" "not slow"
|
||||||
;; Disable problematic tests.
|
;; Disable problematic tests.
|
||||||
"-k"
|
"-k"
|
||||||
(string-append
|
(string-append
|
||||||
;; These tests rely on networking.
|
;; These tests rely on networking.
|
||||||
"not shallow_clone_remote "
|
"not download_retries_errors "
|
||||||
"and not remote_build "
|
|
||||||
"and not download_retries_errors "
|
|
||||||
"and not ftp "
|
"and not ftp "
|
||||||
"and not build_local_different_folders "
|
|
||||||
;; These expect CMake available at fixed versions.
|
|
||||||
"and not custom_cmake "
|
|
||||||
"and not default_cmake "
|
|
||||||
"and not bazel " ;bazel is not packaged
|
|
||||||
;; Guix sets PKG_CONFIG_PATH itself, which is not
|
;; Guix sets PKG_CONFIG_PATH itself, which is not
|
||||||
;; expected by the following test.
|
;; expected by the following test.
|
||||||
"and not pkg_config_path "
|
"and not pkg_config_path "
|
||||||
"and not compare " ;caused by newer node-semver?
|
"and not compare " ;caused by newer node-semver?
|
||||||
;; Guix is not currently a supported package manager.
|
;; These tests fail when Autoconf attempt to load a
|
||||||
"and not system_package_tool "
|
;; shared library in the same directory (see:
|
||||||
;; These expect GCC 5 to be available.
|
;; https://github.com/conan-io/conan/issues/13577).
|
||||||
"and not test_reuse "
|
"and not test_other_client_can_link_autotools "
|
||||||
"and not test_install "
|
"and not test_autotools_lib_template "
|
||||||
;; The installed configure script trips on the /bin/sh
|
|
||||||
;; shebang. We'd have to patch it in the Python code.
|
|
||||||
"and not test_autotools "
|
|
||||||
"and not test_use_build_virtualenv "
|
|
||||||
;; This test is architecture-dependent.
|
|
||||||
"and not test_toolchain_linux "
|
|
||||||
;; This one fails for unknown reasons (see:
|
|
||||||
;; https://github.com/conan-io/conan/issues/9671).
|
|
||||||
"and not test_build "
|
|
||||||
;; These tests expect the 'apt' command to be available.
|
|
||||||
"and not test_apt_check "
|
|
||||||
"and not test_apt_install_substitutes "
|
|
||||||
(if (not (string-prefix? "x86_64" system))
|
(if (not (string-prefix? "x86_64" system))
|
||||||
;; These tests either assume the machine is
|
;; These tests either assume the machine is
|
||||||
;; x86_64, or require a cross-compiler to target
|
;; x86_64, or require a cross-compiler to target
|
||||||
|
@ -1232,18 +1233,13 @@ written entirely in Python.")
|
||||||
"and not package_from_system "
|
"and not package_from_system "
|
||||||
"and not cross_build_command "
|
"and not cross_build_command "
|
||||||
"and not test_package "
|
"and not test_package "
|
||||||
"and not test_deleted_os "
|
|
||||||
"and not test_same ")
|
"and not test_same ")
|
||||||
"")
|
"")
|
||||||
(if (not (or (string-prefix? "x86_64" system)
|
(if (not (or (string-prefix? "x86_64" system)
|
||||||
(string-prefix? "i686" system)))
|
(string-prefix? "i686" system)))
|
||||||
;; These tests either assume the machine is i686,
|
;; This test only works with default arch "x86",
|
||||||
;; or require a cross-compiler to target it.
|
;; "x86_64", "sparc" or "sparcv9".
|
||||||
(string-append
|
"and not settings_as_a_dict_conanfile "
|
||||||
"and not vcvars_raises_when_not_found "
|
|
||||||
"and not conditional_generators "
|
|
||||||
"and not test_folders "
|
|
||||||
"and not settings_as_a_dict_conanfile ")
|
|
||||||
"")))))))))
|
"")))))))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-bottle
|
(list python-bottle
|
||||||
|
@ -1266,10 +1262,11 @@ written entirely in Python.")
|
||||||
(inputs
|
(inputs
|
||||||
(list coreutils)) ;for printenv
|
(list coreutils)) ;for printenv
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list autoconf
|
(list autoconf-wrapper
|
||||||
automake
|
automake
|
||||||
cmake
|
cmake
|
||||||
git-minimal
|
git-minimal
|
||||||
|
libtool
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
Reference in a new issue