2010-07-02 14:37:40 +00:00
|
|
|
#
|
2011-09-20 14:49:49 +00:00
|
|
|
# spec file for package python-mechanize
|
2010-07-02 14:37:40 +00:00
|
|
|
#
|
2024-05-03 07:41:13 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2010-07-02 14:37:40 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2019-01-18 10:41:40 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-07-02 14:37:40 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2018-06-14 17:22:43 +00:00
|
|
|
%define modname mechanize
|
2023-06-27 16:07:07 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-04-05 12:29:27 +00:00
|
|
|
Name: python-mechanize
|
2024-05-03 07:41:13 +00:00
|
|
|
Version: 0.4.10
|
2011-09-20 14:49:49 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Stateful programmatic web browsing
|
2022-01-24 00:58:29 +00:00
|
|
|
License: BSD-3-Clause AND (BSD-3-Clause OR ZPL-2.1)
|
2018-06-14 17:22:43 +00:00
|
|
|
URL: https://github.com/python-mechanize/mechanize
|
2018-08-29 10:46:29 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/m/mechanize/%{modname}-%{version}.tar.gz
|
2019-09-11 12:38:04 +00:00
|
|
|
BuildRequires: %{python_module Twisted}
|
2018-06-14 17:22:43 +00:00
|
|
|
BuildRequires: %{python_module html5lib}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-01-18 10:41:40 +00:00
|
|
|
BuildRequires: %{python_module zope.interface}
|
2018-06-14 17:22:43 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-11-12 16:51:27 +00:00
|
|
|
Requires: python-html5lib
|
2010-07-06 08:00:27 +00:00
|
|
|
BuildArch: noarch
|
2018-06-14 17:22:43 +00:00
|
|
|
%python_subpackages
|
2010-07-02 14:37:40 +00:00
|
|
|
|
|
|
|
|
%description
|
2022-08-01 16:09:25 +00:00
|
|
|
Stateful programmatic web browsing in Python. Browse pages
|
|
|
|
|
programmatically with HTML form filling and clicking
|
|
|
|
|
of links.
|
2010-07-02 14:37:40 +00:00
|
|
|
|
|
|
|
|
%prep
|
2023-03-31 07:06:23 +00:00
|
|
|
%autosetup -p1 -n %{modname}-%{version}
|
2022-08-01 16:09:25 +00:00
|
|
|
sed -i -e '1{/^#!\/usr\/bin\/env python/d}' %{modname}/{_entities,_equiv,_form_controls,polyglot}.py
|
|
|
|
|
sed -i -e '1{/^#!/d}' examples/forms/{echo.cgi,example.py,simple.py}
|
|
|
|
|
chmod -x examples/forms/{echo.cgi,example.py,simple.py}
|
2010-07-02 14:37:40 +00:00
|
|
|
|
|
|
|
|
%build
|
2018-06-14 17:22:43 +00:00
|
|
|
%python_build
|
2010-07-02 14:37:40 +00:00
|
|
|
|
|
|
|
|
%install
|
2018-06-14 17:22:43 +00:00
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2019-01-18 10:41:40 +00:00
|
|
|
%python_expand $python ./run_tests.py -v
|
2010-07-02 14:37:40 +00:00
|
|
|
|
2018-06-14 17:22:43 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc examples README.rst
|
2022-08-01 16:09:25 +00:00
|
|
|
%{python_sitelib}/%{modname}
|
|
|
|
|
%{python_sitelib}/%{modname}-%{version}*-info
|
2010-07-02 14:37:40 +00:00
|
|
|
|
|
|
|
|
%changelog
|