15
0

- Added denose.patch removing dependency on the nose package.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=46
This commit is contained in:
2019-01-10 01:20:45 +00:00
committed by Git OBS Bridge
parent e45bac06ec
commit acf8bec509
3 changed files with 223 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-Pygments
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,8 +26,11 @@ Group: Development/Languages/Python
URL: http://pygments.org
Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
Patch0: python_37.diff
BuildRequires: %{python_module nose}
Patch1: denose.patch
BuildRequires: %{python_module setuptools}
# We need unittest2 just because of its test runner, it seems even
# python3 stdlib unittest runner doesn't work
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
@@ -55,7 +58,7 @@ source code. Highlights are:
%prep
%setup -q -n Pygments-%{version}
%patch0 -p1
%autopatch -p1
# Remove non-oss licensed files, see bnc# 760344
rm tests/examplefiles/{Sorting,test}.mod
@@ -66,6 +69,7 @@ rm tests/examplefiles/{Sorting,test}.mod
%python_install
%{python_expand %$python_install
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix}
rm -rf %{buildroot}%{$python_sitelib}/tests
%fdupes -s %{buildroot}%{$python_sitelib}
%if "%{python3_bin_suffix}" != ""
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
@@ -81,8 +85,9 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
%python_install_alternative pygmentize
%check
export PYTHONDEBUG=1
%python_exec tests/run.py
# export PYTHONDEBUG=1
export PYTHONPATH=tests
%python_expand py.test-%{$python_bin_suffix} --disable-warnings -v tests
%files %{python_files}
%license LICENSE