| |
@@ -1,9 +1,12 @@
|
| |
+ %bcond_with python2
|
| |
+ %bcond_without python3
|
| |
+
|
| |
%global modname marshmallow
|
| |
%global _docdir_fmt %{name}
|
| |
|
| |
Name: python-%{modname}
|
| |
Version: 2.11.1
|
| |
- Release: 8%{?dist}
|
| |
+ Release: 9%{?dist}
|
| |
Summary: Python library for converting complex datatypes to and from primitive types
|
| |
License: MIT
|
| |
URL: http://marshmallow.readthedocs.org/
|
| |
@@ -29,11 +32,13 @@
|
| |
Summary: Documentation for %{name}
|
| |
Provides: python3-%{modname}-doc = %{version}
|
| |
Obsoletes: python3-%{modname}-doc < 2.8.0-1
|
| |
- BuildRequires: python2-sphinx
|
| |
+ BuildRequires: python3-sphinx
|
| |
|
| |
%description doc
|
| |
Documentation for %{name}.
|
| |
|
| |
+
|
| |
+ %if %{with python2}
|
| |
%package -n python2-%{modname}
|
| |
Summary: %{summary}
|
| |
%{?python_provide:%python_provide python2-%{modname}}
|
| |
@@ -52,7 +57,10 @@
|
| |
%description -n python2-%{modname} %{_description}
|
| |
|
| |
Python 2 version.
|
| |
+ %endif
|
| |
|
| |
+
|
| |
+ %if %{with python3}
|
| |
%package -n python3-%{modname}
|
| |
Summary: %{summary}
|
| |
%{?python_provide:%python_provide python3-%{modname}}
|
| |
@@ -71,6 +79,7 @@
|
| |
%description -n python3-%{modname} %{_description}
|
| |
|
| |
Python 3 version.
|
| |
+ %endif
|
| |
|
| |
%prep
|
| |
%setup -n %{modname}-%{version}
|
| |
@@ -90,36 +99,49 @@
|
| |
sed -i -e "/donate_url/d" docs/conf.py
|
| |
|
| |
%build
|
| |
- %py2_build
|
| |
- %py3_build
|
| |
+ %{?with_python2:%py2_build}
|
| |
+ %{?with_python3:%py3_build}
|
| |
sphinx-build -b html docs html
|
| |
|
| |
%install
|
| |
- %py2_install
|
| |
- %py3_install
|
| |
+ %{?with_python2:%py2_install}
|
| |
+ %{?with_python3:%py3_install}
|
| |
rm -rf html/{.buildinfo,.doctrees}
|
| |
|
| |
+
|
| |
%check
|
| |
- py.test-%{python2_version} -v --ignore tests/test_py3/
|
| |
- py.test-%{python3_version} -v
|
| |
+ %{?with_python2:py.test-%{python2_version} -v --ignore tests/test_py3/}
|
| |
+ %{?with_pythoN3:py.test-%{python3_version} -v}
|
| |
+
|
| |
|
| |
%files doc
|
| |
%license LICENSE
|
| |
%doc html examples
|
| |
|
| |
+
|
| |
+ %if %{with python2}
|
| |
%files -n python2-%{modname}
|
| |
%license LICENSE
|
| |
%doc CHANGELOG.rst README.rst
|
| |
%{python2_sitelib}/%{modname}/
|
| |
%{python2_sitelib}/%{modname}-*.egg-info/
|
| |
+ %endif
|
| |
|
| |
+ %if %{with python3}
|
| |
%files -n python3-%{modname}
|
| |
%license LICENSE
|
| |
%doc CHANGELOG.rst README.rst
|
| |
%{python3_sitelib}/%{modname}/
|
| |
%{python3_sitelib}/%{modname}-*.egg-info/
|
| |
+ %endif
|
| |
+
|
| |
|
| |
%changelog
|
| |
+ * Wed Nov 14 2018 Pavel Raiskup <praiskup@redhat.com> - 2.11.1-9
|
| |
+ - add rpmbuild --wit{,hout}=python{2,3} options
|
| |
+ - generate docs by python3-sphinx
|
| |
+ - don't build Python 2 subpackage by default
|
| |
+
|
| |
* Fri Sep 21 2018 Miroslav Suchý <msuchy@redhat.com> 2.11.1-8
|
| |
- add patch for CVE-2018-17175.patch
|
| |
|
| |