|
|
db6c82 |
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
db6c82 |
%define pkgname isodate
|
|
|
db6c82 |
|
|
|
db6c82 |
Name: python-%{pkgname}
|
|
|
db6c82 |
Version: 0.5.0
|
|
|
db6c82 |
Release: 5.pulp%{?dist}
|
|
|
db6c82 |
Summary: An ISO 8601 date/time/duration parser and formater
|
|
|
db6c82 |
Group: Development/Libraries
|
|
|
db6c82 |
|
|
|
db6c82 |
License: BSD
|
|
|
db6c82 |
|
|
|
db6c82 |
URL: http://cheeseshop.python.org/pypi/isodate
|
|
|
db6c82 |
Source0: https://github.com/gweis/%{pkgname}/archive/%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz
|
|
|
db6c82 |
Patch0: %{pkgname}-duration.patch
|
|
|
db6c82 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
db6c82 |
BuildRequires: python-setuptools
|
|
|
db6c82 |
BuildArch: noarch
|
|
|
db6c82 |
|
|
|
db6c82 |
%description
|
|
|
db6c82 |
This module implements ISO 8601 date, time and duration parsing.
|
|
|
db6c82 |
The implementation follows ISO8601:2004 standard, and implements only
|
|
|
db6c82 |
date/time representations mentioned in the standard. If something is not
|
|
|
db6c82 |
mentioned there, then it is treated as non existent, and not as an allowed
|
|
|
db6c82 |
option.
|
|
|
db6c82 |
|
|
|
db6c82 |
For instance, ISO8601:2004 never mentions 2 digit years. So, it is not
|
|
|
db6c82 |
intended by this module to support 2 digit years. (while it may still
|
|
|
db6c82 |
be valid as ISO date, because it is not explicitly forbidden.)
|
|
|
db6c82 |
Another example is, when no time zone information is given for a time,
|
|
|
db6c82 |
then it should be interpreted as local time, and not UTC.
|
|
|
db6c82 |
|
|
|
db6c82 |
As this module maps ISO 8601 dates/times to standard Python data types, like
|
|
|
db6c82 |
*date*, *time*, *datetime* and *timedelta*, it is not possible to convert
|
|
|
db6c82 |
all possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are
|
|
|
db6c82 |
not allowed by the Python *date* and *datetime* classes. Additionally
|
|
|
db6c82 |
fractional seconds are limited to microseconds. That means if the parser finds
|
|
|
db6c82 |
for instance nanoseconds it will round it to microseconds.
|
|
|
db6c82 |
|
|
|
db6c82 |
%prep
|
|
|
db6c82 |
%setup -q -n %{pkgname}-%{version}
|
|
|
db6c82 |
%patch0 -p1
|
|
|
db6c82 |
|
|
|
db6c82 |
%build
|
|
|
db6c82 |
%{__python} setup.py build
|
|
|
db6c82 |
|
|
|
db6c82 |
%check
|
|
|
db6c82 |
|
|
|
db6c82 |
%install
|
|
|
db6c82 |
%{__rm} -rf %{buildroot}
|
|
|
db6c82 |
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
db6c82 |
|
|
|
db6c82 |
%clean
|
|
|
db6c82 |
%{__rm} -rf %{buildroot}
|
|
|
db6c82 |
|
|
|
db6c82 |
%files
|
|
|
db6c82 |
%defattr(-,root,root,-)
|
|
|
db6c82 |
%doc CHANGES.txt README.rst TODO.txt
|
|
|
db6c82 |
%{python_sitelib}/*
|
|
|
db6c82 |
|
|
|
db6c82 |
%changelog
|
|
|
db6c82 |
* Mon Aug 11 2014 Jeremy Cline <jcline@redhat.com> 0.5.0-4.pulp
|
|
|
db6c82 |
- Updated the docs in the spec file to reflect the new README name
|
|
|
db6c82 |
(jcline@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Mon Aug 11 2014 Jeremy Cline <jcline@redhat.com> 0.5.0-3.pulp
|
|
|
db6c82 |
- ISO8601Error are subclasses of ValueError now
|
|
|
db6c82 |
- improve compatibility across various python variants and versions
|
|
|
db6c82 |
- raise exceptions when using fractional years and months in date
|
|
|
db6c82 |
maths with durations
|
|
|
db6c82 |
- renamed method todatetime on Duration objects to totimedelta
|
|
|
db6c82 |
|
|
|
db6c82 |
* Wed Nov 21 2012 Michael Hrivnak <mhrivnak@redhat.com> 0.5.0-1.pulp
|
|
|
db6c82 |
- Adding new isodate source. (mhrivnak@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Fri Jun 15 2012 Jeff Ortel <jortel@redhat.com> 0.4.4-5.pulp
|
|
|
db6c82 |
- Renamed dependency RPMs (jason.dobies@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Fri Dec 09 2011 James Slagle <jslagle@redhat.com> 0.4.4-4.pulp
|
|
|
db6c82 |
- Bump so we can rebuild in brew.
|
|
|
db6c82 |
|
|
|
db6c82 |
* Mon Nov 28 2011 John Matthews <jmatthews@redhat.com> 0.4.4-3.pulp
|
|
|
db6c82 |
- incremented build and added pulp (jconnor@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Fri Jun 03 2011 John Matthews <jmatthew@redhat.com> 0.4.4-2
|
|
|
db6c82 |
- Getting python-isodate built in brew (jmatthew@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Tue May 10 2011 Jay Dobies <jason.dobies@redhat.com> 0.4.4-1
|
|
|
db6c82 |
- Messed up the version number (jason.dobies@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Tue May 10 2011 Jay Dobies <jason.dobies@redhat.com> 0.4.6-1
|
|
|
db6c82 |
- Fixed source entry for tito compatibility (jason.dobies@redhat.com)
|
|
|
db6c82 |
|
|
|
db6c82 |
* Tue May 10 2011 Jay Dobies <jason.dobies@redhat.com> 0.4.5-1
|
|
|
db6c82 |
- new package built with tito
|
|
|
db6c82 |
|
|
|
db6c82 |
* Tue Apr 26 2011 Jason L Connor <jconnor@redhat.com> 0.4.4-1
|
|
|
db6c82 |
- Initial rpm spin
|