Blob Blame History Raw
<<<<<<< HEAD
%global pypi_name testfixtures

Name:           python-%{pypi_name}
Version:        6.14.1
Release:        1%{?dist}
Summary:        A collection of helpers and mock objects for unit tests

License:        MIT
URL:            https://github.com/Simplistix/testfixtures
Source0:        %{pypi_source}
BuildArch:      noarch

%description
Testfixtures is a collection of helpers and mock objects that are useful
when writing automated tests in Python.

%package -n python3-%{pypi_name}
Summary:        %{summary}

BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-cov
BuildRequires:  python3-pytest-django
BuildRequires:  python3-twisted
BuildRequires:  python3-zope-component
BuildRequires:  python3-sybil
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
Testfixtures is a collection of helpers and mock objects that are useful
when writing automated tests in Python.

%prep
%autosetup -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install

%check
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version} -v testfixtures/tests/*.py \
  -k "not test_log_then_patch and not test_our_wrap_dealing_with_mock_patch and not test_patch_with_dict"

%files -n python3-%{pypi_name}
%doc CHANGELOG.rst README.rst
%license LICENSE.txt
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/*.egg-info/

%changelog
* Thu Jun 04 2020 Fabian Affolter <mail@fabian-affolter.ch> - 6.14.1-2
- Remove *.egg in prep section

* Wed Jun 03 2020 Fabian Affolter <mail@fabian-affolter.ch> - 6.14.1-1
- Exclude the failing tests for now
- Update to latest upstream release 6.14.1

* Sat Apr 18 2020 Fabian Affolter <mail@fabian-affolter.ch> - 6.14.0-1
- Update to latest upstream release 6.14.0

* Wed Feb 19 2020 Fabian Affolter <mail@fabian-affolter.ch> - 6.13.0-1
- Update to latest upstream release 6.13.0

* Mon Feb 10 2020 Fabian Affolter <mail@fabian-affolter.ch> - 6.12.0-1
- Update to latest upstream release 6.12.0

* Sat Dec 28 2019 Fabian Affolter <mail@fabian-affolter.ch> - 6.10.3-1
- Update to latest upstream release 6.10.3

* Sat Jun 08 2019 Fabian Affolter <mail@fabian-affolter.ch> - 6.8.2-2
- Fix license, URL and naming (rhbz#1708161)

* Thu May 09 2019 Fabian Affolter <mail@fabian-affolter.ch> - 6.8.2-1
- Initial package for Fedora
=======
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without python3
%else  # 0#{?fedora} || 0#{?rhel} >= 8
%bcond_with python3
%endif # 0#{?fedora} || 0#{?rhel} >= 8

%global pypi_name testfixtures
%global global_sum Collection of helpers and mock objects for unit tests and doc tests
%global global_desc							\
TestFixtures is a collection of helpers and mock objects that are	\
useful when writing unit tests or doc tests.				\
									\
If you’re wondering why “yet another mock object library”, testing	\
is often described as an art form and as such some styles of library	\
will suit some people while others will suit other styles.  This	\
library contains common test fixtures the author found himself		\
repeating from package to package and so decided to extract them	\
into their own library and give them some tests of their own!


Name:		python-%{pypi_name}
Version:	4.14.3
Release:	6%{?dist}
Summary:	%{global_sum}

License:	MIT
URL:		https://pypi.python.org/pypi/%{pypi_name}
Source0:	https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildArch:	noarch

%description
%{global_desc}


%package doc
Summary:	Documentation-files for %{name}

%description doc
This package contains the documentation-files for %{name}.


%package -n python2-%{pypi_name}
Summary:	%{global_sum}

BuildRequires:	python2-devel
BuildRequires:	python-coveralls
BuildRequires:	python2-django1.11
BuildRequires:	python-manuel
BuildRequires:	python-mock
BuildRequires:	python-nose
BuildRequires:	python-nose-cov
BuildRequires:	python-nose_fixes
BuildRequires:	python-pkginfo
BuildRequires:	python-setuptools
BuildRequires:	python-setuptools_git
BuildRequires:	python-sphinx
BuildRequires:	python-twine
BuildRequires:	python-wheel
BuildRequires:	python-zope-component

%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
%{global_desc}


%package -n python2-%{pypi_name}-tests
Summary:	Testsuite for python2-%{pypi_name}

Requires:	python2-%{pypi_name}		== %{version}-%{release}
Requires:	python-coveralls
Requires:	python2-django1.11
Requires:	python-manuel
Requires:	python-mock
Requires:	python-nose
Requires:	python-nose-cov
Requires:	python-nose_fixes
Requires:	python-pkginfo
Requires:	python-setuptools
Requires:	python-setuptools_git
Requires:	python-sphinx
Requires:	python-twine
Requires:	python-wheel
Requires:	python-zope-component

%{?python_provide:%python_provide python2-%{pypi_name}-tests}

%description -n python2-%{pypi_name}-tests
This package contains the testsuite for python2-%{pypi_name}.


%if %{with python3}
%package -n python3-%{pypi_name}
Summary:	%{global_sum}

BuildRequires:	python3-coveralls
BuildRequires:	python3-devel
BuildRequires:	python3-django
BuildRequires:	python3-manuel
BuildRequires:	python3-mock
BuildRequires:	python3-nose
BuildRequires:	python3-nose-cov
BuildRequires:	python3-nose_fixes
BuildRequires:	python3-pkginfo
BuildRequires:	python3-setuptools
BuildRequires:	python3-setuptools_git
BuildRequires:	python3-sphinx
BuildRequires:	python3-twine
BuildRequires:	python3-wheel
BuildRequires:	python3-zope-component

%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
%{global_desc}


%package -n python3-%{pypi_name}-tests
Summary:	Testsuite for python3-%{pypi_name}

Requires:	python3-%{pypi_name}		== %{version}-%{release}
Requires:	python3-coveralls
Requires:	python3-django
Requires:	python3-manuel
Requires:	python3-mock
Requires:	python3-nose
Requires:	python3-nose-cov
Requires:	python3-nose_fixes
Requires:	python3-pkginfo
Requires:	python3-setuptools
Requires:	python3-setuptools_git
Requires:	python3-sphinx
Requires:	python3-twine
Requires:	python3-wheel
Requires:	python3-zope-component

%{?python_provide:%python_provide python3-%{pypi_name}-tests}

%description -n python3-%{pypi_name}-tests
This package contains the testsuite for python3-%{pypi_name}.
%endif # with python3


%prep
%autosetup -n %{pypi_name}-%{version} -p 1
%{__rm} -fr *.egg*


%build
%py2_build
%if %{with python3}
%py3_build
%endif # with python3
export PYTHONPATH="$PWD/build/lib"
%{__make} -C docs html
unset PYTHONPATH
%{_bindir}/find build/lib -type f -name '*.py?' -print -delete


%install
%py2_install
%if %{with python3}
%py3_install
%endif # with python3
%{__rm} -f docs/_build/html/{.buildinfo,objects.inv}


%check
%{_bindir}/nosetests-%{python2_version} -vv
%if %{with python3}
%{_bindir}/nosetests-%{python3_version} -vv
%endif # with python3


%files doc
%doc docs/changes.txt docs/_build/html PKG-INFO
%license LICENSE.txt


%files -n python2-%{pypi_name}
%doc PKG-INFO
%license LICENSE.txt
%exclude %{python2_sitelib}/%{pypi_name}/tests
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info


%files -n python2-%{pypi_name}-tests
%{python2_sitelib}/%{pypi_name}/tests


%if %{with python3}
%files -n python3-%{pypi_name}
%doc PKG-INFO
%license LICENSE.txt
%exclude %{python3_sitelib}/%{pypi_name}/tests
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info


%files -n python3-%{pypi_name}-tests
%{python3_sitelib}/%{pypi_name}/tests
%endif # with python3


%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.14.3-5
- Rebuilt for Python 3.7

* Fri Mar 16 2018 Miro Hrončok <mhroncok@redhat.com> - 4.14.3-4
- Fix pytohn2-django requires https://fedoraproject.org/wiki/Changes/Django20

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon May 15 2017 Björn Esser <besser82@fedoraproject.org> - 4.14.3-1
- New upstream release (rhbz#1450930)

* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 4.13.5-1
- Initial import (rhbz#1445824)

* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 4.13.5-0.2
- Fix E: python-bytecode-wrong-magic-value

* Wed Apr 26 2017 Björn Esser <besser82@fedoraproject.org> - 4.13.5-0.1
- Initial rpm-release (rhbz#1445824)
>>>>>>> 6904846f51c0cdfb8b95a1d252ca4fad26b49ff6