15
0

Accepting request 623133 from home:mimi_vx:branches:devel:languages:python

- add python_37.diff  - fixes build with python-3.7+

OBS-URL: https://build.opensuse.org/request/show/623133
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=42
This commit is contained in:
Tomáš Chvátal
2018-07-16 13:34:14 +00:00
committed by Git OBS Bridge
parent d63efc57f4
commit 5c78e06fdb
3 changed files with 47 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-Pygments
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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
@@ -20,24 +20,23 @@
Name: python-Pygments
Version: 2.2.0
Release: 0
Url: http://pygments.org
Summary: Pygments is a syntax highlighting package written in Python
License: BSD-2-Clause
Group: Development/Languages/Python
URL: http://pygments.org
Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: python_37.diff
BuildRequires: %{python_module devel}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: python-setuptools
Provides: python-pygments = %{version}
Obsoletes: python-pygments < %{version}
BuildArch: noarch
%python_subpackages
%description
@@ -57,6 +56,7 @@ source code. Highlights are:
%prep
%setup -q -n Pygments-%{version}
%patch0 -p1
# Remove non-oss licensed files, see bnc# 760344
rm tests/examplefiles/{Sorting,test}.mod
@@ -68,7 +68,7 @@ rm tests/examplefiles/{Sorting,test}.mod
%{python_expand %$python_install
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix}
%fdupes -s %{buildroot}%{$python_sitelib}
%if "%python3_bin_suffix" != ""
%if "%{python3_bin_suffix}" != ""
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
%endif
}
@@ -86,8 +86,8 @@ export PYTHONDEBUG=1
%python_exec tests/run.py
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE AUTHORS CHANGES TODO
%license LICENSE
%doc AUTHORS CHANGES TODO
%python_alternative %{_bindir}/pygmentize
%python3_only %{_mandir}/man1/pygmentize.1*
%{python_sitelib}/pygments/