2955183
%global __python %{__python3}
1057da6
%global modname marshmallow
1057da6
%global _docdir_fmt %{name}
1057da6
1057da6
Name:           python-%{modname}
5ed70e6
Version:        3.21.1
562fbbc
Release:        %autorelease
4326bfd
Summary:        Python library for converting complex datatypes to and from primitive types
4326bfd
License:        MIT
4326bfd
URL:            http://marshmallow.readthedocs.org/
1057da6
Source0:        https://github.com/marshmallow-code/marshmallow/archive/%{version}/%{modname}-%{version}.tar.gz
0904585
Patch0:         ordered_set.patch
1057da6
4326bfd
BuildArch:      noarch
1057da6
1057da6
%global _description \
1057da6
Marshmallow is a framework-agnostic library for converting complex datatypes,\
1057da6
such as objects, to and from primitive Python datatypes.\
1057da6
\
1057da6
Marshmallow schemas can be used to:\
1057da6
* Validate input data.\
1057da6
* Deserialize input data to app-level objects.\
1057da6
* Serialize app-level objects to primitive Python types. The serialized objects\
1057da6
  can then be rendered to standard formats such as JSON for use in an HTTP API.
1057da6
1057da6
%description %{_description}
1057da6
1057da6
%package doc
1057da6
Summary:        Documentation for %{name}
459caa5
Provides:       python3-%{modname}-doc = %{version}
1057da6
Obsoletes:      python3-%{modname}-doc < 2.8.0-1
0708ae9
BuildRequires:  python3-sphinx
1057da6
1057da6
%description doc
1057da6
Documentation for %{name}.
1057da6
1057da6
%package -n python3-%{modname}
1057da6
Summary:        %{summary}
4326bfd
BuildRequires:  python3-devel
4326bfd
BuildRequires:  python3-setuptools
4326bfd
# for tests
4326bfd
BuildRequires:  python3-pytest
4326bfd
BuildRequires:  python3-pytz
4326bfd
BuildRequires:  python3-ordered-set
1057da6
BuildRequires:  python3-dateutil
336fe9a
BuildRequires:  python3-simplejson
e5246f6
BuildRequires:  python3-sphinx-issues
4326bfd
Requires:       python3-ordered-set
1057da6
Recommends:     python3-dateutil
1057da6
Recommends:     python3-simplejson
4326bfd
1057da6
%description -n python3-%{modname} %{_description}
4326bfd
1057da6
Python 3 version.
4326bfd
4326bfd
%prep
286f754
%autosetup -n %{modname}-%{version} -p1
4326bfd
4326bfd
# remove bundled library
4326bfd
# instead of orderedsett we patch code to usu python-ordered-set
0904585
rm -f ./marshmallow/orderedset.py
4326bfd
a9a4600
# unsupported theme option 'donate_url' given
a9a4600
sed -i -e "/donate_url/d" docs/conf.py
ee36446
# python3-autodocsumm is not in Fedora
ee36446
# This is needed only for doc subpackage.
ee36446
# this used to be patch, but this change every release
ee36446
# and I am sick of change it every time
38d89fa
sed -i '/"autodocsumm",/d' docs/conf.py
38d89fa
sed -i '/"autodocsumm==/d' pyproject.toml
38d89fa
sed -i '/"versionwarning.extension",/d' docs/conf.py
38d89fa
sed -i '/"sphinx-version-warning==/d' pyproject.toml
f0a6490
sed -i '/"sphinx_issues",/d' docs/conf.py
f0a6490
sed -i '/"sphinx-issues==/d' pyproject.toml
c9ccc4c
sed -i '/version = release = importlib.metadata.version/d' docs/conf.py
a9a4600
ea006eb
%generate_buildrequires
ea006eb
%pyproject_buildrequires -x docs,tests
ea006eb
4326bfd
%build
ea006eb
%pyproject_wheel
Igor Gnatenko 020ea34
sphinx-build -b html docs html
4326bfd
4326bfd
%install
ea006eb
%pyproject_install
b8b2f6f
%pyproject_save_files %{modname}
1057da6
rm -rf html/{.buildinfo,.doctrees}
4326bfd
0708ae9
4326bfd
%check
ea006eb
%pyproject_check_import
b8b2f6f
%{py_test_envvars} py.test-%{python3_version} -v
0708ae9
4326bfd
4326bfd
%files doc
4326bfd
%license LICENSE
1057da6
%doc html examples
1057da6
0708ae9
1057da6
%files -n python3-%{modname}
4326bfd
%license LICENSE
1057da6
%doc CHANGELOG.rst README.rst
1057da6
%{python3_sitelib}/%{modname}/
11db787
%{python3_sitelib}/%{modname}-%{version}.dist-info/
0708ae9
4326bfd
4326bfd
%changelog
562fbbc
%autochangelog