From d1431b163b98ad1a9c2b5538ca7a3051ceee64c32f53a5596d4144c73a7d15ec Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 16 Jul 2018 18:10:56 +0000 Subject: [PATCH 1/5] Clean SPEC file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=56 --- python-beautifulsoup4.changes | 5 +++++ python-beautifulsoup4.spec | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/python-beautifulsoup4.changes b/python-beautifulsoup4.changes index 15057dd..20bef7a 100644 --- a/python-beautifulsoup4.changes +++ b/python-beautifulsoup4.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 16 18:08:01 UTC 2018 - mcepl@suse.com + +- Clean SPEC file + ------------------------------------------------------------------- Tue Mar 6 12:27:41 UTC 2018 - aplanas@suse.com diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index 95e65cf..7289e98 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -23,24 +23,23 @@ Release: 0 Summary: HTML/XML Parser for Quick-Turnaround Applications Like Screen-Scraping License: MIT Group: Development/Libraries/Python -Url: https://www.crummy.com/software/BeautifulSoup/ +URL: https://www.crummy.com/software/BeautifulSoup/ Source: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz # PATCH-FIX-UPSTREAM speilicke@suse.com -- Backport of https://code.launchpad.net/~saschpe/beautifulsoup/beautifulsoup/+merge/200849 Patch0: beautifulsoup4-lxml-fixes.patch # Documentation requirements: BuildRequires: %{python_module devel >= 2.6} -BuildRequires: %{python_module setuptools} # Test requirements BuildRequires: %{python_module nose} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-Sphinx +BuildArch: noarch %if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Suggests: python-html5lib >= 0.999999 Suggests: python-lxml >= 3.4.4 %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch %python_subpackages %description @@ -101,13 +100,12 @@ export LANG=en_US.UTF-8 } %files %{python_files} -%defattr(-,root,root) -%doc AUTHORS.txt COPYING.txt +%license COPYING.txt +%doc AUTHORS.txt %{python_sitelib}/bs4/ %{python_sitelib}/beautifulsoup4-%{version}-py*.egg-info %files %{python_files doc} -%defattr(-,root,root) %doc NEWS.txt README.txt TODO.txt doc/build/html %changelog From 6498ffd82f83d3eeee924d146bb414aab390a8edd03b599bce9bc3a65c65296a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 16 Jul 2018 21:10:26 +0000 Subject: [PATCH 2/5] Add -v to running tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=57 --- python-beautifulsoup4.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index 7289e98..e62315d 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -95,7 +95,7 @@ pushd doc && make html && rm build/html/.buildinfo build/html/objects.inv && po export LANG=en_US.UTF-8 %{python_expand export PYTHONPATH="%{buildroot}%{$python_sitelib}" pushd $PYTHONPATH - $python %{_bindir}/nosetests-%{$python_version} + $python %{_bindir}/nosetests-%{$python_version} -v popd } From d8bbb2f1f7c1cc60f0da4fafb4f9b0192d01bc3e605f0507f44f14c7fef82a64 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 17 Jul 2018 06:10:40 +0000 Subject: [PATCH 3/5] Use py.test for running the tests instead of nosetests, which breaks with python 3.7. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=58 --- python-beautifulsoup4.changes | 2 ++ python-beautifulsoup4.spec | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python-beautifulsoup4.changes b/python-beautifulsoup4.changes index 20bef7a..f8efe8c 100644 --- a/python-beautifulsoup4.changes +++ b/python-beautifulsoup4.changes @@ -2,6 +2,8 @@ Mon Jul 16 18:08:01 UTC 2018 - mcepl@suse.com - Clean SPEC file + Use py.test for running the tests instead of nosetests, which + breaks with python 3.7. ------------------------------------------------------------------- Tue Mar 6 12:27:41 UTC 2018 - aplanas@suse.com diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index e62315d..146627d 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -30,7 +30,7 @@ Patch0: beautifulsoup4-lxml-fixes.patch # Documentation requirements: BuildRequires: %{python_module devel >= 2.6} # Test requirements -BuildRequires: %{python_module nose} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -95,7 +95,8 @@ pushd doc && make html && rm build/html/.buildinfo build/html/objects.inv && po export LANG=en_US.UTF-8 %{python_expand export PYTHONPATH="%{buildroot}%{$python_sitelib}" pushd $PYTHONPATH - $python %{_bindir}/nosetests-%{$python_version} -v + py.test-%{$python_bin_suffix} + rm -rf $PYTHONPATH/.pytest_cache popd } From 8b80d9504bd445ba159d9ef3e6d64ebb734e595819bfd41f241d175d48a6d339 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 17 Jul 2018 06:21:09 +0000 Subject: [PATCH 4/5] KISS principle: py.test allows us to run tests without changing $PWD OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=59 --- python-beautifulsoup4.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index 146627d..9d5f4ab 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -93,12 +93,7 @@ pushd doc && make html && rm build/html/.buildinfo build/html/objects.inv && po %check export LANG=en_US.UTF-8 -%{python_expand export PYTHONPATH="%{buildroot}%{$python_sitelib}" - pushd $PYTHONPATH - py.test-%{$python_bin_suffix} - rm -rf $PYTHONPATH/.pytest_cache - popd -} +%python_expand py.test-%{$python_bin_suffix} %{buildroot}%{$python_sitelib}/bs4/tests %files %{python_files} %license COPYING.txt From 9414684b08a98d81c37617e3a69ef023abd5958617fb294741b2411652391ee2 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 17 Jul 2018 06:30:38 +0000 Subject: [PATCH 5/5] We need to do cleanup OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=60 --- python-beautifulsoup4.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index 9d5f4ab..e696060 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -93,7 +93,10 @@ pushd doc && make html && rm build/html/.buildinfo build/html/objects.inv && po %check export LANG=en_US.UTF-8 -%python_expand py.test-%{$python_bin_suffix} %{buildroot}%{$python_sitelib}/bs4/tests +%{python_expand export TESTROOT=%{buildroot}%{$python_sitelib}/bs4/tests +py.test-%{$python_bin_suffix} $TESTROOT +rm -rf $TESTROOT/__pycache__ +} %files %{python_files} %license COPYING.txt