Accepting request 485737 from devel:languages:python:singlespec
- Fix python_module macro definition - update for multipython build - only distribute "pygmentize" for Python 3 OBS-URL: https://build.opensuse.org/request/show/485737 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=35
This commit is contained in:
parent
b1d8996e6d
commit
a931136a59
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 5 05:36:56 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Fix python_module macro definition
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 8 16:45:08 UTC 2016 - jmatejek@suse.com
|
||||||
|
|
||||||
|
- update for multipython build
|
||||||
|
- only distribute "pygmentize" for Python 3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 17 09:52:51 UTC 2016 - dmueller@suse.com
|
Mon Oct 17 09:52:51 UTC 2016 - dmueller@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-Pygments
|
# spec file for package python-Pygments
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-Pygments
|
Name: python-Pygments
|
||||||
Version: 2.1.3
|
Version: 2.1.3
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -25,17 +26,17 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: python-devel
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: python-nose
|
BuildRequires: %{python_module nose}
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Provides: python-pygments = %{version}
|
Provides: python-pygments = %{version}
|
||||||
Obsoletes: python-pygments < %{version}
|
Obsoletes: python-pygments < %{version}
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
||||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
||||||
%else
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Pygments is a syntax highlighting package written in Python.
|
Pygments is a syntax highlighting package written in Python.
|
||||||
@ -58,25 +59,24 @@ source code. Highlights are:
|
|||||||
rm tests/examplefiles/{Sorting,test}.mod
|
rm tests/examplefiles/{Sorting,test}.mod
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
||||||
|
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
if test '%{py_ver}' = "2.6"
|
%{python_expand /usr/bin/nosetests-%{$python_bin_suffix}}
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
nosetests
|
|
||||||
|
|
||||||
%files
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE AUTHORS CHANGES TODO
|
%doc LICENSE AUTHORS CHANGES TODO
|
||||||
|
%ifpython3
|
||||||
%{_bindir}/pygmentize
|
%{_bindir}/pygmentize
|
||||||
%{_mandir}/man1/pygmentize.1*
|
%{_mandir}/man1/pygmentize.1*
|
||||||
|
%endif
|
||||||
%{python_sitelib}/pygments/
|
%{python_sitelib}/pygments/
|
||||||
%{python_sitelib}/Pygments-%{version}-py%{py_ver}.egg-info/
|
%{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user