- fix build in a python2.x only env
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=40
This commit is contained in:
parent
588ae87355
commit
d63efc57f4
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 15 12:52:00 UTC 2017 - dmueller@suse.com
|
||||
|
||||
- fix build in a python2.x only env
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 7 21:13:53 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
|
@ -31,6 +31,8 @@ BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires: python-setuptools
|
||||
Provides: python-pygments = %{version}
|
||||
Obsoletes: python-pygments < %{version}
|
||||
@ -63,8 +65,21 @@ rm tests/examplefiles/{Sorting,test}.mod
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%{python_expand %$python_install
|
||||
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix}
|
||||
%fdupes -s %{buildroot}%{$python_sitelib}
|
||||
%if "%python3_bin_suffix" != ""
|
||||
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
||||
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
|
||||
%endif
|
||||
}
|
||||
|
||||
%prepare_alternative pygmentize
|
||||
|
||||
%post
|
||||
%python_install_alternative pygmentize
|
||||
|
||||
%postun
|
||||
%python_install_alternative pygmentize
|
||||
|
||||
%check
|
||||
export PYTHONDEBUG=1
|
||||
@ -73,10 +88,8 @@ export PYTHONDEBUG=1
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE AUTHORS CHANGES TODO
|
||||
%ifpython3
|
||||
%{_bindir}/pygmentize
|
||||
%{_mandir}/man1/pygmentize.1*
|
||||
%endif
|
||||
%python_alternative %{_bindir}/pygmentize
|
||||
%python3_only %{_mandir}/man1/pygmentize.1*
|
||||
%{python_sitelib}/pygments/
|
||||
%{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user