File python-mechanize.spec of Package python-mechanize

# spec file for package python-mechanize
# Copyright (c) 2024 SUSE LLC
# 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

%define modname mechanize
Name:           python-mechanize
Version:        0.4.10
Release:        0
Summary:        Stateful programmatic web browsing
License:        BSD-3-Clause AND (BSD-3-Clause OR ZPL-2.1)
BuildRequires:  %{python_module Twisted}
BuildRequires:  %{python_module html5lib}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module zope.interface}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-html5lib
BuildArch:      noarch

Stateful programmatic web browsing in Python. Browse pages
programmatically with HTML form filling and clicking
of links.

%autosetup -p1 -n %{modname}-%{version}
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,,}
chmod -x examples/forms/{echo.cgi,,}


%python_expand %fdupes %{buildroot}%{$python_sitelib}

%python_expand $python ./ -v

%files %{python_files}
%license LICENSE
%doc examples README.rst

openSUSE Build Service is sponsored by