[packages/python-marshmallow] - initial
qboosh
qboosh at pld-linux.org
Sun Dec 14 12:00:17 CET 2025
commit dc67e0316564fed9ee22b8efc2bd98d4e37d3f67
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 14 12:00:25 2025 +0100
- initial
marshmallow-sphinx.patch | 8 +++
python-marshmallow.spec | 164 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 172 insertions(+)
---
diff --git a/python-marshmallow.spec b/python-marshmallow.spec
new file mode 100644
index 0000000..4316aa2
--- /dev/null
+++ b/python-marshmallow.spec
@@ -0,0 +1,164 @@
+#
+# 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/marshmallow-sphinx.patch b/marshmallow-sphinx.patch
new file mode 100644
index 0000000..20b5e8a
--- /dev/null
+++ b/marshmallow-sphinx.patch
@@ -0,0 +1,8 @@
+--- 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')
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-marshmallow.git/commitdiff/dc67e0316564fed9ee22b8efc2bd98d4e37d3f67
More information about the pld-cvs-commit
mailing list