summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2011-08-29 00:37:47 +0000
committerMike Gilbert <floppym@gentoo.org>2011-08-29 00:37:47 +0000
commita6ddb735f7a1e033693de5f43530688a430d83e3 (patch)
treed54c8beac1ef46aba5dddc61288122e5a4a9b8d2 /dev-python/transmissionrpc
parentNew ebuild for bug 350015; thanks to Leszek Ciesielski for testing (diff)
downloadhistorical-a6ddb735f7a1e033693de5f43530688a430d83e3.tar.gz
historical-a6ddb735f7a1e033693de5f43530688a430d83e3.tar.bz2
historical-a6ddb735f7a1e033693de5f43530688a430d83e3.zip
New package for bug 377565
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64
Diffstat (limited to 'dev-python/transmissionrpc')
-rw-r--r--dev-python/transmissionrpc/ChangeLog12
-rw-r--r--dev-python/transmissionrpc/Manifest16
-rw-r--r--dev-python/transmissionrpc/files/transmissionrpc-timestamp-test.patch55
-rw-r--r--dev-python/transmissionrpc/metadata.xml9
-rw-r--r--dev-python/transmissionrpc/transmissionrpc-0.7.ebuild34
-rw-r--r--dev-python/transmissionrpc/transmissionrpc-9999.ebuild25
6 files changed, 151 insertions, 0 deletions
diff --git a/dev-python/transmissionrpc/ChangeLog b/dev-python/transmissionrpc/ChangeLog
new file mode 100644
index 000000000000..16f8a1fbad7f
--- /dev/null
+++ b/dev-python/transmissionrpc/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-python/transmissionrpc
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/transmissionrpc/ChangeLog,v 1.1 2011/08/29 00:37:47 floppym Exp $
+
+*transmissionrpc-9999 (29 Aug 2011)
+*transmissionrpc-0.7 (29 Aug 2011)
+
+ 29 Aug 2011; Mike Gilbert <floppym@gentoo.org> +transmissionrpc-0.7.ebuild,
+ +transmissionrpc-9999.ebuild, +files/transmissionrpc-timestamp-test.patch,
+ +metadata.xml:
+ New package for bug 377565
+
diff --git a/dev-python/transmissionrpc/Manifest b/dev-python/transmissionrpc/Manifest
new file mode 100644
index 000000000000..57c8a69aaaeb
--- /dev/null
+++ b/dev-python/transmissionrpc/Manifest
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX transmissionrpc-timestamp-test.patch 1824 RMD160 1c0efe775a3eb0ecfc4a7e5733535ef2943395ac SHA1 d4ba0622ebf7c3e095f339563ba64bfba5029daa SHA256 e72cdc72721a1fb02111f8f782a6ab9c8e726523012fccfd5aef603584d74849
+DIST transmissionrpc-0.7.tar.bz2 31325 RMD160 71eabb4b0c7aec44defb5e60f791413d1c8cb14e SHA1 44adef256531e604b09026cf4b5c968ce2fafec2 SHA256 209147131ceee3185486a73f3a7c919c136ed4102ee99ca04dd184164864dbfc
+EBUILD transmissionrpc-0.7.ebuild 865 RMD160 0a2113126833c82bb346aa5fc44fed963d298940 SHA1 e881df7ff2d09f9b461ccafc5e01eb199e01aa17 SHA256 ce598ba652891b6d397c15f5ba13a6c875b506ca16a49a204ac1919a86b4cc91
+EBUILD transmissionrpc-9999.ebuild 684 RMD160 66a970149a4c945eb86934e5f7c59a39eedeef40 SHA1 0b34f6a9c7fe423525b010e505f784d9759a2103 SHA256 9aa998515122bf4cd1099ed8d0280309ee4c637441975bb8dba6dc43c3c4f187
+MISC ChangeLog 500 RMD160 f4eaf5a9cdf0f9382c69b481cdd1451e7dafc4a2 SHA1 699882119ca9289cd0288359e74562cb14dfa25f SHA256 faa8dc6c39d4d73d303d44c0a23f462d0d764c1c17e5bd1906d3ecf1dd2a7654
+MISC metadata.xml 254 RMD160 bd5255fc2a069c8438734caa510c4bee95d2e9fe SHA1 d71e9ba743fb7091f3b441ade212655d4ff2025f SHA256 36988bec4da19bfd10dcd5d81768247e87bf765a78a0bdfe830fea9b5aa115fe
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iF4EAREIAAYFAk5a32QACgkQC77qH+pIQ6TtTgD+JCMQPN8fWNfA1GDEh0WRW4QD
+hXhsoLW+ijB0OP3m6JQA/2g55huKhfAuF8spgGRZUtUAW+XqFa9tA/yL+eM4Xlsx
+=WVvG
+-----END PGP SIGNATURE-----
diff --git a/dev-python/transmissionrpc/files/transmissionrpc-timestamp-test.patch b/dev-python/transmissionrpc/files/transmissionrpc-timestamp-test.patch
new file mode 100644
index 000000000000..3f7384b3a301
--- /dev/null
+++ b/dev-python/transmissionrpc/files/transmissionrpc-timestamp-test.patch
@@ -0,0 +1,55 @@
+# HG changeset patch
+# User Mike Gilbert <floppymaster@gmail.com>
+# Date 1312249052 14400
+# Node ID 144110dc47fae14f2692afa1be1e57d461b7393e
+# Parent 4fe71eb818d0a220b8fe6370fa00c997e7f12e4b
+Use UTC for utils.format_timestamp unit test.
+
+This removes dependence on the local time zone when running tests.
+
+diff --git a/test/utils.py b/test/utils.py
+--- a/test/utils.py
++++ b/test/utils.py
+@@ -55,11 +55,11 @@
+ def testFormatTimestamp(self):
+ table = {
+ 0: '-',
+- 1: '1970-01-01 01:00:01',
+- 1129135532: '2005-10-12 18:45:32',
++ 1: '1970-01-01 00:00:01',
++ 1129135532: '2005-10-12 16:45:32',
+ }
+ for timestamp, expected in table.iteritems():
+- self.assertEqual(tu.format_timestamp(timestamp), expected)
++ self.assertEqual(tu.format_timestamp(timestamp, utc=True), expected)
+
+ def testInetAddress(self):
+ table = {
+@@ -97,4 +97,4 @@
+ return suite
+
+ if __name__ == '__main__':
+- unittest.main()
+\ No newline at end of file
++ unittest.main()
+diff --git a/transmissionrpc/utils.py b/transmissionrpc/utils.py
+--- a/transmissionrpc/utils.py
++++ b/transmissionrpc/utils.py
+@@ -34,12 +34,15 @@
+ hours, minutes = divmod(minutes, 60)
+ return '%d %02d:%02d:%02d' % (delta.days, hours, minutes, seconds)
+
+-def format_timestamp(timestamp):
++def format_timestamp(timestamp, utc=False):
+ """
+ Format unix timestamp into ISO date format.
+ """
+ if timestamp > 0:
+- dt_timestamp = datetime.datetime.fromtimestamp(timestamp)
++ if utc:
++ dt_timestamp = datetime.datetime.utcfromtimestamp(timestamp)
++ else:
++ dt_timestamp = datetime.datetime.fromtimestamp(timestamp)
+ return dt_timestamp.isoformat(' ')
+ else:
+ return '-'
diff --git a/dev-python/transmissionrpc/metadata.xml b/dev-python/transmissionrpc/metadata.xml
new file mode 100644
index 000000000000..e6093f985285
--- /dev/null
+++ b/dev-python/transmissionrpc/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-python/transmissionrpc/transmissionrpc-0.7.ebuild b/dev-python/transmissionrpc/transmissionrpc-0.7.ebuild
new file mode 100644
index 000000000000..b162a3932df0
--- /dev/null
+++ b/dev-python/transmissionrpc/transmissionrpc-0.7.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/transmissionrpc/transmissionrpc-0.7.ebuild,v 1.1 2011/08/29 00:37:47 floppym Exp $
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS=1
+RESTRICT_PYTHON_ABIS="2.[45] 3.*"
+DISTUTILS_SRC_TEST="setup.py"
+
+inherit distutils eutils
+
+DESCRIPTION="Python module that implements the Transmission bittorrent client RPC protocol"
+HOMEPAGE="https://bitbucket.org/blueluna/transmissionrpc"
+SRC_URI="https://bitbucket.org/blueluna/${PN}/get/release-${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="dev-python/setuptools"
+RDEPEND=""
+
+src_unpack() {
+ default
+ mv blueluna-${PN}-* "${S}" || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-timestamp-test.patch"
+ distutils_src_prepare
+}
diff --git a/dev-python/transmissionrpc/transmissionrpc-9999.ebuild b/dev-python/transmissionrpc/transmissionrpc-9999.ebuild
new file mode 100644
index 000000000000..78cbea2c8487
--- /dev/null
+++ b/dev-python/transmissionrpc/transmissionrpc-9999.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/transmissionrpc/transmissionrpc-9999.ebuild,v 1.1 2011/08/29 00:37:47 floppym Exp $
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS=1
+RESTRICT_PYTHON_ABIS="2.[45] 3.*"
+DISTUTILS_SRC_TEST="setup.py"
+
+inherit distutils mercurial
+
+DESCRIPTION="Python module that implements the Transmission bittorrent client RPC protocol"
+HOMEPAGE="https://bitbucket.org/blueluna/transmissionrpc"
+SRC_URI=""
+EHG_REPO_URI="https://bitbucket.org/blueluna/${PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="dev-python/setuptools"
+RDEPEND=""