Blob Blame History Raw
%global with_python3 1

Name:           python-flexmock
Version:        0.10.2
Release:        5%{?dist}
Summary:        Testing library that makes it easy to create mocks, stubs and fakes

License:        BSD
URL:            https://flexmock.readthedocs.org
Source0:        https://pypi.python.org/packages/source/f/flexmock/flexmock-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools

# for testing with various runners (twisted contains trial)
BuildRequires:  python-nose
BuildRequires:  pytest
BuildRequires:  python-twisted-core

%if 0%{with_python3}
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools

# for testing with various runners (no twisted on py3 yet)
BuildRequires:  python%{python3_pkgversion}-nose
BuildRequires:  python%{python3_pkgversion}-pytest
%endif


%description
Flexmock is a testing library for Python that makes it easy to create mocks,
stubs and fakes. The API is inspired by a Ruby library of the same name, but
Python flexmock is not a clone of the Ruby version. It omits a number of
redundancies in the Ruby flexmock API, alters some defaults, and introduces
a number of Python-only features.


%package -n python2-flexmock
Summary:        Testing library that makes it easy to create mocks, stubs and fakes
%{?python_provide:%python_provide python2-flexmock}

%description -n python2-flexmock
Flexmock is a testing library for Python that makes it easy to create mocks,
stubs and fakes. The API is inspired by a Ruby library of the same name, but
Python flexmock is not a clone of the Ruby version. It omits a number of
redundancies in the Ruby flexmock API, alters some defaults, and introduces
a number of Python-only features.


%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-flexmock
Summary:        Testing library that makes it easy to create mocks, stubs and fakes
%{?python_provide:%python_provide python%{python3_pkgversion}-flexmock}

%description -n python%{python3_pkgversion}-flexmock
Flexmock is a testing library for Python that makes it easy to create mocks,
stubs and fakes. The API is inspired by a Ruby library of the same name, but
Python flexmock is not a clone of the Ruby version. It omits a number of
redundancies in the Ruby flexmock API, alters some defaults, and introduces
a number of Python-only features.
%endif # with_python3


%prep
%setup -q -n flexmock-%{version}


%build
# export lang so that python3 can properly decode readme
%py2_build

%if 0%{?with_python3}
%py3_build
%endif # with_python3


%install
%if 0%{?with_python3}
%py3_install
%endif # with_python3

%py2_install


%check
PYEXECS=%{__python2} ./tests/run_tests.sh

%if 0%{?with_python3}
PYEXECS=%{__python3} ./tests/run_tests.sh
%endif

 
%files -n python2-flexmock
%license LICENSE
%doc README.rst CHANGELOG docs/
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-flexmock
%license LICENSE
%doc README.rst CHANGELOG docs/
%{python3_sitelib}/*
%endif


%changelog
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 0.10.2-5
- Rebuilt to change main python from 3.4 to 3.6

* Thu Mar 16 2017 Orion Poplawski <orion@cora.nwra.com> - 0.10.2-4
- Build python2/3-flexmock
- Modernize spec

* Sat Apr 02 2016 Kevin Fenzi <kevin@scrye.com> - 0.10.2-3
- Initial version for epel7

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 21 2016 Slavek Kabrda <bkabrda@redhat.com> - 0.10.2-1
- Update to 0.10.2

* Thu Dec 17 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.10.1-1
- Update to 0.10.1

* Fri Dec 11 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.10.0-1
- Update to 0.10.0

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Nov 14 2014 Slavek Kabrda <bkabrda@redhat.com> - 0.9.7-1
- Update to 0.9.7.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.6-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Nov 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.6-1
- Update to 0.9.6.

* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.4-3
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri May 25 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.4-1
- Update to flexmock 0.9.4.
- The patch is now part of upstream => remove it.
- Introduce Python 3 subpackage.
- Add documentation files, that are now part of source package.

* Tue Feb 21 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.2-1
- Initial package.