diff --git a/python-marshmallow.spec b/python-marshmallow.spec index 0328209..74c12ca 100644 --- a/python-marshmallow.spec +++ b/python-marshmallow.spec @@ -1,6 +1,3 @@ -%bcond_with python2 -%bcond_without python3 - %global modname marshmallow %global _docdir_fmt %{name} @@ -40,30 +37,6 @@ BuildRequires: python3-sphinx %description doc Documentation for %{name}. - -%if %{with python2} -%package -n python2-%{modname} -Summary: %{summary} -%{?python_provide:%python_provide python2-%{modname}} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -# for tests -BuildRequires: python2-pytest -BuildRequires: python2-pytz -BuildRequires: python2-ordered-set -BuildRequires: python2-dateutil -BuildRequires: python2-simplejson -Requires: python2-ordered-set -Recommends: python2-dateutil -Recommends: python2-simplejson - -%description -n python2-%{modname} %{_description} - -Python 2 version. -%endif - - -%if %{with python3} %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} @@ -83,7 +56,6 @@ Recommends: python3-simplejson %description -n python3-%{modname} %{_description} Python 3 version. -%endif %prep %autosetup -n %{modname}-%{version} -p1 @@ -96,19 +68,16 @@ rm -f ./marshmallow/orderedset.py sed -i -e "/donate_url/d" docs/conf.py %build -%{?with_python2:%py2_build} -%{?with_python3:%py3_build} +%py3_build sphinx-build -b html docs html %install -%{?with_python2:%py2_install} -%{?with_python3:%py3_install} +%py3_install rm -rf html/{.buildinfo,.doctrees} %check -%{?with_python2:py.test-%{python2_version} -v --ignore tests/test_py3/} -%{?with_pythoN3:py.test-%{python3_version} -v} +py.test-%{python3_version} -v %files doc @@ -116,21 +85,11 @@ rm -rf html/{.buildinfo,.doctrees} %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