unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: Sharlatan Hellseher <sharlatanus@gmail.com>, 64010@debbugs.gnu.org
Subject: [bug#64010] [PATCH] gnu: Add python-msgspec.
Date: Sat, 17 Jun 2023 14:32:18 +0000	[thread overview]
Message-ID: <30874392ba80f2bd64f55f864baefc1dd056ec86.camel@posteo.net> (raw)
In-Reply-To: <ba39565d9cf44c4a98d701028b85dffa2cc0501c.1686517777.git.sharlatanus@gmail.com>

Em dom, 2023-06-11 às 22:10 +0100, Sharlatan Hellseher escreveu:
> * gnu/packages/serialization.scm (python-msgspec): New variable.
> ---
>  gnu/packages/serialization.scm | 64
> ++++++++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/gnu/packages/serialization.scm
> b/gnu/packages/serialization.scm
> index 39954d6764..e2d45f28b1 100644
> --- a/gnu/packages/serialization.scm
> +++ b/gnu/packages/serialization.scm
> @@ -13,6 +13,7 @@
>  ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
>  ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
>  ;;; Copyright © 2023 Alexey Abramov <levenson@mmer.org>
> +;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -41,6 +42,7 @@ (define-module (gnu packages serialization)
>    #:use-module (guix build-system copy)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system meson)
> +  #:use-module (guix build-system pyproject)
>    #:use-module (guix build-system python)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages autotools)
> @@ -58,6 +60,8 @@ (define-module (gnu packages serialization)
>    #:use-module (gnu packages lua)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages python)
> +  #:use-module (gnu packages python-build)
> +  #:use-module (gnu packages python-check)
>    #:use-module (gnu packages python-science)
>    #:use-module (gnu packages python-xyz)
>    #:use-module (gnu packages perl))
> @@ -613,6 +617,66 @@ (define-public capnproto
>  RPC system.  Think JSON, except binary.  Or think Protocol Buffers,
> except faster.")
>      (license license:expat)))
>  
> +(define-public python-msgspec
> +  (package
> +    (name "python-msgspec")
> +    (version "0.15.1")
> +    (source (origin
> +              ;; There are no tests in the PyPI tarball.
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/jcrist/msgspec")
> +                    (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "1l3f893ba3cmsvz0rkk2y4krzya0qwhsbllhs1f3gd6xp0dq6pf4"))))
> +    (build-system pyproject-build-system)
> +    (arguments
> +     (list
> +      ;; Disable only one failing test.
> +      ;;
> +      ;; AssertionError: msgspec/structs.pyi:7: error: Positional-
> only parameters
> +      ;; are only supported in Python 3.8 and greater
> +      #:test-flags #~(list "-k" "not test_mypy")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'versioneer
> +            (lambda _
> +              (invoke "versioneer" "install")
> +              (substitute* "setup.py"
> +                (("version=versioneer.get_version\\(),")
> +                 (format #f "version=~s," #$version))))))))
> +    ;; XXX: It might support more architectures but GitHub Actions
> listed only
> +    ;; two right now. Try to build for the rest supported by Guix.
> +    ;; See:
> +    ;;
> https://github.com/jcrist/msgspec/blob/main/.github/workflows/ci.yml#L83
> +    (supported-systems (list "x86_64-linux" "aarch64-linux"))
> +    (native-inputs (list python-attrs
> +                         python-gcovr
> +                         python-msgpack
> +                         python-mypy
> +                         python-pytest
> +                         python-setuptools-scm
> +                         python-versioneer))
> +    (propagated-inputs (list python-pyyaml python-tomli python-
> tomli-w))
> +    (home-page "https://jcristharif.com/msgspec/")
> +    (synopsis
> +     "Fast serialization/validation library for JSON, MessagePack,
> YAML, and TOML")
> +    (description
> +     "This package provides a fast serialization and validation
> library, with builtin
> +support for JSON, MessagePack, YAML, and TOML.  It includes the
> following features:
> +@itemize
> +@item high performance encoders/decoders for common protocols.
> +@item support for a wide variety of Python types.  Additional types
> may be
> +supported through extensions.
> +@item zero-cost schema validation using familiar Python type
> annotations.  In
> +benchmarks msgspec decodes and validates JSON about 2x faster than
> @code{orjson}
> +can decode it alone.
> +@item a speedy Struct type for representing structured data.
> +@end itemize")
> +    (license license:bsd-3)))
> +
>  (define-public python-ruamel.yaml
>    (package
>      (name "python-ruamel.yaml")
> 
> base-commit: 299f64adea72a4b360da54b0bffd06ee57a5517b

Hi,

LGTM. Can you update to version 0.16.0 which was released 5 days ago?

Vinicius

  reply	other threads:[~2023-06-17 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-11 21:10 [bug#64010] [PATCH] gnu: Add python-msgspec Sharlatan Hellseher
2023-06-17 14:32 ` Vinicius Monego [this message]
2023-06-18  9:59 ` [bug#64010] [PATCH v2] " Sharlatan Hellseher
2023-06-24 12:37 ` [bug#64010] Sharlatan Hellseher
2023-06-25 21:49   ` bug#64010: Vinicius Monego

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30874392ba80f2bd64f55f864baefc1dd056ec86.camel@posteo.net \
    --to=monego@posteo.net \
    --cc=64010@debbugs.gnu.org \
    --cc=sharlatanus@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).