From 0e5e5e015dba4d05d301703bc1e160763727683c Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 25 Jan 2026 09:41:45 +0000 Subject: [PATCH] gnu: conan: Update to 2.24.0. * gnu/packages/package-management.scm (conan): Update to 2.24.0. [arguments] : Drop. : Simplify, run only unittests and skip only one test. [phases]{patch-hard-coded-GCC-references, check 'configure-tests, check, set-home}: Remove phases. [inputs]: Add python-colorama, python-dateutil, python-distro, python-fasteners, python-jinja2, python-patch-ng, python-pyyaml, python-requests, python-urllib3, python-bottle, python-pluginbase, and python-pyjwt. [propagated-inputs]: Remove python-bottle, python-colorama, python-dateutil, python-distro, python-fasteners, python-future, python-jinja2, python-node-semver, python-patch-ng, python-pluginbase, python-pygments, python-pyjwt, python-pyyaml, python-requests, python-six, python-tqdm, and python-urllib3-1.26. [native-inputs]: Remove cmake, python-pytest, and python-wheel; add cmake-minimal and python-pytest-8. Fixes: guix/guix#3520 Change-Id: I2546e328ca5749da37e649b0928912031c6fc078 --- gnu/packages/package-management.scm | 158 ++++++---------------------- 1 file changed, 32 insertions(+), 126 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 5fdb859c20e..5eb9f12fe2a 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -29,7 +29,7 @@ ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2025 aurtzy ;;; Copyright © 2025 Tomás Ortín Fernández -;;; Copyright © 2025 Sharlatan Hellseher +;;; Copyright © 2025-2026 Sharlatan Hellseher ;;; ;;; This file is part of GNU Guix. ;;; @@ -1664,83 +1664,31 @@ written entirely in Python.") (define-public conan (package (name "conan") - (version "2.7.1") + (version "2.24.0") (source (origin - (method git-fetch) ; no tests in PyPI archive + (method git-fetch) (uri (git-reference (url "https://github.com/conan-io/conan") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "00mrx1ighvf6r6fy2iqxr286w3jfd0gwlzcqsw15cm9axblx5av9")))) + (base32 "1i5azy26nd9klf9k23dz9mq2h1nlfzmrnq02983q5ql7gnn5gzwf")))) (build-system pyproject-build-system) (arguments (list - #:modules '((guix build pyproject-build-system) - (guix build utils) - (ice-9 format)) + ;; tests: 1500 passed, 11 skipped #:test-flags - (let ((system (or (%current-target-system) - (%current-system)))) - #~(list "-n" (number->string (parallel-job-count)) - "-m" "not slow" - "--ignore=test/performance/" - ;; E ModuleNotFoundError: No module named 'docker' - "--ignore=test/functional/command/runner_test.py" - ;; Disable problematic tests. - "-k" - (string-append - ;; These tests rely on networking. - "not download_retries_errors " - "and not ftp " - ;; These tests are for old versions of cmake. - "and not test_custom_cmake_3_16 " - "and not test_custom_cmake_3_17 " - "and not test_custom_cmake_3_19 " - ;; Guix sets PKG_CONFIG_PATH itself, which is not - ;; expected by the following test. - "and not pkg_config_path " - "and not compare " ;caused by newer node-semver? - ;; This test hard-codes a compiler version. - "and not test_toolchain " - ;; The 'test_list' tests may fail - ;; non-deterministically (see: - ;; https://github.com/conan-io/conan/issues/13583). - "and not test_list " - ;; These tests fail when Autoconf attempt to load a - ;; shared library in the same directory (see: - ;; https://github.com/conan-io/conan/issues/13577). - "and not test_other_client_can_link_autotools " - "and not test_autotools_lib_template " - ;; Sometimes fail: https://github.com/conan-io/conan/issues/15936 - "and not test_basic_parallel_install " - ;; These tests require additional build tools - "and not test_premake " - "and not test_sconsdeps " - ;; Unclear why libc is not found properly - "and not test_profile_detect_libc " - #$(if (not (string-prefix? "x86_64" system)) - ;; These tests either assume the machine is - ;; x86_64, or require a cross-compiler to target - ;; it. - (string-append - "and not cpp_package " - "and not exclude_code_analysis " - "and not cmakedeps_multi " - "and not locally_build_linux " - "and not custom_configuration " - "and not package_from_system " - "and not cross_build_command " - "and not test_package " - "and not test_same ") - "") - #$(if (not (or (string-prefix? "x86_64" system) - (string-prefix? "i686" system))) - ;; This test only works with default arch "x86", - ;; "x86_64", "sparc" or "sparcv9". - "and not settings_as_a_dict_conanfile " - "")))) + #~(list "-m" "not slow and not docker_runner and not artifactory_ready" + "--numprocesses" (number->string (min 8 (parallel-job-count))) + ;; XXX: Run only unittests, maybe try to include integration and + ;; functional as well when all failing tests are stabilized. + "--ignore=test/functional/" + "--ignore=test/integration/" + "--ignore=test/performance/" + ;; One test errors with assertion not equal. + (string-append "--deselect=test/unittests/tools/env/" + "test_env_files.py::test_env_files_sh[None]")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths @@ -1750,77 +1698,21 @@ written entirely in Python.") (substitute* "conan/tools/env/environment.py" (("printenv") (search-input-file inputs "bin/printenv"))))) - (add-after 'unpack 'patch-hard-coded-GCC-references - (lambda _ - ;; The test suite expects GCC 9 to be used (see: - ;; https://github.com/conan-io/conan/issues/13575). Render the - ;; check version agnostic. - (substitute* "test/functional/toolchains/meson/_base.py" - (("__GNUC__9") - "__GNUC__")))) (add-after 'unpack 'use-current-cmake-for-tests (lambda _ (substitute* (find-files "test" "\\.py$") (("@pytest.mark.tool\\(\"cmake\", \".*\")") "@pytest.mark.tool(\"cmake\")")))) - (add-before 'check 'configure-tests - (lambda _ - (let* ((cmake-version #$(version-major+minor - (package-version - (this-package-native-input "cmake")))) - (pkg-config-version #$(version-major+minor - (package-version pkg-config)))) - (call-with-output-file "test/conftest_user.py" - (lambda (port) - (format port "\ -tools_locations = { - 'apt_get': {'disabled': True}, - 'bazel': {'disabled': True}, - 'cmake': {'default': '~a', - '3.15': {'disabled': True}, - '3.16': {'disabled': True}, - '3.17': {'disabled': True}, - '3.19': {'disabled': True}, - '~:*~a': {}}, - 'pkg_config': {'exe': 'pkg-config', - 'default': '~a', - '~:*~a': {}}, - 'svn': {'disabled': True}}~%" cmake-version pkg-config-version)))))) - (add-before 'check 'set-home - (lambda _ - (setenv "HOME" "/tmp"))) (add-before 'check 'configure-tests (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv "CONFIG_SHELL" (which "sh")) (setenv "PATH" (string-append (getenv "PATH") ":" #$output "/bin")))))))) - (propagated-inputs - (list python-bottle - python-colorama - python-dateutil - python-distro - python-fasteners - python-future - python-jinja2 - python-node-semver - python-patch-ng - python-pluginbase - python-pygments - python-pyjwt - python-pyyaml - python-requests - python-six - python-tqdm - python-urllib3-1.26)) - (inputs - (list coreutils)) ;for printenv (native-inputs (list autoconf-wrapper automake - ;; If cmake is replaced with cmake-minimal then Guix errors when - ;; listing the dependents of rapidjson. - cmake + cmake-minimal git-minimal libtool meson @@ -1829,12 +1721,26 @@ tools_locations = { python-bottle python-mock python-parameterized - python-pytest + python-pytest-8 python-pytest-xdist python-setuptools python-webtest - python-wheel which)) + (inputs + (list coreutils ;for printenv + python-colorama + python-dateutil + python-distro + python-fasteners + python-jinja2 + python-patch-ng + python-pyyaml + python-requests + python-urllib3 + ;; [server] + python-bottle + python-pluginbase + python-pyjwt)) (home-page "https://conan.io") (synopsis "Decentralized C/C++ package manager") (description "Conan is a package manager for C and C++ developers that