From 2875caf5b52340ea16965b1d8f76342cc07bf8b5 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Fri, 13 Sep 2013 14:25:53 +0200 Subject: gnu: Add python2-mechanize. * gnu/packages/python.scm (python2-mechanize): New variable. --- gnu/packages/python.scm | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index dcfe784e57..be33bf6570 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -19,7 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages python) - #:use-module ((guix licenses) #:select (bsd-3 psfl x11)) + #:use-module ((guix licenses) #:select (bsd-3 bsd-style psfl x11)) #:use-module ((guix licenses) #:select (zlib) #:renamer (symbol-prefix-proc 'license)) #:use-module (gnu packages) @@ -344,3 +344,38 @@ datetime module, available in Python 2.3+.") Database API 2.0T.") (license zlib))) + +(define-public python2-mechanize + (package + (name "python2-mechanize") + (version "0.2.5") + (source + (origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-" + version ".tar.gz")) + (sha256 + (base32 + "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) + (build-system python-build-system) + (inputs + `(("python2-setuptools" ,python2-setuptools))) + (arguments + `(#:python ,python-2 ; apparently incompatible with Python 3 + #:tests? #f)) + ;; test fails with message + ;; AttributeError: 'module' object has no attribute 'test_pullparser' + ;; (python-3.3.2) or + ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' + ;; (python-2.7.5). + ;; The source code is from March 2011 and probably not up-to-date + ;; with respect to python unit tests. + (home-page "http://wwwsearch.sourceforge.net/mechanize/") + (synopsis + "Stateful programmatic web browsing in Python") + (description + "Mechanize implements stateful programmatic web browsing in Python, +after Andy Lester’s Perl module WWW::Mechanize.") + (license (bsd-style "file://COPYING" + "See COPYING in the distribution.")))) + -- cgit v1.2.3