aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik (Xarthisius) <xarthisius@gentoo.org>2012-06-08 22:35:31 +0200
committerKacper Kowalik (Xarthisius) <xarthisius@gentoo.org>2012-06-08 22:35:31 +0200
commit0f606751651e6b9646778ad5b5cbd639f057490f (patch)
tree79f094e28e8ef2dbac7954320d16b8c7365ef8db
parent[dev-python/autobahntestsuite] add missing dependency on dev-python/twisted-web (diff)
downloadpython-0f606751651e6b9646778ad5b5cbd639f057490f.tar.gz
python-0f606751651e6b9646778ad5b5cbd639f057490f.tar.bz2
python-0f606751651e6b9646778ad5b5cbd639f057490f.zip
[dev-python/ws4py] import from main tree, add missing deps, fix for vcs-snapshot-r1, enable tests - work in progress
-rw-r--r--dev-python/ws4py/ChangeLog22
-rw-r--r--dev-python/ws4py/Manifest1
-rw-r--r--dev-python/ws4py/files/ws4py-0.2.1-process-data.patch27
-rw-r--r--dev-python/ws4py/metadata.xml13
-rw-r--r--dev-python/ws4py/ws4py-0.2.1-r3.ebuild61
5 files changed, 124 insertions, 0 deletions
diff --git a/dev-python/ws4py/ChangeLog b/dev-python/ws4py/ChangeLog
new file mode 100644
index 0000000..5d1588b
--- /dev/null
+++ b/dev-python/ws4py/ChangeLog
@@ -0,0 +1,22 @@
+# ChangeLog for dev-python/ws4py
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/ws4py/ChangeLog,v 1.3 2012/04/24 02:31:04 vapier Exp $
+
+*ws4py-0.2.1-r2 (24 Apr 2012)
+
+ 24 Apr 2012; Mike Frysinger <vapier@gentoo.org> +ws4py-0.2.1-r2.ebuild,
+ metadata.xml, ws4py-9999.ebuild:
+ Further refine client/server install and gevent requirement.
+
+*ws4py-0.2.1-r1 (20 Apr 2012)
+
+ 20 Apr 2012; Mike Frysinger <vapier@gentoo.org> +ws4py-0.2.1-r1.ebuild,
+ +files/ws4py-0.2.1-process-data.patch:
+ Add fix from Jon Salz for partial data transfers.
+
+*ws4py-9999 (17 Apr 2012)
+*ws4py-0.2.1 (17 Apr 2012)
+
+ 17 Apr 2012; Mike Frysinger <vapier@gentoo.org> +ws4py-0.2.1.ebuild,
+ +ws4py-9999.ebuild, +metadata.xml:
+ Initial ebuild import for ChromiumOS.
diff --git a/dev-python/ws4py/Manifest b/dev-python/ws4py/Manifest
new file mode 100644
index 0000000..4df6b02
--- /dev/null
+++ b/dev-python/ws4py/Manifest
@@ -0,0 +1 @@
+DIST ws4py-0.2.1.tar.gz 1858090 RMD160 994cd2b0cb73cd3f04efdfcbd25df01ad380f131 SHA1 5967f99fac74bf890e1ecca996ba839c57c99673 SHA256 8f902a5be5bed493392ccbabd71406c113c89f973a0d635d7ed35a4d8ec932c5
diff --git a/dev-python/ws4py/files/ws4py-0.2.1-process-data.patch b/dev-python/ws4py/files/ws4py-0.2.1-process-data.patch
new file mode 100644
index 0000000..5476f2d
--- /dev/null
+++ b/dev-python/ws4py/files/ws4py-0.2.1-process-data.patch
@@ -0,0 +1,27 @@
+From 38cf669e27fab9de187eb11dabd7d85d73d5f470 Mon Sep 17 00:00:00 2001
+From: Jon Salz <jsalz@chromium.org>
+Date: Fri, 20 Apr 2012 02:22:46 +0800
+Subject: [PATCH] Process remaining bytes in the body, if any.
+
+https://github.com/Lawouach/WebSocket-for-Python/issues/46
+---
+ ws4py/client/__init__.py | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/ws4py/client/__init__.py b/ws4py/client/__init__.py
+index aa4c8f2..29b1357 100644
+--- a/ws4py/client/__init__.py
++++ b/ws4py/client/__init__.py
+@@ -71,6 +71,9 @@ class WebSocketBaseClient(WebSocket):
+
+ self.handshake_ok()
+
++ if body != '':
++ self.process(body)
++
+ @property
+ def handshake_headers(self):
+ parts = urlsplit(self.url)
+--
+1.7.3.4
+
diff --git a/dev-python/ws4py/metadata.xml b/dev-python/ws4py/metadata.xml
new file mode 100644
index 0000000..13bc2c4
--- /dev/null
+++ b/dev-python/ws4py/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>python</herd>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+ <description>make whatever changes you want</description>
+</maintainer>
+<use>
+ <flag name='client'>Install client modules</flag>
+ <flag name='server'>Install server modules</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-python/ws4py/ws4py-0.2.1-r3.ebuild b/dev-python/ws4py/ws4py-0.2.1-r3.ebuild
new file mode 100644
index 0000000..4bb8cc7
--- /dev/null
+++ b/dev-python/ws4py/ws4py-0.2.1-r3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/ws4py/ws4py-0.2.1-r2.ebuild,v 1.1 2012/04/24 02:31:04 vapier Exp $
+
+# We could depend on dev-python/cherrypy when USE=server, but
+# that is an optional component ...
+# Same for www-servers/tornado and USE=client ...
+
+EAPI="4"
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://github.com/Lawouach/WebSocket-for-Python.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/Lawouach/WebSocket-for-Python/tarball/v${PV} -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+DESCRIPTION="WebSocket support for Python"
+HOMEPAGE="https://github.com/Lawouach/WebSocket-for-Python"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="+client +server +threads"
+
+RDEPEND="client? ( dev-lang/python[threads?] )
+ dev-python/gevent"
+# one-of-many for server???
+DEPEND="
+ test? (
+ dev-python/authobahntestsuite
+ dev-python/cherrypy
+ www-servers/tornado
+ ${RDEPEND}
+ )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-process-data.patch
+ distutils_src_prepare
+}
+
+# Figure out how to run them...
+#src_test() {
+# cd test
+# python autobahn_test_servers.py --run-all
+# wstest -m fuzzingclient -s fuzzingclient.json
+#}
+
+src_install() {
+ distutils_src_install
+ use client || rm -rf "${ED}$(python_get_sitedir)"/ws4py/client
+ use server || rm -rf "${ED}$(python_get_sitedir)"/ws4py/server
+}