Blame SPECS/python-isodate.spec

050981
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
050981
%{!?python2_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
050981
%endif
050981
050981
%global modulename isodate
050981
%global with_python3 0
050981
050981
Name:           python-%{modulename}
050981
Version:        0.5.4
050981
Release:        8%{?dist}
050981
Summary:        An ISO 8601 date/time/duration parser and formatter
050981
Group:          Development/Languages
050981
License:        BSD
050981
URL:            http://pypi.python.org/pypi/%{modulename}
050981
Source0:        %{modulename}-%{version}.tar.gz
050981
BuildArch:      noarch
050981
BuildRequires:  python-devel
050981
BuildRequires:  python-setuptools
050981
050981
%if 0%{?with_python3}
050981
BuildRequires:  python3-devel
050981
BuildRequires:  python3-setuptools
050981
%endif # if with_python3
050981
050981
%description
050981
This module implements ISO 8601 date, time and duration parsing. The
050981
implementation follows ISO8601:2004 standard, and implements only date/time
050981
representations mentioned in the standard. If something is not mentioned there,
050981
then it is treated as non existent, and not as an allowed option.
050981
050981
For instance, ISO8601:2004 never mentions 2 digit years. So, it is not intended
050981
by this module to support 2 digit years. (while it may still be valid as ISO
050981
date, because it is not explicitly forbidden.) Another example is, when no time
050981
zone information is given for a time, then it should be interpreted as local
050981
time, and not UTC.
050981
050981
As this module maps ISO 8601 dates/times to standard Python data types, like
050981
date, time, datetime and timedelta, it is not possible to convert all possible
050981
ISO 8601 dates/times. For instance, dates before 0001-01-01 are not allowed by
050981
the Python date and datetime classes. Additionally fractional seconds are
050981
limited to microseconds. That means if the parser finds for instance
050981
nanoseconds it will round it to microseconds.
050981
050981
%if 0%{?with_python3}
050981
%package -n python3-%{modulename}
050981
Summary:        An ISO 8601 date/time/duration parser and formatter
050981
Group:          Development/Languages
050981
050981
%description -n python3-%{modulename}
050981
This module implements ISO 8601 date, time and duration parsing. The
050981
implementation follows ISO8601:2004 standard, and implements only date/time
050981
representations mentioned in the standard. If something is not mentioned there,
050981
then it is treated as non existent, and not as an allowed option.
050981
050981
For instance, ISO8601:2004 never mentions 2 digit years. So, it is not intended
050981
by this module to support 2 digit years. (while it may still be valid as ISO
050981
date, because it is not explicitly forbidden.) Another example is, when no time
050981
zone information is given for a time, then it should be interpreted as local
050981
time, and not UTC.
050981
050981
As this module maps ISO 8601 dates/times to standard Python data types, like
050981
date, time, datetime and timedelta, it is not possible to convert all possible
050981
ISO 8601 dates/times. For instance, dates before 0001-01-01 are not allowed by
050981
the Python date and datetime classes. Additionally fractional seconds are
050981
limited to microseconds. That means if the parser finds for instance
050981
nanoseconds it will round it to microseconds.
050981
%endif
050981
050981
%prep
050981
%setup -qn %{modulename}-%{version}
050981
050981
%if 0%{?with_python3}
050981
rm -rf %{py3dir}
050981
cp -a . %{py3dir}
050981
%endif
050981
050981
%build
050981
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
050981
%{__python2} setup.py build
050981
%else
050981
CFLAGS="%{optflags}" %{__python2} -c 'import setuptools; execfile("setup.py")' build
050981
%endif
050981
050981
%if 0%{?with_python3}
050981
pushd %{py3dir}
050981
%{__python3} setup.py build
050981
popd
050981
%endif
050981
050981
%install
050981
rm -rf %{buildroot}
050981
050981
%if 0%{?with_python3}
050981
pushd %{py3dir}
050981
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
050981
popd
050981
%endif
050981
050981
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
050981
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
050981
%else
050981
%{__python2} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
050981
%endif
050981
050981
%clean
050981
rm -rf %{buildroot}
050981
050981
%check
050981
%{__python2} setup.py test
050981
050981
%if 0%{?with_python3}
050981
pushd %{py3dir}
050981
%{__python3} setup.py test
050981
popd
050981
%endif
050981
050981
050981
%files
050981
%defattr(-,root,root,-)
050981
%doc CHANGES.txt README.rst TODO.txt
050981
%{python2_sitelib}/%{modulename}*.egg-info
050981
%{python2_sitelib}/%{modulename}
050981
050981
%if 0%{?with_python3}
050981
%files -n python3-%{modulename}
050981
%doc CHANGES.txt README.rst TODO.txt
050981
%{python3_sitelib}/%{modulename}-*.egg-info
050981
%{python3_sitelib}/%{modulename}
050981
%endif 
050981
050981
%changelog
050981
* Tue Dec  5 2017 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.5.4-8
050981
- Initial build for RHEL7
050981
050981
  Resolves: rhbz#1511223
050981
050981
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.4-6
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
050981
050981
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.4-5
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
050981
050981
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.5.4-4
050981
- Rebuild for Python 3.6
050981
050981
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.4-3
050981
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
050981
050981
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.4-2
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
050981
050981
* Thu Nov 19 2015 John Matthews <jwmatthews@gmail.com> - 0.5.4-1
050981
- Update to 0.5.4
050981
050981
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 0.5.0-5
050981
- Rebuilt for Python3.5 rebuild
050981
050981
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
050981
050981
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
050981
050981
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.5.0-2
050981
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
050981
050981
* Fri Apr 18 2014 Dan Scott <dan@coffeecode.net> - 0.5.0-1
050981
- Update to 0.5.0
050981
- Add a Python3 build
050981
- Run unit tests
050981
- Remove python-setuptools-devel BR per https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel
050981
050981
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-4
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
050981
050981
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-3
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
050981
050981
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-2
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
050981
050981
* Thu Jan 26 2012 James Laska <jlaska@redhat.com> - 0.4.7-1
050981
- Update to 0.4.7
050981
050981
* Mon Jan 23 2012 James Laska <jlaska@redhat.com> - 0.4.6-1
050981
- Update to 0.4.6
050981
050981
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-2
050981
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
050981
050981
* Wed Sep 28 2011 James Laska <jlaska@redhat.com> - 0.4.4-1
050981
- Initial package build