diff options
Diffstat (limited to 'dev-python/mechanize/mechanize-0.1.7b.ebuild')
-rw-r--r-- | dev-python/mechanize/mechanize-0.1.7b.ebuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-python/mechanize/mechanize-0.1.7b.ebuild b/dev-python/mechanize/mechanize-0.1.7b.ebuild new file mode 100644 index 000000000000..5b04784bf298 --- /dev/null +++ b/dev-python/mechanize/mechanize-0.1.7b.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/mechanize/mechanize-0.1.7b.ebuild,v 1.1 2007/06/30 06:01:21 hawking Exp $ + +inherit distutils + +DESCRIPTION="Stateful programmatic web browsing in Python" +HOMEPAGE="http://wwwsearch.sourceforge.net/mechanize/" +SRC_URI="http://wwwsearch.sourceforge.net/${PN}/src/${P}.tar.gz" + +LICENSE="|| ( BSD ZPL )" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND=">=dev-python/clientform-0.2.7" +RDEPEND="${DEPEND}" + +DOCS="0.1-changes.txt" + +src_unpack() { + unpack ${A} + cd "${S}" + + # use distutils instead of setuptools + sed -i \ + -e 's/not hasattr(sys, "version_info")/1/' \ + setup.py || die "sed in setup.py failed" + + # We don't run coverage tests or functional_tests + # which access the network, just doctests and unit tests + sed -i \ + -e '/import coverage/d' \ + test.py || die "sed in test.py failed" + + # For some weird reason README.txt + # is just a copy of README.html + rm README.txt +} + +src_install() { + # remove to prevent distutils_src_install from installing it + dohtml *.html + rm README.html* + + distutils_src_install +} + +src_test() { + PYTHONPATH=build/lib/ \ + ${python} test.py || die "tests failed" +} |