- 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
|
Fri Apr 7 21:13:53 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ BuildRequires: %{python_module nose}
|
|||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Provides: python-pygments = %{version}
|
Provides: python-pygments = %{version}
|
||||||
Obsoletes: python-pygments < %{version}
|
Obsoletes: python-pygments < %{version}
|
||||||
@ -63,8 +65,21 @@ rm tests/examplefiles/{Sorting,test}.mod
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python_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
|
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
|
%check
|
||||||
export PYTHONDEBUG=1
|
export PYTHONDEBUG=1
|
||||||
@ -73,10 +88,8 @@ export PYTHONDEBUG=1
|
|||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE AUTHORS CHANGES TODO
|
%doc LICENSE AUTHORS CHANGES TODO
|
||||||
%ifpython3
|
%python_alternative %{_bindir}/pygmentize
|
||||||
%{_bindir}/pygmentize
|
%python3_only %{_mandir}/man1/pygmentize.1*
|
||||||
%{_mandir}/man1/pygmentize.1*
|
|
||||||
%endif
|
|
||||||
%{python_sitelib}/pygments/
|
%{python_sitelib}/pygments/
|
||||||
%{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/
|
%{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user