From e1a4e74d0d4357be229c4756710ef237d1cbb9c8 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Mon, 14 Feb 2022 15:41:51 +0000 Subject: [PATCH] Build without soupsieve dependency to break circular dependency --- nosieve.patch | 11 +++++++++++ python-beautifulsoup4.spec | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 nosieve.patch diff --git a/nosieve.patch b/nosieve.patch new file mode 100644 index 0000000..ad2b8d2 --- /dev/null +++ b/nosieve.patch @@ -0,0 +1,11 @@ +diff -uNr beautifulsoup4-4.10.0.ORIG/setup.py beautifulsoup4-4.10.0/setup.py +--- beautifulsoup4-4.10.0.ORIG/setup.py 2022-02-14 15:37:56.703109224 +0000 ++++ beautifulsoup4-4.10.0/setup.py 2022-02-14 15:38:05.522210911 +0000 +@@ -19,7 +19,6 @@ + description="Screen-scraping library", + python_requires='>3.0.0', + install_requires=[ +- "soupsieve >1.2", + ], + long_description=long_description, + long_description_content_type="text/markdown", diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index 9a5d578..12beb08 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -1,6 +1,6 @@ # Ciruclar dependency with soupsieve which must be disabled at times -%bcond_without soupsieve -%bcond_without tests +%bcond_with soupsieve +%bcond_with tests %if 0%{?fedora} < 32 && 0%{?rhel} < 8 %global py2 1 @@ -8,11 +8,12 @@ Name: python-beautifulsoup4 Version: 4.10.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: HTML/XML parser for quick-turnaround applications like screen-scraping License: MIT URL: http://www.crummy.com/software/BeautifulSoup/ Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz +Patch0: nosieve.patch BuildArch: noarch %if 0%{?py2} BuildRequires: python2-devel >= 2.7 @@ -85,8 +86,13 @@ Obsoletes: python3-BeautifulSoup < 1:3.2.1-2 %prep %setup -q -n beautifulsoup4-%{version} +%if %{without soupsieve} +%patch0 -p1 +%endif + rm -rf %{py3dir} && cp -a . %{py3dir} + %build %{?py2:%{py2_build}} pushd %{py3dir} @@ -122,6 +128,9 @@ pushd %{py3dir} %{python3_sitelib}/bs4 %changelog +* Mon Feb 14 2022 Steve Traylen - 4.10.0-5 +- Build without soupsieve dependency to break circular dependency + * Sun Feb 13 2022 Terje Rosten - 4.10.0-4 - Rebuild to get fc36/rawhide split