[packages/python3-marshmallow] - python-marshmallow.spec updated to 4.1.1 for python 3.10+
qboosh
qboosh at pld-linux.org
Sun Dec 14 12:01:54 CET 2025
commit fec53a6e21a2256ca82926f779ead544eedd9784
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 14 12:02:13 2025 +0100
- python-marshmallow.spec updated to 4.1.1 for python 3.10+
marshmallow-sphinx.patch | 8 ---
marshmallow-tests.patch | 11 ++++
python-marshmallow.spec | 164 -----------------------------------------------
python3-marshmallow.spec | 102 +++++++++++++++++++++++++++++
4 files changed, 113 insertions(+), 172 deletions(-)
---
diff --git a/python-marshmallow.spec b/python-marshmallow.spec
deleted file mode 100644
index 4316aa2..0000000
--- a/python-marshmallow.spec
+++ /dev/null
@@ -1,164 +0,0 @@
-#
-# Conditional build:
-%bcond_without doc # Sphinx documentation
-%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_with python3 # CPython 3.x module (built from python3-marshmallow.spec)
-
-Summary: Lightweight library for converting complex datatypes to and from native Python datatypes
-Summary(pl.UTF-8): Lekka biblioteka do konwersji złożonych typów danych do/z natywnych typów Pythona
-Name: python-marshmallow
-# keep 2.x here for python2 support
-Version: 2.21.0
-Release: 1
-License: MIT
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/marshmallow/
-Source0: https://files.pythonhosted.org/packages/source/m/marshmallow/marshmallow-%{version}.tar.gz
-# Source0-md5: 4effdcb53e839acbadfa73fe8810e69a
-Patch0: marshmallow-sphinx.patch
-URL: https://pypi.org/project/marshmallow/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-dateutil
-BuildRequires: python-pytest
-BuildRequires: python-pytz
-BuildRequires: python-simplejson
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-dateutil
-BuildRequires: python3-pytest
-BuildRequires: python3-pytz
-BuildRequires: python3-simplejson
-%endif
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with doc}
-BuildRequires: python3-alabaster >= 0.7.12
-BuildRequires: python3-sphinx-version-warning >= 1.1.2
-BuildRequires: python3-sphinx_issues >= 1.2.0
-BuildRequires: sphinx-pdg-3 >= 2.1.2
-%endif
-Requires: python-modules >= 1:2.7
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-marshmallow is an ORM/ODM/framework-agnostic library for converting
-complex datatypes, such as objects, to and from native Python
-datatypes.
-
-%description -l pl.UTF-8
-marshmallow to niezależna od ORM/ODM/szkieletu biblioteka do konwersji
-złożonych typów danych, takich jak obiekty, na i z natywnych typów
-danych Pythona.
-
-%package -n python3-marshmallow
-Summary: Lightweight library for converting complex datatypes to and from native Python datatypes
-Summary(pl.UTF-8): Lekka biblioteka do konwersji złożonych typów danych do/z natywnych typów Pythona
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.4
-
-%description -n python3-marshmallow
-marshmallow is an ORM/ODM/framework-agnostic library for converting
-complex datatypes, such as objects, to and from native Python
-datatypes.
-
-%description -n python3-marshmallow -l pl.UTF-8
-marshmallow to niezależna od ORM/ODM/szkieletu biblioteka do konwersji
-złożonych typów danych, takich jak obiekty, na i z natywnych typów
-danych Pythona.
-
-%package apidocs
-Summary: API documentation for Python marshmallow module
-Summary(pl.UTF-8): Dokumentacja API modułu Pythona marshmallow
-Group: Documentation
-
-%description apidocs
-API documentation for Python marshmallow module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona marshmallow.
-
-%prep
-%setup -q -n marshmallow-%{version}
-%patch -P0 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd)/src \
-%{__python} -m pytest tests --ignore tests/test_py3
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd)/src \
-%{__python3} -m pytest tests
-%endif
-%endif
-
-%if %{with doc}
-%{__make} -C docs html \
- SPHINXBUILD=sphinx-build-3
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python-marshmallow-%{version}
-cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-marshmallow-%{version}
-%endif
-
-%if %{with python3}
-%py3_install
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-marshmallow-%{version}
-cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-marshmallow-%{version}
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc AUTHORS.rst CHANGELOG.rst LICENSE NOTICE README.rst
-%{py_sitescriptdir}/marshmallow
-%{py_sitescriptdir}/marshmallow-%{version}-py*.egg-info
-%{_examplesdir}/python-marshmallow-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-marshmallow
-%defattr(644,root,root,755)
-%doc AUTHORS.rst CHANGELOG.rst LICENSE NOTICE README.rst
-%{py3_sitescriptdir}/marshmallow
-%{py3_sitescriptdir}/marshmallow-%{version}-py*.egg-info
-%{_examplesdir}/python3-marshmallow-%{version}
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/{_modules,_static,*.html,*.js}
-%endif
diff --git a/python3-marshmallow.spec b/python3-marshmallow.spec
new file mode 100644
index 0000000..94fd587
--- /dev/null
+++ b/python3-marshmallow.spec
@@ -0,0 +1,102 @@
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
+
+Summary: Lightweight library for converting complex datatypes to and from native Python datatypes
+Summary(pl.UTF-8): Lekka biblioteka do konwersji złożonych typów danych do/z natywnych typów Pythona
+Name: python3-marshmallow
+Version: 4.1.1
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/marshmallow/
+Source0: https://files.pythonhosted.org/packages/source/m/marshmallow/marshmallow-%{version}.tar.gz
+# Source0-md5: 952ff36b25ca99d60f7e0d79bb90188a
+Patch0: marshmallow-tests.patch
+URL: https://pypi.org/project/marshmallow/
+BuildRequires: python3-build
+BuildRequires: python3-flit_core < 4
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.10
+%if %{with tests}
+BuildRequires: python3-pytest
+BuildRequires: python3-simplejson
+%if "%{_ver_lt %{py3_ver} 3.11}" == "1"
+BuildRequires: python3-backports.datetime.fromisoformat
+BuildRequires: python3-typing_extensions
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+%if %{with doc}
+BuildRequires: python3-autodocsumm >= 0.2.14
+BuildRequires: python3-furo >= 2025.9.25
+BuildRequires: python3-sphinx_copybutton >= 0.5.2
+BuildRequires: python3-sphinx_issues >= 5.0.1
+BuildRequires: python3-sphinxext.opengraph >= 0.13.0
+BuildRequires: sphinx-pdg-3 >= 8.2.3
+%endif
+Requires: python3-modules >= 1:3.10
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+marshmallow is an ORM/ODM/framework-agnostic library for converting
+complex datatypes, such as objects, to and from native Python
+datatypes.
+
+%description -l pl.UTF-8
+marshmallow to niezależna od ORM/ODM/szkieletu biblioteka do konwersji
+złożonych typów danych, takich jak obiekty, na i z natywnych typów
+danych Pythona.
+
+%package apidocs
+Summary: API documentation for Python marshmallow module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona marshmallow
+Group: Documentation
+
+%description apidocs
+API documentation for Python marshmallow module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona marshmallow.
+
+%prep
+%setup -q -n marshmallow-%{version}
+%patch -P0 -p1
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+%{__python3} -m zipfile -e build-3/*.whl build-3-doc
+PYTHONPATH=$(pwd)/build-3-doc \
+sphinx-build-3 -b html docs docs/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG.rst LICENSE NOTICE README.rst SECURITY.md
+%{py3_sitescriptdir}/marshmallow
+%{py3_sitescriptdir}/marshmallow-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_modules,_static,examples,extending,*.html,*.js}
+%endif
diff --git a/marshmallow-sphinx.patch b/marshmallow-sphinx.patch
deleted file mode 100644
index 20b5e8a..0000000
--- a/marshmallow-sphinx.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- marshmallow-2.21.0/docs/conf.py.orig 2020-03-05 13:45:30.000000000 +0100
-+++ marshmallow-2.21.0/docs/conf.py 2025-12-13 22:46:45.826166843 +0100
-@@ -124,4 +124,4 @@ versionwarning_body_selector = "div.docu
-
- # https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html
- def setup(app):
-- app.add_stylesheet('css/versionwarning.css')
-+ app.add_css_file('css/versionwarning.css')
diff --git a/marshmallow-tests.patch b/marshmallow-tests.patch
new file mode 100644
index 0000000..8d1eb67
--- /dev/null
+++ b/marshmallow-tests.patch
@@ -0,0 +1,11 @@
+--- marshmallow-4.1.1/tests/test_utils.py.orig 2025-12-05 23:55:23.374407500 +0100
++++ marshmallow-4.1.1/tests/test_utils.py 2025-12-14 11:43:39.460305780 +0100
+@@ -124,7 +124,7 @@ def test_from_timestamp_with_negative_va
+
+ def test_from_timestamp_with_overflow_value():
+ value = 9223372036854775
+- with pytest.raises(ValueError, match=r"out of range|year must be in 1\.\.9999"):
++ with pytest.raises(ValueError, match=r"is too large|out of range|year must be in 1\.\.9999"):
+ utils.from_timestamp(value)
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-marshmallow.git/commitdiff/fec53a6e21a2256ca82926f779ead544eedd9784
More information about the pld-cvs-commit
mailing list