From db6c825205ce0ba4dfa47f3dabd5dbf5cf56235d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 16 2018 17:25:44 +0000 Subject: import python-isodate-0.5.0-5.pulp.el7sat --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46c6b3e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/isodate-0.5.0.tar.gz diff --git a/.python-isodate.metadata b/.python-isodate.metadata new file mode 100644 index 0000000..59d0e37 --- /dev/null +++ b/.python-isodate.metadata @@ -0,0 +1 @@ +2862897f4feea24cfd4f9aaddfbe161b423df02f SOURCES/isodate-0.5.0.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/isodate-duration.patch b/SOURCES/isodate-duration.patch new file mode 100644 index 0000000..5e2698b --- /dev/null +++ b/SOURCES/isodate-duration.patch @@ -0,0 +1,12 @@ +--- a/src/isodate/duration.py ++++ b/src/isodate/duration.py +@@ -105,6 +105,9 @@ class Duration(object): + ''' + Provide direct access to attributes of included timedelta instance. + ''' ++ # Guard against infinite recursion ++ if name == 'tdelta': ++ raise AttributeError() + return getattr(self.tdelta, name) + + def __str__(self): diff --git a/SPECS/python-isodate.spec b/SPECS/python-isodate.spec new file mode 100644 index 0000000..b6e91b0 --- /dev/null +++ b/SPECS/python-isodate.spec @@ -0,0 +1,97 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%define pkgname isodate + +Name: python-%{pkgname} +Version: 0.5.0 +Release: 5.pulp%{?dist} +Summary: An ISO 8601 date/time/duration parser and formater +Group: Development/Libraries + +License: BSD + +URL: http://cheeseshop.python.org/pypi/isodate +Source0: https://github.com/gweis/%{pkgname}/archive/%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz +Patch0: %{pkgname}-duration.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: python-setuptools +BuildArch: noarch + +%description +This module implements ISO 8601 date, time and duration parsing. +The implementation follows ISO8601:2004 standard, and implements only +date/time representations mentioned in the standard. If something is not +mentioned there, then it is treated as non existent, and not as an allowed +option. + +For instance, ISO8601:2004 never mentions 2 digit years. So, it is not +intended by this module to support 2 digit years. (while it may still +be valid as ISO date, because it is not explicitly forbidden.) +Another example is, when no time zone information is given for a time, +then it should be interpreted as local time, and not UTC. + +As this module maps ISO 8601 dates/times to standard Python data types, like +*date*, *time*, *datetime* and *timedelta*, it is not possible to convert +all possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are +not allowed by the Python *date* and *datetime* classes. Additionally +fractional seconds are limited to microseconds. That means if the parser finds +for instance nanoseconds it will round it to microseconds. + +%prep +%setup -q -n %{pkgname}-%{version} +%patch0 -p1 + +%build +%{__python} setup.py build + +%check + +%install +%{__rm} -rf %{buildroot} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc CHANGES.txt README.rst TODO.txt +%{python_sitelib}/* + +%changelog +* Mon Aug 11 2014 Jeremy Cline 0.5.0-4.pulp +- Updated the docs in the spec file to reflect the new README name + (jcline@redhat.com) + +* Mon Aug 11 2014 Jeremy Cline 0.5.0-3.pulp +- ISO8601Error are subclasses of ValueError now +- improve compatibility across various python variants and versions +- raise exceptions when using fractional years and months in date + maths with durations +- renamed method todatetime on Duration objects to totimedelta + +* Wed Nov 21 2012 Michael Hrivnak 0.5.0-1.pulp +- Adding new isodate source. (mhrivnak@redhat.com) + +* Fri Jun 15 2012 Jeff Ortel 0.4.4-5.pulp +- Renamed dependency RPMs (jason.dobies@redhat.com) + +* Fri Dec 09 2011 James Slagle 0.4.4-4.pulp +- Bump so we can rebuild in brew. + +* Mon Nov 28 2011 John Matthews 0.4.4-3.pulp +- incremented build and added pulp (jconnor@redhat.com) + +* Fri Jun 03 2011 John Matthews 0.4.4-2 +- Getting python-isodate built in brew (jmatthew@redhat.com) + +* Tue May 10 2011 Jay Dobies 0.4.4-1 +- Messed up the version number (jason.dobies@redhat.com) + +* Tue May 10 2011 Jay Dobies 0.4.6-1 +- Fixed source entry for tito compatibility (jason.dobies@redhat.com) + +* Tue May 10 2011 Jay Dobies 0.4.5-1 +- new package built with tito + +* Tue Apr 26 2011 Jason L Connor 0.4.4-1 +- Initial rpm spin