15
0

Accepting request 623247 from devel:languages:python

- Clean SPEC file
  Use py.test for running the tests instead of nosetests, which
  breaks with python 3.7.

OBS-URL: https://build.opensuse.org/request/show/623247
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-beautifulsoup4?expand=0&rev=25
This commit is contained in:
2018-07-21 08:08:06 +00:00
committed by Git OBS Bridge
2 changed files with 16 additions and 12 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
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

View File

@@ -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 pytest}
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
@@ -94,20 +93,18 @@ 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
$python %{_bindir}/nosetests-%{$python_version}
popd
%{python_expand export TESTROOT=%{buildroot}%{$python_sitelib}/bs4/tests
py.test-%{$python_bin_suffix} $TESTROOT
rm -rf $TESTROOT/__pycache__
}
%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