svn commit: r319405 - in head/net/py-txamqp: . files

Xin LI delphij at FreeBSD.org
Thu May 30 07:07:39 UTC 2013


Author: delphij
Date: Thu May 30 07:07:38 2013
New Revision: 319405
URL: http://svnweb.freebsd.org/changeset/ports/319405

Log:
   - Add missing type for py-txamqp codec
   - Pass maintainership to submitter.
  
  PR:		ports/179100
  Submitted by:	Chenguang Li <horus.li gmail.com>

Added:
  head/net/py-txamqp/files/
  head/net/py-txamqp/files/patch-src__txamqp__codec.py   (contents, props changed)
Modified:
  head/net/py-txamqp/Makefile

Modified: head/net/py-txamqp/Makefile
==============================================================================
--- head/net/py-txamqp/Makefile	Thu May 30 05:55:03 2013	(r319404)
+++ head/net/py-txamqp/Makefile	Thu May 30 07:07:38 2013	(r319405)
@@ -3,14 +3,14 @@
 
 PORTNAME=	txamqp
 PORTVERSION=	0.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net python
 MASTER_SITES=	http://launchpadlibrarian.net/30388120/ \
 		# http://launchpad.net/txamqp/trunk/${PORTVERSION}/+download/
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTNAME=	python-${PORTNAME}_${PORTVERSION}.orig
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	horus.li at gmail.com
 COMMENT=	Twisted Python library for the AMQP messaging protocol
 
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}thrift>0:${PORTSDIR}/devel/py-thrift
@@ -28,7 +28,7 @@ PLIST_SUB=		PORTNAME="${PORTNAME}"
 # TODO: Install txAMQP examples.
 
 # Don't try to install Twisted yourself, txAMQP. thx!
-do-patch:
+post-patch:
 	@${REINPLACE_CMD} -e '/install_requires/s/^/#/' ${WRKSRC}/setup.py
 
 .include <bsd.port.mk>

Added: head/net/py-txamqp/files/patch-src__txamqp__codec.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/py-txamqp/files/patch-src__txamqp__codec.py	Thu May 30 07:07:38 2013	(r319405)
@@ -0,0 +1,42 @@
+--- ./src/txamqp/codec.py.orig	2009-08-16 19:25:45.000000000 +0800
++++ ./src/txamqp/codec.py	2013-05-30 13:54:50.000000000 +0800
+@@ -25,12 +25,12 @@
+ """
+ 
+ from cStringIO import StringIO
+-from struct import *
++from struct import pack, calcsize, unpack
+ 
+ class EOF(Exception):
+   pass
+ 
+-class Codec:
++class Codec(object):
+ 
+   def __init__(self, stream):
+     self.stream = stream
+@@ -153,6 +153,13 @@
+   def decode_longstr(self):
+     return self.dec_str("!L")
+ 
++  # timestamp
++  def encode_timestamp(self, o):
++    self.pack("!Q", o)
++
++  def decode_timestamp(self):
++    return self.unpack("!Q")
++
+   # table
+   def encode_table(self, tbl):
+     enc = StringIO()
+@@ -180,6 +187,10 @@
+         value = self.decode_longstr()
+       elif type == "I":
+         value = self.decode_long()
++      elif type == "F":
++        value = self.decode_table()
++      elif type == "t":
++        value = (self.decode_octet() != 0)
+       else:
+         raise ValueError(repr(type))
+       result[key] = value


More information about the svn-ports-head mailing list