| 1 |
patrick |
1.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/flask/flask-0.8.ebuild,v 1.3 2011/10/08 19:13:50 floppym Exp $
|
| 4 |
|
|
|
| 5 |
|
|
EAPI="3"
|
| 6 |
|
|
PYTHON_DEPEND="2:2.5"
|
| 7 |
|
|
SUPPORT_PYTHON_ABIS="1"
|
| 8 |
|
|
RESTRICT_PYTHON_ABIS="3.*"
|
| 9 |
|
|
|
| 10 |
|
|
inherit distutils
|
| 11 |
|
|
|
| 12 |
|
|
MY_PN="Flask"
|
| 13 |
|
|
MY_P="${MY_PN}-${PV}"
|
| 14 |
|
|
|
| 15 |
|
|
DESCRIPTION="A microframework based on Werkzeug, Jinja2 and good intentions"
|
| 16 |
|
|
HOMEPAGE="http://pypi.python.org/pypi/Flask"
|
| 17 |
|
|
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
| 18 |
|
|
|
| 19 |
|
|
LICENSE="BSD"
|
| 20 |
|
|
SLOT="0"
|
| 21 |
|
|
KEYWORDS="~amd64 ~x86"
|
| 22 |
|
|
IUSE="examples test"
|
| 23 |
|
|
# USE doc removed because it acquires content from the network in building
|
| 24 |
|
|
|
| 25 |
|
|
RDEPEND="dev-python/blinker
|
| 26 |
|
|
>=dev-python/jinja-2.4
|
| 27 |
|
|
dev-python/setuptools
|
| 28 |
|
|
>=dev-python/werkzeug-0.6.1"
|
| 29 |
|
|
DEPEND="${RDEPEND}"
|
| 30 |
|
|
|
| 31 |
|
|
S="${WORKDIR}/${MY_P}"
|
| 32 |
|
|
|
| 33 |
|
|
src_prepare() {
|
| 34 |
|
|
distutils_src_prepare
|
| 35 |
|
|
|
| 36 |
|
|
# Fixed an issue with an unused module for Python 2.5 (flask.session)
|
| 37 |
|
|
# https://github.com/mitsuhiko/flask/commit/0dd9dc37b6618b8091c2a0f849f5f3143dc6eafc
|
| 38 |
|
|
sed -e "s/\(from .sessions import\).*/\1 SecureCookieSession, NullSession/" -i flask/session.py || die
|
| 39 |
|
|
}
|
| 40 |
|
|
|
| 41 |
|
|
src_test() {
|
| 42 |
|
|
testing() {
|
| 43 |
|
|
PYTHONPATH="." "$(PYTHON)" run-tests.py
|
| 44 |
|
|
}
|
| 45 |
|
|
python_execute_function testing
|
| 46 |
|
|
}
|
| 47 |
|
|
|
| 48 |
|
|
src_install() {
|
| 49 |
|
|
distutils_src_install
|
| 50 |
|
|
|
| 51 |
|
|
if use examples; then
|
| 52 |
|
|
insinto /usr/share/doc/${PF}
|
| 53 |
|
|
doins -r examples || die "Installation of examples failed"
|
| 54 |
|
|
fi
|
| 55 |
|
|
}
|