debian/0000775000000000000000000000000011745760135007201 5ustar debian/compat0000664000000000000000000000000211733217456010377 0ustar 8 debian/python3-dateutil.docs0000664000000000000000000000001411733332730013254 0ustar README NEWS debian/control0000664000000000000000000000304411743323056010600 0ustar Source: python3-dateutil Section: python Priority: optional Maintainer: Debian Python Modules Team Uploaders: Thomas Kluyver Build-Depends: debhelper (>= 8), python3-all, python3-setuptools X-Python3-Version: >= 3.0 Standards-Version: 3.9.3 Homepage: http://labix.org/python-dateutil Vcs-Svn: svn://svn.debian.org/python-modules/packages/python3-dateutil/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python3-dateutil/trunk/ Package: python3-dateutil Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, tzdata Description: powerful extensions to the standard datetime module in Python 3 The dateutil package extends the standard datetime module with: . * computing of relative deltas (next month, next year, next Monday, last week of month, etc); * computing of relative deltas between two given date and/or datetime objects * computing of dates based on very flexible recurrence rules, using a superset of the iCalendar specification. Parsing of RFC strings is supported as well. * generic parsing of dates in almost any string format * timezone (tzinfo) implementations for tzfile(5) format files (/etc/localtime, /usr/share/zoneinfo, etc), TZ environment string (in all known formats), iCalendar format files, given ranges (with help from relative deltas), local machine timezone, fixed offset timezone, UTC timezone * computing of Easter Sunday dates for any given year, using Western, Orthodox or Julian algorithms debian/patches/0000775000000000000000000000000011745760135010630 5ustar debian/patches/zoneinfo-tests-to-tz.patch0000664000000000000000000000236311736372617015723 0ustar Date: Mon Apr 2 19:48:46 BST 2012 Author: Thomas Kluyver Subject: Fix Zoneinfo tests The zoneinfo module depends on binary data which is removed from the source package. tz.gettz() should behave in the same way. --- a/test.py +++ b/test.py @@ -3887,18 +3887,18 @@ self.assertEqual(datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname(), "EST") def testZoneInfoFileStart1(self): - tz = zoneinfo.gettz("EST5EDT") + tz = gettz("EST5EDT") self.assertEqual(datetime(2003, 4, 6, 1, 59, tzinfo=tz).tzname(), "EST") self.assertEqual(datetime(2003, 4, 6, 2, 00, tzinfo=tz).tzname(), "EDT") def testZoneInfoFileEnd1(self): - tz = zoneinfo.gettz("EST5EDT") + tz = gettz("EST5EDT") self.assertEqual(datetime(2003, 10, 26, 0, 59, tzinfo=tz).tzname(), "EDT") self.assertEqual(datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname(), "EST") def testZoneInfoOffsetSignal(self): - utc = zoneinfo.gettz("UTC") - nyc = zoneinfo.gettz("America/New_York") + utc = gettz("UTC") + nyc = gettz("America/New_York") self.assertFalse(any([None in [utc, nyc]])) t0 = datetime(2007, 11, 4, 0, 30, tzinfo=nyc) t1 = t0.astimezone(utc) debian/patches/read-tz.patch0000664000000000000000000000142411734647311013216 0ustar Date: Sun Mar 25 19:26:47 BST 2012 Author: Thomas Kluyver Subject: Fix reading binary tzinfo files. Fix already made upstream. --- a/dateutil/tz.py +++ b/dateutil/tz.py @@ -196,7 +196,7 @@ def __init__(self, fileobj): if isinstance(fileobj, str): self._filename = fileobj - fileobj = open(fileobj) + fileobj = open(fileobj, "rb") elif hasattr(fileobj, "name"): self._filename = fileobj.name else: @@ -212,7 +212,7 @@ # ``standard'' byte order (the high-order byte # of the value is written first). - if fileobj.read(4).decode() != "TZif": + if fileobj.read(4) != b"TZif": raise ValueError("magic not found") fileobj.read(16) debian/patches/series0000664000000000000000000000016111736372617012047 0ustar Use-C-locale-when-calling-date.patch update-readme.patch test-3.2.patch read-tz.patch zoneinfo-tests-to-tz.patch debian/patches/test-3.2.patch0000664000000000000000000000077011734647311013132 0ustar Date: Sat Mar 24 12:24:03 GMT 2012 Author: Thomas Kluyver Subject: Fix tests for Python 3.2 Forwarded upstream --- a/test.py +++ b/test.py @@ -11,7 +11,10 @@ if os.path.exists("build"): from distutils.util import get_platform import sys - s = "build/lib.%s-%.3s" % (get_platform(), sys.version) + if sys.version_info >= (3, 2): + s = "build/lib" + else: + s = "build/lib.%s-%.3s" % (get_platform(), sys.version) s = os.path.join(os.getcwd(), s) sys.path.insert(0, s) debian/patches/update-readme.patch0000664000000000000000000000237611733335063014371 0ustar Date: Sat Mar 24 12:10:29 GMT 2012 Author: Thomas Kluyver Subject: Update README for Python 3 Will forward upstream --- a/README +++ b/README @@ -52,16 +52,16 @@ from dateutil.rrule import * from dateutil.parser import * from datetime import * -import commands +import subprocess import os -now = parse(commands.getoutput("date")) +now = parse(subprocess.getoutput("date")) today = now.date() year = rrule(YEARLY,bymonth=8,bymonthday=13,byweekday=FR)[0].year rdelta = relativedelta(easter(year), today) -print "Today is:", today -print "Year with next Aug 13th on a Friday is:", year -print "How far is the Easter of that year:", rdelta -print "And the Easter of that year is:", today+rdelta +print("Today is:", today) +print("Year with next Aug 13th on a Friday is:", year) +print("How far is the Easter of that year:", rdelta) +print("And the Easter of that year is:", today+rdelta) }}} And here's the output: @@ -76,8 +76,7 @@ == Download == The following files are available. - * attachment:python-dateutil-1.0.tar.bz2 - * attachment:python-dateutil-1.0-1.noarch.rpm + * http://labix.org/download/python-dateutil/python-dateutil-2.0.tar.gz == Author == The dateutil module was written by GustavoNiemeyer . debian/patches/Use-C-locale-when-calling-date.patch0000664000000000000000000000074611733217456017312 0ustar Date: Fri, 23 Mar 2012 23:56:00 +0000 Subject: Use C locale when calling date. Copied from python-dateutil package (Python 2 equivalent) Forwarded: no --- a/example.py +++ b/example.py @@ -5,7 +5,7 @@ from datetime import * import subprocess import os -now = parse(subprocess.getoutput("date")) +now = parse(subprocess.getoutput("LC_ALL=C date")) today = now.date() year = rrule(YEARLY, bymonth=8, bymonthday=13, byweekday=FR)[0].year rdelta = relativedelta(easter(year), today) debian/copyright0000664000000000000000000000346511745756677011164 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: python3-dateutil Source: Files: * Copyright: (c) 2003-2011 - Gustavo Niemeyer License: BSD-3-Clause Files: debian/* Copyright: 2012 Thomas Kluyver License: BSD-3-Clause License: BSD-3-Clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/watch0000664000000000000000000000031511737136077010234 0ustar # Compulsory line, this is a version 3 file version=3 # Scrape homepage opts=dversionmangle=s/[-.+]?dfsg(.*)$//i \ http://labix.org/python-dateutil (?:.*/)?python-dateutil[-_]([\d+.]+)\.(?:tar.*|tgz|zip) debian/python3-dateutil.examples0000664000000000000000000000001311733332730014141 0ustar example.py debian/changelog0000664000000000000000000000073511745760114011055 0ustar python3-dateutil (2.0+dfsg1-1) unstable; urgency=low * Initial release (Closes: #665415) * Copy patch to use C locale in example from python-dateutil * Patch for running tests on Python >= 3.2 * Patch updating readme * Patch fixing bug with reading binary timezone files * Repackage source without binary parts * Update tests that depend on the missing binary parts to call alternative -- Thomas Kluyver Wed, 25 Apr 2012 11:43:49 +0100 debian/README.Debian0000664000000000000000000000054011734701005011226 0ustar python3-dateutil for Debian --------------------------- dateutil.zoneinfo.gettz() expects to find a local tarball containing the timezone data files, but this has been removed for the Debian package. Code using it should instead call dateutil.tz.gettz(), which uses the system timezone data from the tzdata package (a dependency of python3-dateutil). debian/source/0000775000000000000000000000000011745760135010501 5ustar debian/source/format0000664000000000000000000000001411733217456011707 0ustar 3.0 (quilt) debian/rules0000775000000000000000000000342311741077632010262 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PY3VERS:=$(shell py3versions -r) # Grab the version before +dfsg DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST))) DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \ | sed -rne 's,^Version: ([^+]+).*,\1,p') %: dh $@ --with python3 override_dh_auto_build: set -e; \ for python in $(PY3VERS); do \ $$python setup.py build; \ done override_dh_auto_install: set -e; \ for python in $(PY3VERS); do \ $$python setup.py install --install-layout=deb \ --root=$(CURDIR)/debian//python3-dateutil; \ done # The source should now be repacked without this file. #rm -f debian/python3-dateutil/usr/lib/python3/dist-packages/dateutil/zoneinfo/zoneinfo-*.tar.gz override_dh_auto_test: ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) set -e; \ for python in $(PY3VERS); do \ $$python test.py; \ done endif override_dh_clean: dh_clean rm -rf build rm -rf dateutil/__pycache__ rm -rf dateutil/*/__pycache__ get-orig-source: uscan --noconf --force-download --rename --download-current-version \ --check-dirname-level=0 --destdir=`pwd` $(DEB_DEBIAN_DIR)/.. rm -rf python-dateutil-$(DEB_UPSTREAM_VERSION) tar -xf python3-dateutil_$(DEB_UPSTREAM_VERSION).orig.tar.gz rm python3-dateutil_$(DEB_UPSTREAM_VERSION).orig.tar.gz rm python-dateutil-$(DEB_UPSTREAM_VERSION)/dateutil/zoneinfo/zoneinfo-*.tar.gz mv python-dateutil-$(DEB_UPSTREAM_VERSION) python3-dateutil-$(DEB_UPSTREAM_VERSION).orig GZIP=--best tar -cz --owner root --group root --mode a+rX \ -f python3-dateutil_$(DEB_UPSTREAM_VERSION)+dfsg1.orig.tar.gz \ python3-dateutil-$(DEB_UPSTREAM_VERSION).orig rm -r python3-dateutil-$(DEB_UPSTREAM_VERSION).orig