Use bcond main_python to disable unique unversioned parts
This commit is contained in:
parent
54b3904b0a
commit
f8d62d5ab2
@ -8,6 +8,11 @@
|
||||
%bcond_without tests
|
||||
%endif
|
||||
|
||||
# Similar to what we have in pythonX.Y.spec files.
|
||||
# If enabled, provides unversioned executables and other stuff.
|
||||
# Disable it if you build this package in an alternative stack.
|
||||
%bcond_without main_python
|
||||
|
||||
%global pypi_name wheel
|
||||
%global python_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl
|
||||
%global python_wheeldir %{_datadir}/python-wheels
|
||||
@ -74,8 +79,10 @@ A Python wheel of wheel to use with virtualenv.
|
||||
%install
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
|
||||
%if %{with main_python}
|
||||
ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
|
||||
ln -s %{pypi_name}-3 %{buildroot}%{_bindir}/%{pypi_name}
|
||||
%endif
|
||||
|
||||
%if %{without bootstrap}
|
||||
# We can only use bdist_wheel when wheel is installed, hence we don't build the wheel in %%build
|
||||
@ -95,9 +102,11 @@ rm setup.cfg # to drop pytest coverage options configured there
|
||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||
%license LICENSE.txt
|
||||
%doc README.rst
|
||||
%{_bindir}/%{pypi_name}-%{python3_version}
|
||||
%if %{with main_python}
|
||||
%{_bindir}/%{pypi_name}
|
||||
%{_bindir}/%{pypi_name}-3
|
||||
%{_bindir}/%{pypi_name}-%{python3_version}
|
||||
%endif
|
||||
%{python3_sitelib}/%{pypi_name}*/
|
||||
|
||||
%if %{without bootstrap}
|
||||
|
Loading…
Reference in New Issue
Block a user