|
|
849704c |
%if 0%{?fedora}
|
|
|
849704c |
%global with_python3 1
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
849704c |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
849704c |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
849704c |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
849704c |
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
849704c |
%global modname freezegun
|
|
|
d0ec6e2 |
%global sum Let your Python tests travel through time
|
|
|
849704c |
|
|
|
849704c |
Name: python-freezegun
|
|
|
f378ea5 |
Version: 0.3.8
|
|
|
431f7f8 |
Release: 6%{?dist}
|
|
|
d0ec6e2 |
Summary: %{sum}
|
|
|
849704c |
|
|
|
849704c |
Group: Development/Libraries
|
|
|
849704c |
License: ASL 2.0
|
|
|
f378ea5 |
URL: https://pypi.io/project/freezegun
|
|
|
f378ea5 |
Source0: https://pypi.io/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
|
|
|
849704c |
|
|
|
849704c |
BuildArch: noarch
|
|
|
849704c |
|
|
|
849704c |
|
|
|
849704c |
BuildRequires: python2-devel
|
|
|
849704c |
BuildRequires: python-setuptools
|
|
|
849704c |
BuildRequires: python-six
|
|
|
849704c |
BuildRequires: python-dateutil
|
|
|
849704c |
BuildRequires: python-sure
|
|
|
6205f6e |
BuildRequires: python-nose
|
|
|
6205f6e |
BuildRequires: python-coverage
|
|
|
6205f6e |
BuildRequires: python-mock
|
|
|
849704c |
|
|
|
849704c |
%if 0%{?with_python3}
|
|
|
849704c |
BuildRequires: python3-devel
|
|
|
849704c |
BuildRequires: python3-setuptools
|
|
|
849704c |
BuildRequires: python3-six
|
|
|
849704c |
BuildRequires: python3-dateutil
|
|
|
849704c |
BuildRequires: python3-sure
|
|
|
6205f6e |
BuildRequires: python3-nose
|
|
|
6205f6e |
BuildRequires: python3-coverage
|
|
|
6205f6e |
BuildRequires: python3-mock
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
d0ec6e2 |
%description
|
|
|
d0ec6e2 |
freezegun is a library that allows your python tests to travel through time by
|
|
|
d0ec6e2 |
mocking the datetime module.
|
|
|
d0ec6e2 |
|
|
|
d0ec6e2 |
|
|
|
d0ec6e2 |
%package -n python2-freezegun
|
|
|
d0ec6e2 |
Summary: %{sum}
|
|
|
d0ec6e2 |
Group: Development/Libraries
|
|
|
d0ec6e2 |
%{?python_provide:%python_provide python2-freezegun}
|
|
|
d0ec6e2 |
|
|
|
d0ec6e2 |
# EL packages don't provide python2-foo
|
|
|
849704c |
Requires: python-six
|
|
|
849704c |
Requires: python-dateutil
|
|
|
849704c |
|
|
|
d0ec6e2 |
%description -n python2-freezegun
|
|
|
d0ec6e2 |
freezegun is a library that allows your python tests to travel through time by
|
|
|
d0ec6e2 |
mocking the datetime module. This is the Python 2 library.
|
|
|
d0ec6e2 |
|
|
|
849704c |
|
|
|
849704c |
%if 0%{?with_python3}
|
|
|
849704c |
%package -n python3-freezegun
|
|
|
d0ec6e2 |
Summary: %{sum}
|
|
|
849704c |
Group: Development/Libraries
|
|
|
d0ec6e2 |
%{?python_provide:%python_provide python3-freezegun}
|
|
|
849704c |
|
|
|
849704c |
Requires: python3-six
|
|
|
849704c |
Requires: python3-dateutil
|
|
|
849704c |
|
|
|
849704c |
%description -n python3-freezegun
|
|
|
d0ec6e2 |
freezegun is a library that allows your python tests to travel through time by
|
|
|
d0ec6e2 |
mocking the datetime module. This is the Python 3 library.
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
849704c |
%prep
|
|
|
849704c |
%setup -q -n %{modname}-%{version}
|
|
|
849704c |
|
|
|
849704c |
# Remove bundled egg-info in case it exists
|
|
|
849704c |
rm -rf %{modname}.egg-info
|
|
|
849704c |
%if 0%{?with_python3}
|
|
|
849704c |
rm -rf %{py3dir}
|
|
|
849704c |
cp -a . %{py3dir}
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
849704c |
%build
|
|
|
849704c |
%{__python2} setup.py build
|
|
|
849704c |
%if 0%{?with_python3}
|
|
|
849704c |
pushd %{py3dir}
|
|
|
849704c |
%{__python3} setup.py build
|
|
|
849704c |
popd
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
849704c |
%install
|
|
|
849704c |
%if 0%{?with_python3}
|
|
|
849704c |
pushd %{py3dir}
|
|
|
849704c |
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
|
849704c |
popd
|
|
|
849704c |
%endif
|
|
|
849704c |
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
|
849704c |
|
|
|
849704c |
%check
|
|
|
6205f6e |
%if %with python3
|
|
|
849704c |
pushd %{py3dir}
|
|
|
6205f6e |
nosetests-%{python3_version} tests/
|
|
|
849704c |
popd
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
6205f6e |
nosetests-%{python2_version} tests/
|
|
|
6205f6e |
|
|
|
2118acc |
%files -n python2-freezegun
|
|
|
849704c |
%doc README.rst LICENSE
|
|
|
849704c |
%{python2_sitelib}/%{modname}/
|
|
|
849704c |
%{python2_sitelib}/%{modname}-%{version}*
|
|
|
849704c |
|
|
|
849704c |
%if 0%{?with_python3}
|
|
|
849704c |
%files -n python3-freezegun
|
|
|
849704c |
%doc README.rst LICENSE
|
|
|
849704c |
%{python3_sitelib}/%{modname}/
|
|
|
849704c |
%{python3_sitelib}/%{modname}-%{version}-*
|
|
|
849704c |
%endif
|
|
|
849704c |
|
|
|
849704c |
%changelog
|
|
|
431f7f8 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-6
|
|
|
431f7f8 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
431f7f8 |
|
|
|
690cfd6 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-5
|
|
|
690cfd6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
690cfd6 |
|
|
|
2118acc |
* Wed Dec 28 2016 Adam Williamson <awilliam@redhat.com> - 0.3.8-4
|
|
|
2118acc |
- REALLY rename Python 2 package to python2-freezegun
|
|
|
2118acc |
|
|
|
d0ec6e2 |
* Wed Dec 21 2016 Adam Williamson <awilliam@redhat.com> - 0.3.8-3
|
|
|
d0ec6e2 |
- Rebuild with Python 3.6 again (now python-sure is built)
|
|
|
d0ec6e2 |
- rename Python 2 package to python2-freezegun
|
|
|
d0ec6e2 |
|
|
|
54b7eec |
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.3.8-2
|
|
|
54b7eec |
- Rebuild for Python 3.6
|
|
|
54b7eec |
|
|
|
f378ea5 |
* Tue Nov 08 2016 Ralph Bean <rbean@redhat.com> - 0.3.8-1
|
|
|
f378ea5 |
- new version
|
|
|
f378ea5 |
|
|
|
c99b402 |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
|
|
|
c99b402 |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
c99b402 |
|
|
|
6091d11 |
* Wed Apr 20 2016 Kevin Fenzi <kevin@scrye.com> - 0.3.6-1
|
|
|
6091d11 |
- Update to 0.3.6. Fixes bug #1328934
|
|
|
6091d11 |
|
|
|
a3389d6 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-4
|
|
|
a3389d6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
a3389d6 |
|
|
Robert Kuska |
5208999 |
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 0.3.2-3
|
|
Robert Kuska |
5208999 |
- Rebuilt for Python3.5 rebuild
|
|
Robert Kuska |
5208999 |
|
|
|
e0772be |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-2
|
|
|
e0772be |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
e0772be |
|
|
|
d51ef70 |
* Thu Apr 16 2015 Adam Williamson <awilliam@redhat.com> - 0.3.2-1
|
|
|
d51ef70 |
- latest upstream release
|
|
|
d51ef70 |
|
|
|
6205f6e |
* Thu Jan 22 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.12-4
|
|
|
6205f6e |
- Adjust tests to actually do something
|
|
|
6205f6e |
|
|
|
f35de12 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.12-3
|
|
|
f35de12 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
f35de12 |
|
|
|
30a911c |
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.1.12-2
|
|
|
30a911c |
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
30a911c |
|
|
|
849704c |
* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 0.1.12-1
|
|
|
849704c |
- initial package for Fedora
|