diff options
Diffstat (limited to 'dev-python/http-parser')
-rw-r--r-- | dev-python/http-parser/Manifest | 1 | ||||
-rw-r--r-- | dev-python/http-parser/files/http-parser-0.7.8-setup.patch | 22 | ||||
-rw-r--r-- | dev-python/http-parser/http-parser-0.8.3.ebuild | 45 | ||||
-rw-r--r-- | dev-python/http-parser/metadata.xml | 9 |
4 files changed, 77 insertions, 0 deletions
diff --git a/dev-python/http-parser/Manifest b/dev-python/http-parser/Manifest new file mode 100644 index 000000000000..2ec2706b2c2d --- /dev/null +++ b/dev-python/http-parser/Manifest @@ -0,0 +1 @@ +DIST http-parser-0.8.3.tar.gz 83040 SHA256 e2aff90a60def3e476bd71694d8757c0f95ebf2fedf0a8ae34ee306e0b20db83 SHA512 aca583d976dcf172244179cc4199336f296dbb2e2838dded23e64d55f23298fe600f9c24ba6cb6d1d5faad3022710154949fd39adecaef763f7589a58d03fbd1 WHIRLPOOL 9de8476e9fa878b5542806efb8fe1729ac6fcb04b7dcc9d084dfd9e4280fe3bee185d2fb8ae43b2d3a46eb3a1a67047a40e423d054ecb542f66bd15b35fae427 diff --git a/dev-python/http-parser/files/http-parser-0.7.8-setup.patch b/dev-python/http-parser/files/http-parser-0.7.8-setup.patch new file mode 100644 index 000000000000..9bd43e6a1534 --- /dev/null +++ b/dev-python/http-parser/files/http-parser-0.7.8-setup.patch @@ -0,0 +1,22 @@ +diff -ur http-parser-0.7.8.orig/setup.py http-parser-0.7.8/setup.py +--- setup.py 2012-08-05 11:14:22.000000000 +0800 ++++ setup.py 2013-01-21 01:54:23.748530621 +0800 +@@ -10,7 +10,7 @@ + from distutils.command.sdist import sdist as _sdist + import glob + from imp import load_source +-import os ++import os, io + import shutil + import sys + import traceback +@@ -49,7 +49,7 @@ + VERSION = http_parser.__version__ + + # get long description +-with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f: ++with io.open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf8') as f: + LONG_DESCRIPTION = f.read() + + def _system(cmd): + diff --git a/dev-python/http-parser/http-parser-0.8.3.ebuild b/dev-python/http-parser/http-parser-0.8.3.ebuild new file mode 100644 index 000000000000..e12d9c20fa4e --- /dev/null +++ b/dev-python/http-parser/http-parser-0.8.3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) + +inherit distutils-r1 flag-o-matic + +DESCRIPTION="HTTP request/response parser for python in C" +HOMEPAGE="http://github.com/benoitc/http-parser" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~s390 x86 ~x86-fbsd" +IUSE="examples" + +RDEPEND="" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +cython_dep() { + local flag + for flag in $(python_gen_useflags 'python*'); do + DEPEND+=" ${flag}? ( dev-python/cython[${flag}(-)] )" + done +} +cython_dep + +python_compile() { + if [[ ${EPYTHON} != python3* ]]; then + local CFLAGS=${CFLAGS} + append-cflags -fno-strict-aliasing + fi + + distutils-r1_python_compile +} + +python_install_all() { + local DOCS=( README.rst ) + use examples && local EXAMPLES=( examples/. ) + distutils-r1_python_install_all +} diff --git a/dev-python/http-parser/metadata.xml b/dev-python/http-parser/metadata.xml new file mode 100644 index 000000000000..7907c6d5b768 --- /dev/null +++ b/dev-python/http-parser/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>python</herd> + <upstream> + <remote-id type="pypi">http-parser</remote-id> + <remote-id type="github">benoitc/http-parser</remote-id> + </upstream> +</pkgmetadata> |