c1398b9
%if 0%{?fedora} || 0%{?rhel} >= 8
c1398b9
%bcond_without python3
c1398b9
%else  # 0#{?fedora} || 0#{?rhel} >= 8
c1398b9
%bcond_with python3
c1398b9
%endif # 0#{?fedora} || 0#{?rhel} >= 8
c1398b9
c1398b9
%global pypi_name testfixtures
c1398b9
%global global_sum Collection of helpers and mock objects for unit tests and doc tests
c1398b9
%global global_desc							\
c1398b9
TestFixtures is a collection of helpers and mock objects that are	\
c1398b9
useful when writing unit tests or doc tests.				\
c1398b9
									\
c1398b9
If you’re wondering why “yet another mock object library”, testing	\
c1398b9
is often described as an art form and as such some styles of library	\
c1398b9
will suit some people while others will suit other styles.  This	\
c1398b9
library contains common test fixtures the author found himself		\
c1398b9
repeating from package to package and so decided to extract them	\
c1398b9
into their own library and give them some tests of their own!
c1398b9
c1398b9
c1398b9
Name:		python-%{pypi_name}
47abaa3
Version:	4.14.3
3a50e10
Release:	3%{?dist}
c1398b9
Summary:	%{global_sum}
c1398b9
c1398b9
License:	MIT
c1398b9
URL:		https://pypi.python.org/pypi/%{pypi_name}
c1398b9
Source0:	https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
c1398b9
c1398b9
BuildArch:	noarch
c1398b9
c1398b9
%description
c1398b9
%{global_desc}
c1398b9
c1398b9
c1398b9
%package doc
c1398b9
Summary:	Documentation-files for %{name}
c1398b9
c1398b9
%description doc
c1398b9
This package contains the documentation-files for %{name}.
c1398b9
c1398b9
c1398b9
%package -n python2-%{pypi_name}
c1398b9
Summary:	%{global_sum}
c1398b9
c1398b9
BuildRequires:	python2-devel
c1398b9
BuildRequires:	python-coveralls
47abaa3
BuildRequires:	python-django
c1398b9
BuildRequires:	python-manuel
c1398b9
BuildRequires:	python-mock
c1398b9
BuildRequires:	python-nose
c1398b9
BuildRequires:	python-nose-cov
c1398b9
BuildRequires:	python-nose_fixes
c1398b9
BuildRequires:	python-pkginfo
c1398b9
BuildRequires:	python-setuptools
c1398b9
BuildRequires:	python-setuptools_git
c1398b9
BuildRequires:	python-sphinx
c1398b9
BuildRequires:	python-twine
c1398b9
BuildRequires:	python-wheel
c1398b9
BuildRequires:	python-zope-component
c1398b9
c1398b9
%{?python_provide:%python_provide python2-%{pypi_name}}
c1398b9
c1398b9
%description -n python2-%{pypi_name}
c1398b9
%{global_desc}
c1398b9
c1398b9
c1398b9
%package -n python2-%{pypi_name}-tests
c1398b9
Summary:	Testsuite for python2-%{pypi_name}
c1398b9
c1398b9
Requires:	python2-%{pypi_name}		== %{version}-%{release}
c1398b9
Requires:	python-coveralls
47abaa3
Requires:	python-django
c1398b9
Requires:	python-manuel
c1398b9
Requires:	python-mock
c1398b9
Requires:	python-nose
c1398b9
Requires:	python-nose-cov
c1398b9
Requires:	python-nose_fixes
c1398b9
Requires:	python-pkginfo
c1398b9
Requires:	python-setuptools
c1398b9
Requires:	python-setuptools_git
c1398b9
Requires:	python-sphinx
c1398b9
Requires:	python-twine
c1398b9
Requires:	python-wheel
c1398b9
Requires:	python-zope-component
c1398b9
c1398b9
%{?python_provide:%python_provide python2-%{pypi_name}-tests}
c1398b9
c1398b9
%description -n python2-%{pypi_name}-tests
c1398b9
This package contains the testsuite for python2-%{pypi_name}.
c1398b9
c1398b9
c1398b9
%if %{with python3}
c1398b9
%package -n python3-%{pypi_name}
c1398b9
Summary:	%{global_sum}
c1398b9
c1398b9
BuildRequires:	python3-coveralls
c1398b9
BuildRequires:	python3-devel
47abaa3
BuildRequires:	python3-django
c1398b9
BuildRequires:	python3-manuel
c1398b9
BuildRequires:	python3-mock
c1398b9
BuildRequires:	python3-nose
c1398b9
BuildRequires:	python3-nose-cov
c1398b9
BuildRequires:	python3-nose_fixes
c1398b9
BuildRequires:	python3-pkginfo
c1398b9
BuildRequires:	python3-setuptools
c1398b9
BuildRequires:	python3-setuptools_git
c1398b9
BuildRequires:	python3-sphinx
c1398b9
BuildRequires:	python3-twine
c1398b9
BuildRequires:	python3-wheel
c1398b9
BuildRequires:	python3-zope-component
c1398b9
c1398b9
%{?python_provide:%python_provide python3-%{pypi_name}}
c1398b9
c1398b9
%description -n python3-%{pypi_name}
c1398b9
%{global_desc}
c1398b9
c1398b9
c1398b9
%package -n python3-%{pypi_name}-tests
c1398b9
Summary:	Testsuite for python3-%{pypi_name}
c1398b9
c1398b9
Requires:	python3-%{pypi_name}		== %{version}-%{release}
c1398b9
Requires:	python3-coveralls
47abaa3
Requires:	python3-django
c1398b9
Requires:	python3-manuel
c1398b9
Requires:	python3-mock
c1398b9
Requires:	python3-nose
c1398b9
Requires:	python3-nose-cov
c1398b9
Requires:	python3-nose_fixes
c1398b9
Requires:	python3-pkginfo
c1398b9
Requires:	python3-setuptools
c1398b9
Requires:	python3-setuptools_git
c1398b9
Requires:	python3-sphinx
c1398b9
Requires:	python3-twine
c1398b9
Requires:	python3-wheel
c1398b9
Requires:	python3-zope-component
c1398b9
c1398b9
%{?python_provide:%python_provide python3-%{pypi_name}-tests}
c1398b9
c1398b9
%description -n python3-%{pypi_name}-tests
c1398b9
This package contains the testsuite for python3-%{pypi_name}.
c1398b9
%endif # with python3
c1398b9
c1398b9
c1398b9
%prep
c1398b9
%autosetup -n %{pypi_name}-%{version} -p 1
c1398b9
%{__rm} -fr *.egg*
c1398b9
c1398b9
c1398b9
%build
c1398b9
%py2_build
c1398b9
%if %{with python3}
c1398b9
%py3_build
c1398b9
%endif # with python3
c1398b9
export PYTHONPATH="$PWD/build/lib"
c1398b9
%{__make} -C docs html
c1398b9
unset PYTHONPATH
c1398b9
%{_bindir}/find build/lib -type f -name '*.py?' -print -delete
c1398b9
c1398b9
c1398b9
%install
c1398b9
%py2_install
c1398b9
%if %{with python3}
c1398b9
%py3_install
c1398b9
%endif # with python3
c1398b9
%{__rm} -f docs/_build/html/{.buildinfo,objects.inv}
c1398b9
c1398b9
c1398b9
%check
c1398b9
%{_bindir}/nosetests-%{python2_version} -vv
c1398b9
%if %{with python3}
c1398b9
%{_bindir}/nosetests-%{python3_version} -vv
c1398b9
%endif # with python3
c1398b9
c1398b9
c1398b9
%files doc
c1398b9
%doc docs/changes.txt docs/_build/html PKG-INFO
c1398b9
%license LICENSE.txt
c1398b9
c1398b9
c1398b9
%files -n python2-%{pypi_name}
c1398b9
%doc PKG-INFO
c1398b9
%license LICENSE.txt
c1398b9
%exclude %{python2_sitelib}/%{pypi_name}/tests
c1398b9
%{python2_sitelib}/%{pypi_name}
c1398b9
%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info
c1398b9
c1398b9
c1398b9
%files -n python2-%{pypi_name}-tests
c1398b9
%{python2_sitelib}/%{pypi_name}/tests
c1398b9
c1398b9
c1398b9
%if %{with python3}
c1398b9
%files -n python3-%{pypi_name}
c1398b9
%doc PKG-INFO
c1398b9
%license LICENSE.txt
c1398b9
%exclude %{python3_sitelib}/%{pypi_name}/tests
c1398b9
%{python3_sitelib}/%{pypi_name}
c1398b9
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
c1398b9
c1398b9
c1398b9
%files -n python3-%{pypi_name}-tests
c1398b9
%{python3_sitelib}/%{pypi_name}/tests
c1398b9
%endif # with python3
c1398b9
c1398b9
c1398b9
%changelog
3a50e10
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.3-3
3a50e10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3a50e10
a1d4b18
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.3-2
a1d4b18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a1d4b18
47abaa3
* Mon May 15 2017 Björn Esser <besser82@fedoraproject.org> - 4.14.3-1
47abaa3
- New upstream release (rhbz#1450930)
47abaa3
c1398b9
* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 4.13.5-1
c1398b9
- Initial import (rhbz#1445824)
c1398b9
c1398b9
* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 4.13.5-0.2
c1398b9
- Fix E: python-bytecode-wrong-magic-value
c1398b9
c1398b9
* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 4.13.5-0.1
c1398b9
- Initial rpm-release (rhbz#1445824)