provide only one copy of $bindir/distro
By the guidelines if binary does completely same thing, it should be distributed only once and only in py3 version. However EPEL7 and below have py2, so binary will be py2 there. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
30a149c063
commit
4cf67948bd
@ -75,16 +75,9 @@ rm -rf %{pypi_name}.egg-info
|
||||
%endif
|
||||
|
||||
%install
|
||||
# Must do the subpackages' install first because the scripts in /usr/bin are
|
||||
# overwritten with every setup.py install.
|
||||
%py2_install
|
||||
cp %{buildroot}/%{_bindir}/distro %{buildroot}/%{_bindir}/distro-2
|
||||
ln -sf %{_bindir}/distro-2 %{buildroot}/%{_bindir}/distro-%{python2_version}
|
||||
|
||||
%if 0%{with_python3}
|
||||
%py3_install
|
||||
cp %{buildroot}/%{_bindir}/distro %{buildroot}/%{_bindir}/distro-3
|
||||
ln -sf %{_bindir}/distro-3 %{buildroot}/%{_bindir}/distro-%{python3_version}
|
||||
%endif
|
||||
|
||||
%files -n python2-%{pypi_name}
|
||||
@ -92,12 +85,6 @@ ln -sf %{_bindir}/distro-3 %{buildroot}/%{_bindir}/distro-%{python3_version}
|
||||
# not included in tar.gz
|
||||
# see https://github.com/nir0s/distro/issues/139
|
||||
#%license LICENSE
|
||||
%if ! 0%{with_python3}
|
||||
%{_bindir}/distro
|
||||
%endif
|
||||
%{_bindir}/distro-2
|
||||
%{_bindir}/distro-%{python2_version}
|
||||
|
||||
%{python2_sitelib}/%{pypi_name}.py*
|
||||
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
|
||||
@ -105,14 +92,13 @@ ln -sf %{_bindir}/distro-3 %{buildroot}/%{_bindir}/distro-%{python3_version}
|
||||
%files -n python3-%{pypi_name}
|
||||
%doc README.rst
|
||||
#%license LICENSE
|
||||
%{_bindir}/distro
|
||||
%{_bindir}/distro-3
|
||||
%{_bindir}/distro-%{python3_version}
|
||||
%{python3_sitelib}/__pycache__/*
|
||||
%{python3_sitelib}/%{pypi_name}.py
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
%endif
|
||||
|
||||
%{_bindir}/distro
|
||||
|
||||
%changelog
|
||||
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-7
|
||||
- Rebuild for Python 3.6
|
||||
|
||||
Loading…
Reference in New Issue
Block a user