/[gentoo-x86]/dev-python/pyzor/pyzor-1.0.0.ebuild
Gentoo

Contents of /dev-python/pyzor/pyzor-1.0.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Aug 8 11:17:21 2015 UTC (4 years, 11 months ago) by klausman
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Keyword pyzor-1.0.0 for Alpha, bug 538510

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xFF10CDC620675478)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/pyzor/pyzor-1.0.0.ebuild,v 1.3 2015/05/05 09:03:43 jer Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
7 PYHON_REQ_USE="gdbm"
8
9 inherit distutils-r1
10
11 MY_PV="1-0-0"
12 DESCRIPTION="A distributed, collaborative spam detection and filtering network"
13 HOMEPAGE="https://github.com/SpamExperts/pyzor/"
14 SRC_URI="https://github.com/SpamExperts/${PN}/archive/release-${MY_PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~hppa ~ppc64 ~x86 ~amd64-linux ~x86-linux"
19
20 IUSE="doc gevent mysql pyzord redis test"
21
22 RDEPEND="mysql? ( $(python_gen_cond_dep '>=dev-python/mysql-python-1.2.5[${PYTHON_USEDEP}]' python2_7) )
23 redis? ( ~dev-python/redis-py-2.9.1[${PYTHON_USEDEP}] )
24 gevent? ( $(python_gen_cond_dep '~dev-python/gevent-1.0.1[${PYTHON_USEDEP}]' python2_7) )"
25 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
26
27 # https://sourceforge.net/apps/trac/pyzor/attachment/ticket/196/
28 DISTUTILS_IN_SOURCE_BUILD=1
29
30 REQUIRED_USE="test? ( mysql redis )"
31 S="${WORKDIR}/${PN}-release-${MY_PV}"
32
33 python_test() {
34 # The suite is py2 friendly only
35 if ! python_is_python3; then
36 PYTHONPATH=. "${PYTHON}" ./tests/unit/__init__.py
37 fi
38 }
39
40 python_compile_all() {
41 use doc && emake -C docs html
42 }
43
44 python_install_all() {
45 use doc && HTML_DOCS=( docs/.build/html/. )
46 distutils-r1_python_install_all
47 }
48
49 src_install () {
50 distutils-r1_src_install
51
52 if use pyzord; then
53 dodir /usr/sbin
54 mv "${D}"usr/bin/pyzord* "${ED}usr/sbin"
55 else
56 rm "${D}"usr/bin/pyzord*
57 fi
58 }
59
60 pkg_postinst() {
61 if use pyzord; then
62 ewarn "/usr/bin/pyzord has been moved to /usr/sbin"
63 fi
64
65 einfo "If you want to run the pyzor server you will need to emerge / re-emerge"
66 einfo "with use flag mysql and or redis. Without either flag provides only the pyzor client"
67 }

  ViewVC Help
Powered by ViewVC 1.1.20