gnu: python-msgspec: Regenerate autogenerated file.

* gnu/packages/serialization.scm (python-msgspec)[source]: Add a snippet to
delete autogenerated "msgspec/atof_consts.h".
[arguments]: Add new phase to regenerate that file.
This commit is contained in:
Vinicius Monego 2023-06-25 19:11:18 -03:00
parent 6b28b9a020
commit ecdcafc007
No known key found for this signature in database
GPG key ID: 637B0B138065B68A

View file

@ -14,6 +14,7 @@
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2023 Alexey Abramov <levenson@mmer.org>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2023 Vinicius Monego <monego@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@ -628,6 +629,11 @@ (define-public python-msgspec
(url "https://github.com/jcrist/msgspec")
(commit version)))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
;; Delete autogenerated file, regenerate in a phase.
'(begin
(delete-file "msgspec/atof_consts.h")))
(sha256
(base32
"09q567klcv7ly60w9lqip2ffyhrij100ky9igh3p3vqwbml33zb3"))))
@ -645,7 +651,12 @@ (define-public python-msgspec
(invoke "versioneer" "install")
(substitute* "setup.py"
(("version=versioneer.get_version\\(),")
(format #f "version=~s," #$version))))))))
(format #f "version=~s," #$version)))))
(add-after 'versioneer 'atof-consts
(lambda _
(with-directory-excursion "scripts"
;; Regenerate the autogenerated file.
(invoke "python" "generate_atof_consts.py")))))))
(native-inputs (list python-attrs
python-gcovr
python-msgpack