Modernize executable names
Rename the Python-versioned executables not to start with "python" (if you have python3-mako installed and you type python[tab], it gets in the way) Make mako-render Python 3 on Fedora 32+ See https://fedoraproject.org/wiki/Changes/Python_means_Python3 (arguably, this is correct for F31 as well, but the timing is not good for that)
This commit is contained in:
parent
196ec709eb
commit
2d7238ab2e
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
Name: python-mako
|
Name: python-mako
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
# Mostly MIT, but _ast_util.py is Python licensed.
|
# Mostly MIT, but _ast_util.py is Python licensed.
|
||||||
@ -99,6 +99,10 @@ Requires: python3-markupsafe
|
|||||||
# Beaker is the preferred caching backend, but is not strictly necessary
|
# Beaker is the preferred caching backend, but is not strictly necessary
|
||||||
Recommends: python3-beaker
|
Recommends: python3-beaker
|
||||||
|
|
||||||
|
%if 0%{?fedora} >= 32
|
||||||
|
Conflicts: python2-mako < 1.1.0-2
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?python_provide:%python_provide python3-mako}
|
%{?python_provide:%python_provide python3-mako}
|
||||||
|
|
||||||
%if %{without python2}
|
%if %{without python2}
|
||||||
@ -128,13 +132,26 @@ This package contains the mako module built for use with python3.
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{?with_python3:%py3_install}
|
%if %{with python3}
|
||||||
|
%py3_install
|
||||||
|
|
||||||
%if %{with python2}
|
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/mako-render-%{python3_version}
|
||||||
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render
|
ln -s ./mako-render-%{python3_version} %{buildroot}/%{_bindir}/mako-render-3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{?with_python2:%py2_install}
|
%if %{with python2}
|
||||||
|
%py2_install
|
||||||
|
|
||||||
|
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/mako-render-%{python2_version}
|
||||||
|
ln -s ./mako-render-%{python2_version} %{buildroot}/%{_bindir}/mako-render-2
|
||||||
|
%if ! (%{with python3} && 0%{?fedora} >= 32)
|
||||||
|
ln -s ./mako-render-%{python2_version} %{buildroot}/%{_bindir}/mako-render
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3} && 0%{?fedora} >= 32
|
||||||
|
ln -s ./mako-render-%{python3_version} %{buildroot}/%{_bindir}/mako-render
|
||||||
|
%endif
|
||||||
|
|
||||||
# These are supporting files for building the docs. No need to ship
|
# These are supporting files for building the docs. No need to ship
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
@ -152,7 +169,11 @@ py.test-3
|
|||||||
%files -n python2-mako
|
%files -n python2-mako
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGES README.rst examples
|
%doc CHANGES README.rst examples
|
||||||
|
%if ! (%{with python3} && 0%{?fedora} >= 32)
|
||||||
%{_bindir}/mako-render
|
%{_bindir}/mako-render
|
||||||
|
%endif
|
||||||
|
%{_bindir}/mako-render-2
|
||||||
|
%{_bindir}/mako-render-%{python2_version}
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%endif %{with python2}
|
%endif %{with python2}
|
||||||
|
|
||||||
@ -160,11 +181,11 @@ py.test-3
|
|||||||
%files -n python3-mako
|
%files -n python3-mako
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGES README.rst examples
|
%doc CHANGES README.rst examples
|
||||||
%if %{with python2}
|
%if %{with python3} && 0%{?fedora} >= 32
|
||||||
%{_bindir}/python3-mako-render
|
|
||||||
%else
|
|
||||||
%{_bindir}/mako-render
|
%{_bindir}/mako-render
|
||||||
%endif
|
%endif
|
||||||
|
%{_bindir}/mako-render-3
|
||||||
|
%{_bindir}/mako-render-%{python3_version}
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -173,6 +194,10 @@ py.test-3
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 11 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-2
|
||||||
|
- Rename the Python-versioned executables not to start with "python"
|
||||||
|
- Make mako-render Python 3 on Fedora 32+
|
||||||
|
|
||||||
* Tue Sep 03 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.1.0-1
|
* Tue Sep 03 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.1.0-1
|
||||||
- Update to 1.1.0 (#1725969).
|
- Update to 1.1.0 (#1725969).
|
||||||
- https://docs.makotemplates.org/en/latest/changelog.html#change-1.1.0
|
- https://docs.makotemplates.org/en/latest/changelog.html#change-1.1.0
|
||||||
|
Loading…
Reference in New Issue
Block a user