forked from pool/python-mechanize
72 lines
2.4 KiB
RPMSpec
72 lines
2.4 KiB
RPMSpec
|
|
#
|
||
|
|
# spec file for package python-mechanize (Version 0.1.7)
|
||
|
|
#
|
||
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||
|
|
#
|
||
|
|
# All modifications and additions to the file contributed by third parties
|
||
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
||
|
|
# upon. The license for this file, and modifications and additions to the
|
||
|
|
# file, is the same license as for the pristine package itself (unless the
|
||
|
|
# license for the pristine package is not an Open Source License, in which
|
||
|
|
# case the license is the MIT License). An "Open Source License" is a
|
||
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||
|
|
# published by the Open Source Initiative.
|
||
|
|
|
||
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
|
#
|
||
|
|
|
||
|
|
|
||
|
|
%define modname mechanize
|
||
|
|
|
||
|
|
Name: python-mechanize
|
||
|
|
Version: 0.1.7
|
||
|
|
Release: 1
|
||
|
|
%define extver b
|
||
|
|
Summary: Stateful programmatic web browsing
|
||
|
|
Url: http://wwwsearch.sourceforge.net/mechanize/
|
||
|
|
License: BSD
|
||
|
|
Group: Development/Libraries/Python
|
||
|
|
Source: %{modname}-%{version}%{extver}.tar.gz
|
||
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
|
%{py_requires}
|
||
|
|
Requires: python-clientform python-beautifulsoup
|
||
|
|
BuildRequires: python-devel python-setuptools
|
||
|
|
|
||
|
|
%description
|
||
|
|
Stateful programmatic web browsing, after Andy Lester's Perl module
|
||
|
|
WWW::Mechanize.
|
||
|
|
|
||
|
|
The library is layered: mechanize.Browser (stateful web browser),
|
||
|
|
mechanize.UserAgent (configurable URL opener), plus urllib2 handlers.
|
||
|
|
|
||
|
|
Features include: ftp:, http: and file: URL schemes, browser history,
|
||
|
|
high-level hyperlink and HTML form support, HTTP cookies, HTTP-EQUIV and
|
||
|
|
Refresh, Referer [sic] header, robots.txt, redirections, proxies, and Basic and
|
||
|
|
Digest HTTP authentication. mechanize's response objects are (lazily-)
|
||
|
|
.seek()able and still work after .close().
|
||
|
|
|
||
|
|
Much of the code originally derived from Perl code by Gisle Aas (libwww-perl),
|
||
|
|
Johnny Lee (MSIE Cookie support) and last but not least Andy Lester
|
||
|
|
(WWW::Mechanize). urllib2 was written by Jeremy Hylton.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n %{modname}-%{version}%{extver}
|
||
|
|
|
||
|
|
%build
|
||
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||
|
|
python setup.py build
|
||
|
|
|
||
|
|
%install
|
||
|
|
rm -rf %{buildroot}
|
||
|
|
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
|
||
|
|
|
||
|
|
%clean
|
||
|
|
rm -rf %{buildroot}
|
||
|
|
|
||
|
|
%files -f INSTALLED_FILES
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%doc examples COPYING.txt ChangeLog.txt GeneralFAQ.html README.html README.txt
|
||
|
|
%doc doc.html
|
||
|
|
|
||
|
|
%changelog
|