mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-30 16:12:58 -05:00
gnu: meson-python: Update to 0.12.1.
* gnu/packages/build-tools.scm (meson-python): Update to 0.12.1. [build-system]: Use pyproject-build-system. [arguments]: Delete #:phases argument. Add #:build-backend and #:test-flags argument. Re-instate most tests. [propagated-inputs]: Move patchelf to... [native-inputs]: ... here. Add git-minimal/pinned, and python-cython. [home-page]: Update URL.
This commit is contained in:
parent
3bc9082523
commit
c808cd1bf9
1 changed files with 16 additions and 47 deletions
|
@ -77,6 +77,7 @@ (define-module (gnu packages build-tools)
|
|||
#: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
|
||||
|
@ -325,59 +326,25 @@ (define-public meson
|
|||
(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
|
||||
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
|
||||
|
@ -387,14 +354,16 @@ (define-public meson-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
|
||||
|
|
Loading…
Reference in a new issue