commit: 02263c3bdc6c6fae9e267def03aa6c74759ad816 Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> AuthorDate: Wed Dec 3 12:54:24 2014 +0000 Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> CommitDate: Wed Dec 3 12:54:24 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=02263c3b
initial commit, needed by bugwarrior --- dev-python/taskw/Manifest | 1 + ...et-the-timezone-to-UTC-when-adding-a-task.patch | 44 ++++++++++++++++++++++ dev-python/taskw/taskw-0.8.6.ebuild | 30 +++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/dev-python/taskw/Manifest b/dev-python/taskw/Manifest new file mode 100644 index 0000000..e4e4787 --- /dev/null +++ b/dev-python/taskw/Manifest @@ -0,0 +1 @@ +DIST taskw-0.8.6.tar.gz 37293 SHA256 341a165a1c2ef94fb1c2a49a785357377f04a0d55cabe9563179849497e47146 SHA512 0969eb4b2c4fb664a8568b373081b822f889c887a51609987bb88a25c1febc8cca9f32210b7825751fe024cb57642d697af332803e83d8952c75034b7e80b91e WHIRLPOOL 540a77473aa8a2f05eebe0f6025c46e4fa550634933fa7f8a2dc72fe316ead6c747a36c90a0a0beffdcfd740560b8b5e545f42983b2a07f52ad785682aa2e723 diff --git a/dev-python/taskw/files/0.8.6-test-set-the-timezone-to-UTC-when-adding-a-task.patch b/dev-python/taskw/files/0.8.6-test-set-the-timezone-to-UTC-when-adding-a-task.patch new file mode 100644 index 0000000..12ece25 --- /dev/null +++ b/dev-python/taskw/files/0.8.6-test-set-the-timezone-to-UTC-when-adding-a-task.patch @@ -0,0 +1,44 @@ +From 9323d6755cebcbde36c0d8fbe10847bce1329f9d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <[email protected]> +Date: Tue, 2 Dec 2014 17:29:02 +0100 +Subject: [PATCH] test: set the timezone to UTC when adding a task + +This fixes issue #75 where the date set was interpreted in localtime but +the date returned was in UTC, making the assertion fail. +--- + taskw/test/test_datas.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/taskw/test/test_datas.py b/taskw/test/test_datas.py +index 22c276a..b2ede4c 100644 +--- a/taskw/test/test_datas.py ++++ b/taskw/test/test_datas.py +@@ -5,6 +5,7 @@ import sys + import shutil + import tempfile + import datetime ++import dateutil.tz + + from taskw import TaskWarriorDirect, TaskWarriorShellout + +@@ -183,7 +184,7 @@ class _BaseTestDB(object): + "foobar", + uuid="1234-1234", + project="some_project", +- entry=datetime.datetime(2011, 1, 1), ++ entry=datetime.datetime(2011, 1, 1, tzinfo=dateutil.tz.tzutc()), + ) + tasks = self.tw.load_tasks() + eq_(len(tasks['pending']), 1) +@@ -205,7 +206,7 @@ class _BaseTestDB(object): + def test_add_with_uda_date(self): + self.tw.task_add( + "foobar", +- somedate=datetime.datetime(2011, 1, 1), ++ somedate=datetime.datetime(2011, 1, 1, tzinfo=dateutil.tz.tzutc()), + ) + tasks = self.tw.load_tasks() + eq_(len(tasks['pending']), 1) +-- +2.1.3 + diff --git a/dev-python/taskw/taskw-0.8.6.ebuild b/dev-python/taskw/taskw-0.8.6.ebuild new file mode 100644 index 0000000..0c57e20 --- /dev/null +++ b/dev-python/taskw/taskw-0.8.6.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_2,3_3} ) + +inherit distutils-r1 + +DESCRIPTION="Python bindings for your taskwarrior database" +HOMEPAGE="https://github.com/ralphbean/taskw" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +RDEPEND="dev-python/six[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( dev-python/unittest2[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] )" + +PATCHES=( "${FILESDIR}/${PV}-test-set-the-timezone-to-UTC-when-adding-a-task.patch" ) + +python_test() { + nosetests || die +}
