diff options
Diffstat (limited to 'msgspec.spec')
| -rw-r--r-- | msgspec.spec | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/msgspec.spec b/msgspec.spec index c2f46e9..3fed6e6 100644 --- a/msgspec.spec +++ b/msgspec.spec @@ -1,79 +1,82 @@ -# Build system: setuptools via setup.py (pyproject.toml only has [tool.ruff], no [build-system]) -# C extension: msgspec/_core.c compiled via Extension() in setup.py -> python3_sitearch, arch-dependent -# topdir: msgspec-0.18.2 %global pypi_name msgspec +# topdir: msgspec-0.22.0 (verified via tar tf) + Name: python-%{pypi_name} -Version: 0.18.2 +Version: 0.22.0 Release: 1%{?dist} -Summary: Fast serialization and validation library with JSON/MessagePack/YAML/TOML support +Summary: A fast serialization and validation library with builtin support for JSON, MessagePack, YAML, and TOML License: BSD-3-Clause URL: https://github.com/jcrist/msgspec -Source0: https://github.com/jcrist/msgspec/archive/refs/tags/%{version}/%{pypi_name}-%{version}.tar.gz +Source0: https://github.com/jcrist/msgspec/archive/v%{version}/%{pypi_name}-%{version}.tar.gz %description msgspec is a fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML. It features high performance -encoders/decoders, support for a wide variety of Python types, zero-cost -schema validation using familiar Python type annotations, and a speedy Struct -type for representing structured data. The library is lightweight with no -required dependencies. - +encoders/decoders for common protocols, support for a wide variety of Python +types, zero-cost schema validation using familiar Python type annotations, and +a speedy Struct type for representing structured data. %package -n python3-%{pypi_name} -Summary: Fast serialization and validation library with JSON/MessagePack/YAML/TOML support +Summary: A fast serialization and validation library with builtin support for JSON, MessagePack, YAML, and TOML Provides: python-%{pypi_name} Provides: python3dist(%{pypi_name}) = %{version} -Provides: python3-%{pypi_name} = %{version}-%{release} BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel BuildRequires: gcc %description -n python3-%{pypi_name} msgspec is a fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML. It features high performance -encoders/decoders, support for a wide variety of Python types, zero-cost -schema validation using familiar Python type annotations, and a speedy Struct -type for representing structured data. The library is lightweight with no -required dependencies. - +encoders/decoders for common protocols, support for a wide variety of Python +types, zero-cost schema validation using familiar Python type annotations, and +a speedy Struct type for representing structured data. %package help Summary: Development documents and examples for %{pypi_name} Provides: python3-%{pypi_name}-doc -BuildArch: noarch -Requires: python3-%{pypi_name} - %description help msgspec is a fast serialization and validation library, with builtin support -for JSON, MessagePack, YAML, and TOML. This package provides development -documents and examples for %{pypi_name}. +for JSON, MessagePack, YAML, and TOML. +This package provides development documents and examples for msgspec. %prep %autosetup -n %{pypi_name}-%{version} -p1 +# Patch out setuptools-scm (not available in openEuler chroot toolchain). +# setuptools-scm is a build toolchain tool that cannot be introduced via +# dep_registry. Instead, make the version static and pre-generate _version.py. +# Remove setuptools-scm from build-system.requires +sed -i '/setuptools-scm/d' pyproject.toml +# Replace dynamic version with static version +sed -i '/^dynamic = \[/,/^]/c\version = "%{version}"' pyproject.toml +# Remove [tool.setuptools_scm] section +sed -i '/^\[tool.setuptools_scm\]$/,/^parentdir_prefix_version/d' pyproject.toml +# Fix license format for setuptools < 77 compatibility +sed -i 's/^license = "BSD-3-Clause"/license = {text = "BSD-3-Clause"}/' pyproject.toml +sed -i '/^license-files = \[/,/^]/d' pyproject.toml +# Pre-generate _version.py (normally created by setuptools-scm) +echo '__version__ = "%{version}"' > src/msgspec/_version.py %build %define _lto_cflags %{nil} %undefine _hardened_build %py3_build - %install %py3_install - %files -n python3-%{pypi_name} %license LICENSE -%{python3_sitearch}/%{pypi_name}/ -%{python3_sitearch}/%{pypi_name}-%{version}*.egg-info/ +%{python3_sitearch}/msgspec/ +%{python3_sitearch}/msgspec-%{version}*.egg-info/ %files help %doc README.md -%license LICENSE - %changelog -* Tue Oct 27 2026 Python_Bot <Python_Bot@openeuler.org> - 0.18.2-1 +* Thu Oct 29 2026 Python_Bot <Python_Bot@openeuler.org> - 0.22.0-1 - Initial package |
