diff options
Diffstat (limited to 'gnu/packages/build-tools.scm')
-rw-r--r-- | gnu/packages/build-tools.scm | 139 |
1 files changed, 34 insertions, 105 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 8a6cfae692..e1c9b14bb2 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2020 Jakub Kądziołka <[email protected]> ;;; Copyright © 2020 Efraim Flashner <[email protected]> ;;; Copyright © 2021 qblade <[email protected]> -;;; Copyright © 2021 Maxim Cournoyer <[email protected]> +;;; Copyright © 2021, 2023 Maxim Cournoyer <[email protected]> ;;; Copyright © 2022, 2023 Juliana Sims <[email protected]> ;;; ;;; This file is part of GNU Guix. @@ -77,6 +77,7 @@ #:use-module (gnu packages unicode) #:use-module (gnu packages version-control) #:use-module (guix build-system gnu) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python)) (define-public bam @@ -283,10 +284,10 @@ files and generates build instructions for the Ninja build system.") ;; X11 license. (license (list license:bsd-3 license:x11))))) -(define-public meson-0.63 +(define-public meson (package (name "meson") - (version "0.63.2") + (version "1.1.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/mesonbuild/meson/" @@ -294,28 +295,23 @@ files and generates build instructions for the Ninja build system.") version ".tar.gz")) (sha256 (base32 - "1gwba75z47m2hv3w08gw8sgqgbknjr7rj1qwr510bgknxwbjy8hn")))) + "17w2zymmvrffhfpqsaj7qcbjwgv9iaawcpzhz2gnhlvcrm26qqfr")))) (build-system python-build-system) (arguments - `(;; FIXME: Tests require many additional inputs and patching many - ;; hard-coded file system locations in "run_unittests.py". - #:tests? #f - #:phases (modify-phases %standard-phases - ;; Meson calls the various executables in out/bin through the - ;; Python interpreter, so we cannot use the shell wrapper. - (replace 'wrap - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((python-version - (python-version (assoc-ref inputs "python"))) - (output (assoc-ref outputs "out"))) - (substitute* (string-append output "/bin/meson") - (("# EASY-INSTALL-ENTRY-SCRIPT") - (format #f "\ + (list #:tests? #f ;disabled to avoid extra dependencies + #:phases + #~(modify-phases %standard-phases + ;; Meson calls the various executables in out/bin through the + ;; Python interpreter, so we cannot use the shell wrapper. + (replace 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* (search-input-file outputs "bin/meson") + (("# EASY-INSTALL-ENTRY-SCRIPT") + (format #f "\ import sys -sys.path.insert(0, '~a/lib/python~a/site-packages') -# EASY-INSTALL-ENTRY-SCRIPT" - output python-version))))))))) - (inputs (list python-wrapper ninja)) +sys.path.insert(0, '~a') +# EASY-INSTALL-ENTRY-SCRIPT" (site-packages inputs outputs))))))))) + (inputs (list python ninja)) (home-page "https://mesonbuild.com/") (synopsis "Build system designed to be fast and user-friendly") (description @@ -327,97 +323,28 @@ files}, are written in a custom domain-specific language (@dfn{DSL}) that resembles Python.") (license license:asl2.0))) -(define-public meson-0.60 - (package - (inherit meson-0.63) - (version "0.60.3") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/mesonbuild/meson/" - "releases/download/" version "/meson-" - version ".tar.gz")) - (sha256 - (base32 - "13mrrizg4vl6n5k7fz6amyafnn3i097dcarr552qc0ca6nlmzjl7")) - (patches (search-patches - "meson-allow-dirs-outside-of-prefix.patch")))))) - -;;; This older Meson variant is kept for now for gtkmm and others that may -;;; have problems with 0.60. -(define-public meson-0.59 - (package - (inherit meson-0.60) - (version "0.59.4") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/mesonbuild/meson/" - "releases/download/" version "/meson-" - version ".tar.gz")) - (sha256 - (base32 - "117cm8794h291lca1wljz1pwnzidgbvrpg3mw3np6ksma368hyd7")) - (patches (search-patches - "meson-allow-dirs-outside-of-prefix.patch")))))) - -;; TODO: Bump this in the next rebuild cycle. -(define-public meson meson-0.60) - (define-public meson-python (package (name "meson-python") - (version "0.8.1") + (version "0.12.1") (source (origin (method url-fetch) (uri (pypi-uri "meson_python" version)) (sha256 (base32 - "0k2yn0iws1n184sdznzmfw4xgbqgq5cn02hpc7m0xdaxryj1ybs4")))) - (build-system python-build-system) + "1hpjw9qj6ff8ixjs0pz7qysc8v57jxgaf5n1p6bqm9bh3mc3wnrx")))) + (build-system pyproject-build-system) (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'avoid-ninja-dependency - (lambda _ - ;; Avoid dependency on the "ninja" PyPI distribution, - ;; which is a meta-package that simply downloads and - ;; installs ninja from the web ... - (substitute* "pyproject.toml" - (("'ninja',") - "")))) - (replace 'build - (lambda _ - ;; ZIP does not support timestamps before 1980. - (setenv "SOURCE_DATE_EPOCH" "315532800") - (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) - (replace 'install - (lambda _ - (let ((whl (car (find-files "dist" "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" #$output whl)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "tests" "-k" - (string-append - "not " - ;; These tests require a git checkout. - (string-join '("test_contents_unstaged" - "test_no_pep621" - "test_pep621" - "test_dynamic_version" - "test_contents" - "test_contents_subdirs") - " and not "))))))))) + ;; The project is configured to use itself to build ('mesonpy') and fails; + ;; use another PEP 517 build system. + (list #:build-backend "setuptools.build_meta" + #:test-flags #~(list "tests" + ;; The test_pep518 tries to install + ;; dependencies from the network using pip. + "-k" "not test_pep518"))) (propagated-inputs - (list meson-0.63 ;>=0.62 required + (list meson ninja - ;; XXX: python-meson forcefully sets the RUNPATH of binaries - ;; for vendoring purposes, and uses PatchELF for that(!). This - ;; functionality is not useful in Guix, but removing this - ;; dependency is tricky. There is discussion upstream about making - ;; it optional, but for now we'll just carry it: - ;; https://github.com/FFY00/meson-python/issues/125 - patchelf python-colorama python-pyproject-metadata python-tomli @@ -427,14 +354,16 @@ resembles Python.") python-wheel ;; For tests. + git-minimal/pinned + patchelf pkg-config + python-cython python-gitpython python-pytest python-pytest-mock)) - (home-page "https://github.com/FFY00/mesonpy") + (home-page "https://github.com/mesonbuild/meson-python") (synopsis "Meson-based build backend for Python") - (description - "meson-python is a PEP 517 build backend for Meson projects.") + (description "Meson-python is a PEP 517 build backend for Meson projects.") (license license:expat))) (define-public premake4 |