summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild')
-rw-r--r--dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild38
1 files changed, 32 insertions, 6 deletions
diff --git a/dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild b/dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild
index 0574da9b502e..5dc56b0966d4 100644
--- a/dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild
+++ b/dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild
@@ -1,24 +1,50 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild,v 1.1 2009/09/07 19:12:39 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/beautifulsoup/beautifulsoup-3.1.0.1.ebuild,v 1.2 2009/09/08 19:57:04 arfrever Exp $
+
+EAPI="2"
NEED_PYTHON="2.3"
+SUPPORT_PYTHON_ABIS="1"
-inherit distutils
+inherit distutils eutils
-MY_PN=BeautifulSoup
-MY_P=${MY_PN}-${PV}
+MY_PN="BeautifulSoup"
+MY_P="${MY_PN}-${PV}"
DESCRIPTION="HTML/XML parser for quick-turnaround applications like screen-scraping."
HOMEPAGE="http://www.crummy.com/software/BeautifulSoup/"
SRC_URI="http://www.crummy.com/software/${MY_PN}/download/${MY_P}.tar.gz"
+
LICENSE="PSF-2.3"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
IUSE=""
-S=${WORKDIR}/${MY_P}
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
+
+src_prepare() {
+ python_copy_sources --no-link
+
+ conversion() {
+ [[ "${PYTHON_ABI}" == 2.* ]] && return
+ epatch "${FILESDIR}/${P}-python-3.patch"
+ }
+ python_execute_function --action-message 'Applying patches for Python ${PYTHON_ABI}' --failure-message 'Applying patches for Python ${PYTHON_ABI} failed' -s conversion
+}
src_test() {
- PYTHONPATH="." "${python}" BeautifulSoupTests.py || die "tests failed"
+ testing() {
+ PYTHONPATH="build/lib" "$(PYTHON)" BeautifulSoupTests.py
+ }
+ python_execute_function -s testing
+}
+
+pkg_postinst() {
+ python_mod_optimize BeautifulSoup.py BeautifulSoupTests.py
}