forked from pool/python-mechanize
Accepted submit request 51928 from user coolo OBS-URL: https://build.opensuse.org/request/show/51928 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mechanize?expand=0&rev=5
79 lines
2.5 KiB
RPMSpec
79 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-mechanize (Version 0.1.11)
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
%define modname mechanize
|
|
|
|
Name: python-%{modname}
|
|
Version: 0.2.4
|
|
Release: 1
|
|
Summary: Stateful programmatic web browsing
|
|
Url: http://wwwsearch.sourceforge.net/mechanize/
|
|
License: BSD
|
|
Group: Development/Libraries/Python
|
|
Source: %{modname}-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%{py_requires}
|
|
Requires: python-clientform python-beautifulsoup
|
|
BuildRequires: python-devel python-setuptools
|
|
%if 0%{?suse_version} > 1110
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%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.
|
|
|
|
Authors:
|
|
--------
|
|
John J. Lee <jjl@pobox.com>
|
|
|
|
%prep
|
|
%setup -q -n %{modname}-%{version}
|
|
|
|
%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-rpm=INSTALLED_FILES
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files -f INSTALLED_FILES
|
|
%defattr(-,root,root)
|
|
%doc docs/html/ChangeLog.txt
|
|
%doc examples COPYING.txt README.txt
|
|
|
|
%changelog
|