diff --git a/python-dateutil-1.5-system-zoneinfo.patch b/python-dateutil-1.5-system-zoneinfo.patch index 2f909dc..04277e0 100644 --- a/python-dateutil-1.5-system-zoneinfo.patch +++ b/python-dateutil-1.5-system-zoneinfo.patch @@ -72,32 +72,3 @@ diff -up python-dateutil-1.5/dateutil/zoneinfo/__init__.py\~ python-dateutil-1.5 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/python3-dateutil.spec b/python3-dateutil.spec index 2ab36f6..be4b021 100644 --- a/python3-dateutil.spec +++ b/python3-dateutil.spec @@ -1,41 +1,55 @@ -Name: python-dateutil -Version: 1.5 -Release: 4%{?dist} +%global tar_name python-dateutil + +Name: python3-dateutil +Version: 2.0 +Release: 1%{?dist} Summary: Powerful extensions to the standard datetime module Group: Development/Languages -License: Python +License: BSD URL: http://labix.org/python-dateutil -Source0: http://labix.org/download/%{name}/%{name}-%{version}.tar.gz -Patch0: python-dateutil-1.5-system-zoneinfo.patch +Source0: http://labix.org/download/%{tar_name}/%{tar_name}-%{version}.tar.gz +Patch0: python-dateutil-1.5-system-zoneinfo.patch BuildArch: noarch -BuildRequires: python-devel,python-setuptools +BuildRequires: python3-devel,python3-setuptools Requires: tzdata + %description The dateutil module provides powerful extensions to the standard datetime module available in Python 2.3+. %prep -%setup -q +%setup -q -n %{tar_name}-%{version} %patch0 -p1 iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new mv NEWS.new NEWS %build -%{__python} setup.py build +%{__python3} setup.py build %install -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT -%files +%check +%{__python3} ./test.py -v + +%files -n python3-dateutil %doc example.py LICENSE NEWS README -%{python_sitelib}/dateutil/ -%exclude %{python_sitelib}/dateutil/zoneinfo/zoneinfo-2010g.tar.gz -%{python_sitelib}/*.egg-info +%{python3_sitelib}/dateutil/ +%exclude %{python3_sitelib}/dateutil/zoneinfo/zoneinfo-*.tar.gz +%{python3_sitelib}/*.egg-info %changelog +* Mon Apr 9 2012 Thomas Spura - 2.0-1 +- change anything to python3 +- update to new version +- exclude ALL zoneinfo-*.tar.gz, not only one specific one +- drop patch for setup.py (excluding has the same effect) +- add check section +- license is BSD and not Python + * Sat Jan 14 2012 Fedora Release Engineering - 1.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild