diff --git a/marshmallow-4.0.1.tar.gz b/marshmallow-4.0.1.tar.gz deleted file mode 100644 index ec8edc93e57feeb9dfbed400edb35576ffee18a4..0000000000000000000000000000000000000000 Binary files a/marshmallow-4.0.1.tar.gz and /dev/null differ diff --git a/marshmallow-4.1.0.tar.gz b/marshmallow-4.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cd4d74bfaeb357bdfcc34323fab8d451a50628eb Binary files /dev/null and b/marshmallow-4.1.0.tar.gz differ diff --git a/python-marshmallow.spec b/python-marshmallow.spec index a1d2566b1df161d971bf0b8ba1c6d443e13e9195..b94d03e4729658c487754191552f2c7599b90e98 100644 --- a/python-marshmallow.spec +++ b/python-marshmallow.spec @@ -1,6 +1,7 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-marshmallow -Version: 4.0.1 +Version: 4.1.0 Release: 1 Summary: A lightweight library for converting complex datatypes to and from native Python datatypes. License: MIT @@ -25,14 +26,18 @@ Requires: python3-flake8 Requires: python3-flake8-bugbear Requires: python3-pre-commit +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools + %description marshmallow is an ORM/ ODM/ framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes. %package -n python3-marshmallow Summary: A lightweight library for converting complex datatypes to and from native Python datatypes. Provides: python-marshmallow = %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: python3-setuptools Obsoletes: %{name}-help < %{version}-%{release} %description -n python3-marshmallow @@ -41,10 +46,28 @@ marshmallow is an ORM/ ODM/ framework-agnostic library for converting complex da %prep %autosetup -n marshmallow-%{version} +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi + %build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_build %install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_install %files -n python3-marshmallow @@ -53,6 +76,9 @@ marshmallow is an ORM/ ODM/ framework-agnostic library for converting complex da %{python3_sitelib}/* %changelog +* Mon Dec 01 2025 zhangzeyang0718 - 4.1.0-1 +- Update package to version 4.1.0 + * Mon Sep 8 2025 lilu - 4.0.1-1 - Update package to version 4.0.1 * Fix wildcard import of from marshmallow import *