From 5d1c6ff774d0be136c047eb4bef61aad9ccfe172e3e9a8ab076149a413dc83ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 1 Aug 2022 08:36:49 +0000 Subject: [PATCH] Accepting request 991909 from home:ecsos - Add python-mechanize-setup.cfg.patch to fix mechanize not found during build. (boo#1202003) OBS-URL: https://build.opensuse.org/request/show/991909 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mechanize?expand=0&rev=49 --- python-mechanize-setup.cfg.patch | 30 ++++++++++++++++++++++++++++++ python-mechanize.changes | 6 ++++++ python-mechanize.spec | 3 +++ 3 files changed, 39 insertions(+) create mode 100644 python-mechanize-setup.cfg.patch diff --git a/python-mechanize-setup.cfg.patch b/python-mechanize-setup.cfg.patch new file mode 100644 index 0000000..b790c85 --- /dev/null +++ b/python-mechanize-setup.cfg.patch @@ -0,0 +1,30 @@ +From a14ecec7abcd8da9b55d28a6d9ebfd89ce635615 Mon Sep 17 00:00:00 2001 +From: Li-Wen Hsu +Date: Mon, 25 Apr 2022 22:03:01 +0800 +Subject: [PATCH] setup.cfg: Move packages def to options section + +Fix packaging with older setuptools. +--- + setup.cfg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: mechanize-0.4.8/setup.cfg +=================================================================== +--- mechanize-0.4.8.orig/setup.cfg ++++ mechanize-0.4.8/setup.cfg +@@ -8,7 +8,6 @@ license = BSD + description = Stateful, programmatic web browsing + long_description = file: README.rst + url = https://github.com/python-mechanize/mechanize +-packages = mechanize + classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers +@@ -37,6 +36,7 @@ classifiers = + Topic :: Text Processing :: Markup :: XML + + [options] ++packages = mechanize + zip_safe = True + install_requires = html5lib>=0.999999999 + diff --git a/python-mechanize.changes b/python-mechanize.changes index d745fc3..0208963 100644 --- a/python-mechanize.changes +++ b/python-mechanize.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jul 31 21:25:20 UTC 2022 - ecsos + +- Add python-mechanize-setup.cfg.patch to fix mechanize not + found during build. (boo#1202003) + ------------------------------------------------------------------- Sun Jul 24 09:09:01 UTC 2022 - Dirk Müller diff --git a/python-mechanize.spec b/python-mechanize.spec index 5177764..7cb75a6 100644 --- a/python-mechanize.spec +++ b/python-mechanize.spec @@ -25,6 +25,8 @@ Summary: Stateful programmatic web browsing License: BSD-3-Clause AND (BSD-3-Clause OR ZPL-2.1) URL: https://github.com/python-mechanize/mechanize Source: https://files.pythonhosted.org/packages/source/m/mechanize/%{modname}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-mechanize-setup.cfg.patch - setup.cfg: Move packages def to options section +Patch1: %{name}-setup.cfg.patch BuildRequires: %{python_module Twisted} BuildRequires: %{python_module html5lib} BuildRequires: %{python_module setuptools} @@ -57,6 +59,7 @@ Johnny Lee (MSIE Cookie support) and last but not least Andy Lester %prep %setup -q -n %{modname}-%{version} +%patch1 -p1 sed -i -e '/^#!\/usr\/bin\/env python/d' %{modname}/_{entities,equiv,form_controls}.py sed -i "1d" examples/forms/{echo.cgi,example.py,simple.py} # Fix doc-file-dependency