diff --git a/.python-dateutil.metadata b/.python-dateutil.metadata new file mode 100644 index 0000000..4e5fac8 --- /dev/null +++ b/.python-dateutil.metadata @@ -0,0 +1 @@ +f489e1a70e415731d401422f711670288571040b SOURCES/python-dateutil-1.5.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +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/python-dateutil-1.5-system-zoneinfo.patch b/SOURCES/python-dateutil-1.5-system-zoneinfo.patch new file mode 100644 index 0000000..2f909dc --- /dev/null +++ b/SOURCES/python-dateutil-1.5-system-zoneinfo.patch @@ -0,0 +1,103 @@ +diff -up python-dateutil-1.5/dateutil/zoneinfo/__init__.py\~ python-dateutil-1.5/dateutil/zoneinfo/__init__.py +--- python-dateutil-1.5/dateutil/zoneinfo/__init__.py~ 2005-12-22 19:13:50.000000000 +0100 ++++ python-dateutil-1.5/dateutil/zoneinfo/__init__.py 2011-08-17 15:24:29.019214748 +0200 +@@ -15,6 +15,7 @@ __all__ = ["setcachesize", "gettz", "reb + + CACHE = [] + CACHESIZE = 10 ++USE_SYSTEM_ZONEINFO = True # XXX configure at build time + + class tzfile(tzfile): + def __reduce__(self): +@@ -29,7 +30,8 @@ def getzoneinfofile(): + return os.path.join(os.path.dirname(__file__), entry) + return None + +-ZONEINFOFILE = getzoneinfofile() ++ZONEINFOFILE = getzoneinfofile() if USE_SYSTEM_ZONEINFO else None ++ZONEINFODIR = (os.getenv("TZDIR") or "/usr/share/zoneinfo").rstrip(os.sep) + + del getzoneinfofile + +@@ -39,22 +40,37 @@ def setcachesize(size): + del CACHE[size:] + + def gettz(name): +- tzinfo = None +- if ZONEINFOFILE: +- for cachedname, tzinfo in CACHE: +- if cachedname == name: +- break ++ for cachedname, tzinfo in CACHE: ++ if cachedname == name: ++ return tzinfo ++ ++ name_parts = name.lstrip('/').split('/') ++ for part in name_parts: ++ if part == os.path.pardir or os.path.sep in part: ++ raise ValueError('Bad path segment: %r' % part) ++ filename = os.path.join(ZONEINFODIR, *name_parts) ++ try: ++ zonefile = open(filename, "rb") ++ except: ++ tzinfo = None ++ else: ++ tzinfo = tzfile(zonefile) ++ zonefile.close() ++ ++ if tzinfo is None and ZONEINFOFILE: ++ tf = TarFile.open(ZONEINFOFILE) ++ try: ++ zonefile = tf.extractfile(name) ++ except KeyError: ++ tzinfo = None + else: +- tf = TarFile.open(ZONEINFOFILE) +- try: +- zonefile = tf.extractfile(name) +- except KeyError: +- tzinfo = None +- else: +- tzinfo = tzfile(zonefile) +- tf.close() +- CACHE.insert(0, (name, tzinfo)) +- del CACHE[CACHESIZE:] ++ tzinfo = tzfile(zonefile) ++ tf.close() ++ ++ if tzinfo is not None: ++ CACHE.insert(0, (name, tzinfo)) ++ del CACHE[CACHESIZE:] ++ + return tzinfo + + def rebuild(filename, tag=None, format="gz"): +diff -up python-dateutil-1.5/setup.py\~ python-dateutil-1.5/setup.py +--- python-dateutil-1.5/setup.py~ 2010-01-11 10:43:22.000000000 +0100 ++++ python-dateutil-1.5/setup.py 2011-08-17 15:38:13.206304651 +0200 +@@ -15,6 +15,16 @@ TOPDIR = os.path.dirname(__file__) or ". + VERSION = re.search('__version__ = "([^"]+)"', + open(TOPDIR + "/dateutil/__init__.py").read()).group(1) + ++# XXX We would like to bind this to something like ++# --system-zoneinfo=/path/to/zoneinfo. Any way of doing this short of ++# overriding build and install commands? ++if False: ++ extra_options = dict( ++ package_data={"": ["*.tar.gz"]}, ++ ) ++else: ++ extra_options = {} ++ + + setup(name="python-dateutil", + version = VERSION, +@@ -29,7 +39,7 @@ The dateutil module provides powerful ex + datetime module, available in Python 2.3+. + """, + packages = ["dateutil", "dateutil.zoneinfo"], +- package_data={"": ["*.tar.gz"]}, + include_package_data=True, + zip_safe=False, ++ **extra_options + ) diff --git a/SPECS/python-dateutil.spec b/SPECS/python-dateutil.spec new file mode 100644 index 0000000..f0bbd3c --- /dev/null +++ b/SPECS/python-dateutil.spec @@ -0,0 +1,111 @@ +Name: python-dateutil +Version: 1.5 +Release: 6%{?dist} +Summary: Powerful extensions to the standard datetime module + +Group: Development/Languages +License: Python +URL: http://labix.org/python-dateutil +Source0: http://labix.org/download/%{name}/%{name}-%{version}.tar.gz +Patch0: python-dateutil-1.5-system-zoneinfo.patch + +BuildArch: noarch +BuildRequires: python-devel,python-setuptools +Requires: tzdata +%description +The dateutil module provides powerful extensions to the standard datetime +module available in Python 2.3+. + +%prep +%setup -q +%patch0 -p1 + +iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new +mv NEWS.new NEWS + +%build +%{__python} setup.py build + +%install +%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT + +%files +%doc example.py LICENSE NEWS README +%{python_sitelib}/dateutil/ +%exclude %{python_sitelib}/dateutil/zoneinfo/zoneinfo-2010g.tar.gz +%{python_sitelib}/*.egg-info + +%changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 1.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 1.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Sep 15 2011 Jef Spaleta - 1.5-3 +- Adjust patch to respect systemwide tzdata. Ref bug 729786 + +* Wed Sep 15 2011 Jef Spaleta - 1.5-2 +- Added a patch to respect systemwide tzdata. Ref bug 729786 + +* Wed Jul 13 2011 Rahul Sundaram - 1.5-1 +- New upstream release +- Fix UTF8 encoding correctly +- Drop buildroot, clean, defattr and use macro for Source + +* Tue Feb 08 2011 Fedora Release Engineering - 1.4.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 22 2010 David Malcolm - 1.4.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Sun Jul 26 2009 Fedora Release Engineering - 1.4.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 1.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 20 2009 Jef Spaleta - 1.4.1-2 +- small specfile fix + +* Fri Feb 20 2009 Jef Spaleta - 1.4.1-2 +- New upstream version + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 1.4-3 +- Rebuild for Python 2.6 + +* Fri Aug 29 2008 Tom "spot" Callaway - 1.4-2 +- fix license tag + +* Tue Jul 01 2008 Jef Spaleta 1.4-1 +- Latest upstream release + +* Fri Jan 04 2008 Jef Spaleta 1.2-2 +- Fix for egg-info file creation + +* Thu Jun 28 2007 Orion Poplawski 1.2-1 +- Update to 1.2 + +* Mon Dec 11 2006 Jef Spaleta 1.1-5 +- Fix python-devel BR, as per discussion in maintainers-list + +* Mon Dec 11 2006 Jef Spaleta 1.1-4 +- Release bump for rebuild against python 2.5 in devel tree + +* Wed Jul 26 2006 Orion Poplawski 1.1-3 +- Add patch to fix building on x86_64 + +* Wed Feb 15 2006 Orion Poplawski 1.1-2 +- Rebuild for gcc/glibc changes + +* Thu Dec 22 2005 Orion Poplawski 1.1-1 +- Update to 1.1 + +* Thu Jul 28 2005 Orion Poplawski 1.0-1 +- Update to 1.0 + +* Tue Jul 05 2005 Orion Poplawski 0.9-1 +- Initial Fedora Extras package