Keep the LICENSE file in lib/pythonX.Y dir

Virtualenv tries to copy it.

See https://github.com/pypa/virtualenv/issues/1352

Virtualenv ~16.6 warns:

    No LICENSE.txt / LICENSE found in source

Technically, it is probably possible to install the package without
%license files, but that would simply resort to the previous noncritical
behavior.

This fix is not critical and hence it doesn't bump release, for easier
backporting to all our Python packages.
This commit is contained in:
Miro Hrončok 2019-07-12 14:48:12 +02:00
parent cac755a96a
commit 7fc9514b60

View File

@ -688,7 +688,6 @@ install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2}
# Remove files we don't want:
rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \
%{buildroot}%{pypyprefix}/LICENSE \
%{buildroot}%{pypyprefix}/README.rst
# wtf? This is probably masking some bigger problem, but let's do this for now
@ -828,18 +827,19 @@ CheckPyPy %{name}-stackless
%endif # run_selftests
# Because there's a bunch of binary subpackages and creating
# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that
# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that
# is just confusing for the user.
%global _docdir_fmt %{name}
%files libs
%license LICENSE
%doc README.rst
%dir %{pypyprefix}
%dir %{pypyprefix}/lib-python
%license %{pypyprefix}/LICENSE
%{pypyprefix}/lib-python/%{pylibver}/
%{pypyprefix}/lib_pypy/
%license %{pypyprefix}/lib_pypy/*/LICENSE
%{pypyprefix}/site-packages/
%if %{with_emacs}
%{_emacs_sitelispdir}/pypy3trace-mode.el
@ -847,7 +847,6 @@ CheckPyPy %{name}-stackless
%endif
%files
%license LICENSE
%doc README.rst
%{_bindir}/pypy3
%{_bindir}/pypy%{pyversion}
@ -862,7 +861,6 @@ CheckPyPy %{name}-stackless
%if 0%{with_stackless}
%files stackless
%license LICENSE
%doc README.rst
%{_bindir}/pypy-stackless
%endif