Merge remote-tracking branch 'github/pr/431'.
[gentoo.git] / dev-python / http-parser / http-parser-0.8.3.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
8
9 inherit distutils-r1 flag-o-matic
10
11 DESCRIPTION="HTTP request/response parser for python in C"
12 HOMEPAGE="https://github.com/benoitc/http-parser"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~s390 ~sparc x86 ~x86-fbsd"
18 IUSE="examples"
19
20 RDEPEND=""
21 DEPEND="${RDEPEND}
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' 'python*')"
24
25 python_compile() {
26         if [[ ${EPYTHON} != python3* ]]; then
27                 local CFLAGS=${CFLAGS}
28                 append-cflags -fno-strict-aliasing
29         fi
30
31         distutils-r1_python_compile
32 }
33
34 python_install_all() {
35         local DOCS=( README.rst )
36         use examples && local EXAMPLES=( examples/. )
37         distutils-r1_python_install_all
38 }