diff options
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/mechanize/Manifest | 3 | ||||
-rw-r--r-- | dev-python/mechanize/mechanize-0.2.0.ebuild | 49 | ||||
-rw-r--r-- | dev-python/mechanize/metadata.xml | 15 |
3 files changed, 67 insertions, 0 deletions
diff --git a/dev-python/mechanize/Manifest b/dev-python/mechanize/Manifest new file mode 100644 index 0000000..b430b30 --- /dev/null +++ b/dev-python/mechanize/Manifest @@ -0,0 +1,3 @@ +DIST mechanize-0.2.0.tar.gz 378487 RMD160 21fb32522945e9380b36de8fb7b472fe05bd2caa SHA1 d95456ba625c8a152a1e01ddfb7d3570d62a53af SHA256 af26a30f16d9f7d53ef9b000ca0bcf173ba5ba1c108f7fdd218f1e90fedc6221 +EBUILD mechanize-0.2.0.ebuild 1469 RMD160 1e113776e6321a00f0736507ea17d6cb0cb4b80d SHA1 433017a6d3995f4444fccb2942cdaea35b9ab12c SHA256 2860054094a8283fab8f2f90e280ccb388d0a0916ea2129dc4074478ca6ea3ce +MISC metadata.xml 791 RMD160 cf985c27f79156886aa162185fd8aac175639a4b SHA1 093dcb8ca0afca8a49df42e9c6b5be710a58a0f8 SHA256 8a1186c5e48058b31202900e47ed5e2938f5e53d3a419828a9049e6cb9d3b87f diff --git a/dev-python/mechanize/mechanize-0.2.0.ebuild b/dev-python/mechanize/mechanize-0.2.0.ebuild new file mode 100644 index 0000000..4668534 --- /dev/null +++ b/dev-python/mechanize/mechanize-0.2.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/mechanize/mechanize-0.2.0.ebuild,v 1.1 2010/04/24 10:33:34 djc Exp $ + +EAPI="2" +SUPPORT_PYTHON_ABIS="1" + +inherit distutils eutils + +DESCRIPTION="Stateful programmatic web browsing in Python" +HOMEPAGE="http://wwwsearch.sourceforge.net/mechanize/ http://pypi.python.org/pypi/mechanize" +SRC_URI="http://wwwsearch.sourceforge.net/${PN}/src/${P}.tar.gz" + +LICENSE="|| ( BSD ZPL )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos" +IUSE="" + +DEPEND="" +RDEPEND="" +RESTRICT_PYTHON_ABIS="3.*" + +DOCS="docs/*.txt" + +src_prepare() { + # Use distutils instead of setuptools. + # (This can't be removed in the same ${PV} due to file->directory replacement.) + sed -e 's/not hasattr(sys, "version_info")/True/' -i 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 -e '/import coverage/d' -i test.py || die "sed in test.py failed" +} + +src_test() { + testing() { + # ignore warnings http://github.com/jjlee/mechanize/issues/issue/13 + PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" -Wignore test.py + } + python_execute_function testing +} + +src_install() { + # Fix some paths. + sed -i -e 's:../styles/:styles/:g' docs/html/* + dohtml -r docs/html/ docs/styles + + distutils_src_install +} diff --git a/dev-python/mechanize/metadata.xml b/dev-python/mechanize/metadata.xml new file mode 100644 index 0000000..0a3f10c --- /dev/null +++ b/dev-python/mechanize/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <longdescription lang="en"> + mechanize is a Python module for static programmatic web browsing in + Python, after Andy Lester's Perl module WWW::Mechanize. With the Browser + subclass any url can be opened - not just http - and UserAgentBase + offers easy dynamic configuration of user-agent features like protocol, + cookie, redirection and robots.txt handling. Other functionalities + include easy HTML form filling using ClientForm interface, convenient + link parsing and following, browser history with .back() and .reload() + methods and automatic handling of HTTP-Equiv and Refresh. + </longdescription> +</pkgmetadata> |