0708ae
%bcond_with    python2
0708ae
%bcond_without python3
0708ae
1057da
%global modname marshmallow
1057da
%global _docdir_fmt %{name}
1057da
1057da
Name:           python-%{modname}
286f75
Version:        2.19.2
286f75
Release:        1%{?dist}
4326bf
Summary:        Python library for converting complex datatypes to and from primitive types
4326bf
License:        MIT
4326bf
URL:            http://marshmallow.readthedocs.org/
1057da
Source0:        https://github.com/marshmallow-code/marshmallow/archive/%{version}/%{modname}-%{version}.tar.gz
286f75
Patch0:         python-marshmallow-2.19.0-ordered_set.patch
286f75
Patch1:         python-marshmallow-2.19.0-versionwarning-disable.patch
1057da
4326bf
BuildArch:      noarch
1057da
1057da
%global _description \
1057da
Marshmallow is a framework-agnostic library for converting complex datatypes,\
1057da
such as objects, to and from primitive Python datatypes.\
1057da
\
1057da
Marshmallow schemas can be used to:\
1057da
* Validate input data.\
1057da
* Deserialize input data to app-level objects.\
1057da
* Serialize app-level objects to primitive Python types. The serialized objects\
1057da
  can then be rendered to standard formats such as JSON for use in an HTTP API.
1057da
1057da
%description %{_description}
1057da
1057da
%package doc
1057da
Summary:        Documentation for %{name}
459caa
Provides:       python3-%{modname}-doc = %{version}
1057da
Obsoletes:      python3-%{modname}-doc < 2.8.0-1
0708ae
BuildRequires:  python3-sphinx
1057da
1057da
%description doc
1057da
Documentation for %{name}.
1057da
0708ae
0708ae
%if %{with python2}
1057da
%package -n python2-%{modname}
1057da
Summary:        %{summary}
1057da
%{?python_provide:%python_provide python2-%{modname}}
4326bf
BuildRequires:  python2-devel
1057da
BuildRequires:  python2-setuptools
4326bf
# for tests
1057da
BuildRequires:  python2-pytest
1057da
BuildRequires:  python2-pytz
ffba14
BuildRequires:  python2-ordered-set
1057da
BuildRequires:  python2-dateutil
ffba14
BuildRequires:  python2-simplejson
ffba14
Requires:       python2-ordered-set
1057da
Recommends:     python2-dateutil
ffba14
Recommends:     python2-simplejson
1057da
1057da
%description -n python2-%{modname} %{_description}
1057da
1057da
Python 2 version.
0708ae
%endif
1057da
0708ae
0708ae
%if %{with python3}
1057da
%package -n python3-%{modname}
1057da
Summary:        %{summary}
1057da
%{?python_provide:%python_provide python3-%{modname}}
4326bf
BuildRequires:  python3-devel
4326bf
BuildRequires:  python3-setuptools
4326bf
# for tests
4326bf
BuildRequires:  python3-pytest
4326bf
BuildRequires:  python3-pytz
4326bf
BuildRequires:  python3-ordered-set
1057da
BuildRequires:  python3-dateutil
336fe9
BuildRequires:  python3-simplejson
4326bf
Requires:       python3-ordered-set
1057da
Recommends:     python3-dateutil
1057da
Recommends:     python3-simplejson
4326bf
1057da
%description -n python3-%{modname} %{_description}
4326bf
1057da
Python 3 version.
0708ae
%endif
4326bf
4326bf
%prep
286f75
%autosetup -n %{modname}-%{version} -p1
4326bf
4326bf
# remove bundled library
4326bf
# instead of orderedsett we patch code to usu python-ordered-set
4326bf
# ordereddict.py is used only for compatibility with python2.6,
4326bf
# which we do not need
4326bf
rm -f ./marshmallow/ordereddict.py ./marshmallow/orderedset.py
4326bf
1057da
# Drop support for sphinx-issues as it's not yet packaged
1057da
sed -i -e "/sphinx_issues/d" docs/conf.py
4326bf
a9a460
# unsupported theme option 'donate_url' given
a9a460
sed -i -e "/donate_url/d" docs/conf.py
a9a460
4326bf
%build
0708ae
%{?with_python2:%py2_build}
0708ae
%{?with_python3:%py3_build}
Igor Gnatenko 020ea3
sphinx-build -b html docs html
4326bf
4326bf
%install
0708ae
%{?with_python2:%py2_install}
0708ae
%{?with_python3:%py3_install}
1057da
rm -rf html/{.buildinfo,.doctrees}
4326bf
0708ae
4326bf
%check
0708ae
%{?with_python2:py.test-%{python2_version} -v --ignore tests/test_py3/}
0708ae
%{?with_pythoN3:py.test-%{python3_version} -v}
0708ae
4326bf
4326bf
%files doc
4326bf
%license LICENSE
1057da
%doc html examples
1057da
0708ae
0708ae
%if %{with python2}
1057da
%files -n python2-%{modname}
4326bf
%license LICENSE
1057da
%doc CHANGELOG.rst README.rst
1057da
%{python2_sitelib}/%{modname}/
1057da
%{python2_sitelib}/%{modname}-*.egg-info/
0708ae
%endif
4326bf
0708ae
%if %{with python3}
1057da
%files -n python3-%{modname}
4326bf
%license LICENSE
1057da
%doc CHANGELOG.rst README.rst
1057da
%{python3_sitelib}/%{modname}/
1057da
%{python3_sitelib}/%{modname}-*.egg-info/
0708ae
%endif
0708ae
4326bf
4326bf
%changelog
286f75
* Sun Mar 31 2019 Pavel Raiskup <praiskup@redhat.com> - 2.19.2-1
286f75
- new upstream release
286f75
197a08
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-10
197a08
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
197a08
0708ae
* Wed Nov 14 2018 Pavel Raiskup <praiskup@redhat.com> - 2.11.1-9
0708ae
- add rpmbuild --wit{,hout}=python{2,3} options
0708ae
- generate docs by python3-sphinx
0708ae
- don't build Python 2 subpackage by default
0708ae
b4ff4c
* Fri Sep 21 2018 Miroslav Suchý <msuchy@redhat.com> 2.11.1-8
b4ff4c
- add patch for CVE-2018-17175.patch
b4ff4c
368603
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-7
368603
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
368603
402f52
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.11.1-6
402f52
- Rebuilt for Python 3.7
402f52
30ee1b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-5
30ee1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
30ee1b
ffba14
* Thu Jan 25 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.11.1-4
ffba14
- Update Python 2 dependency declarations to new packaging standards
ffba14
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
ffba14
17b0a8
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-3
17b0a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
17b0a8
d37f80
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-2
d37f80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d37f80
Igor Gnatenko 747073
* Mon Jan 09 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.11.1-1
Igor Gnatenko 747073
- Update to 2.11.1 (RHBZ #1411181)
Igor Gnatenko 747073
Igor Gnatenko 3afd02
* Tue Dec 27 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.10.5-1
Igor Gnatenko 3afd02
- Update to 2.10.5 (RHBZ #1408340)
Igor Gnatenko 3afd02
b0b66f
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.10.4-2
b0b66f
- Rebuild for Python 3.6
b0b66f
Igor Gnatenko 8c7a1d
* Thu Dec 01 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.10.4-1
Igor Gnatenko 8c7a1d
- Update to 2.10.4 (RHBZ #1400189)
Igor Gnatenko 8c7a1d
Igor Gnatenko 653a29
* Tue Oct 04 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.10.3-1
Igor Gnatenko 653a29
- Update to 2.10.3 (RHBZ #1381098)
Igor Gnatenko 653a29
Igor Gnatenko e6392b
* Thu Sep 15 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.10.1-2
Igor Gnatenko e6392b
- Update to 2.10.1 (RHBZ #1376432)
Igor Gnatenko e6392b
Igor Gnatenko 020ea3
* Tue Sep 06 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.10.0-2
Igor Gnatenko 020ea3
- Trivial fix in spec
Igor Gnatenko 020ea3
Igor Gnatenko 81755b
* Tue Sep 06 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.10.0-1
Igor Gnatenko 81755b
- Update to 2.10.0
Igor Gnatenko 81755b
77a2bd
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-2
77a2bd
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
77a2bd
Igor Gnatenko ec4341
* Thu Jul 07 2016 Igor Gnatenko <ignatenko@redhat.com> - 2.9.0-1
Igor Gnatenko ec4341
- Update to 2.9.0
Igor Gnatenko ec4341
1057da
* Wed Jul 06 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.8.0-1
1057da
- Update to 2.8.0
1057da
- Add recommends
1057da
- Modernize spec
1057da
989c95
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-0.3.gitea1def9
989c95
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
989c95
336fe9
* Wed Nov 18 2015 Miroslav Suchý <msuchy@redhat.com> 2.2.1-0.2.gitea1def9
336fe9
- add BR simplejson
336fe9
- add BR python-tox
336fe9
b48e7f
* Wed Nov 18 2015 Miroslav Suchý <msuchy@redhat.com> 2.2.1-0.1.gitea1def9
b48e7f
- rebase to 2.2.1
b48e7f
b48e7f
* Wed Nov 18 2015 Miroslav Suchý <miroslav@suchy.cz> 2.2.1-0.0.gitea1def9
b48e7f
- rebase to 2.2.1
5e909d
4326bf
* Fri Sep 11 2015 Miroslav Suchý <miroslav@suchy.cz> 2.0.0-0.6.gita8b3385
4326bf
- 1219288 - fix ownership of docdir and use correct release number
4326bf
4326bf
* Fri Sep 11 2015 Miroslav Suchý <msuchy@redhat.com> 2.0.0-0.5.a8b3385
4326bf
- add short git hash to release number
4326bf
4326bf
* Fri Sep 11 2015 Miroslav Suchý <msuchy@redhat.com> 2.0.0b5-4
4326bf
- create -doc subpackages
4326bf
- 1219288 - reorganize spec file
4326bf
4326bf
* Mon Sep 07 2015 Miroslav Suchý <msuchy@redhat.com> 2.0.0b5-3
4326bf
- explicitely list docdir
4326bf
4326bf
* Mon Sep 07 2015 Miroslav Suchý <msuchy@redhat.com> 2.0.0b5-2
4326bf
- unbundle ordereddict and ordered set
4326bf
- add documentation
4326bf
4326bf
* Mon Aug 24 2015 Valentin Gologuzov <vgologuz@redhat.com> - 2.0.0b5-1
4326bf
- Rebuild with the newest upstream version
4326bf
4326bf
* Thu May 07 2015 Dan Callaghan <dcallagh@redhat.com> - 1.2.6-1
4326bf
- initial version