| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/cherrypy/cherrypy-3.2.2.ebuild,v 1.1 2011/12/28 22:44:07 floppym Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
PYTHON_DEPEND="*:2.5" |
| 7 |
SUPPORT_PYTHON_ABIS="1" |
| 8 |
RESTRICT_PYTHON_ABIS="2.4" |
| 9 |
DISTUTILS_SRC_TEST="nosetests" |
| 10 |
|
| 11 |
inherit distutils |
| 12 |
|
| 13 |
MY_P="CherryPy-${PV}" |
| 14 |
|
| 15 |
DESCRIPTION="CherryPy is a pythonic, object-oriented HTTP framework" |
| 16 |
HOMEPAGE="http://www.cherrypy.org/ http://pypi.python.org/pypi/CherryPy" |
| 17 |
SRC_URI="http://download.cherrypy.org/${PN}/${PV}/${MY_P}.tar.gz" |
| 18 |
|
| 19 |
LICENSE="BSD" |
| 20 |
SLOT="0" |
| 21 |
KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos" |
| 22 |
IUSE="doc" |
| 23 |
|
| 24 |
DEPEND="dev-python/setuptools" |
| 25 |
RDEPEND="" |
| 26 |
|
| 27 |
S="${WORKDIR}/${MY_P}" |
| 28 |
|
| 29 |
src_prepare() { |
| 30 |
distutils_src_prepare |
| 31 |
sed -i \ |
| 32 |
-e 's/"cherrypy.tutorial", //' \ |
| 33 |
-e "/('cherrypy\/tutorial',/,/),/d" \ |
| 34 |
-e "/LICENSE.txt/d" \ |
| 35 |
setup.py || die "sed failed" |
| 36 |
} |
| 37 |
|
| 38 |
src_test() { |
| 39 |
distutils_src_test < /dev/tty |
| 40 |
} |
| 41 |
|
| 42 |
src_install() { |
| 43 |
distutils_src_install |
| 44 |
|
| 45 |
delete_tests() { |
| 46 |
rm -fr "${ED}$(python_get_sitedir)/cherrypy/test" |
| 47 |
} |
| 48 |
python_execute_function -q delete_tests |
| 49 |
|
| 50 |
if use doc; then |
| 51 |
insinto /usr/share/doc/${PF} |
| 52 |
doins -r cherrypy/tutorial |
| 53 |
fi |
| 54 |
} |