Skip to content

Commit

Permalink
Keep the LICENSE.txt file in lib/pythonX.Y dir
Browse files Browse the repository at this point in the history
The license() builtin tries to read it and virtualenv tries to copy it.

See pypa/virtualenv#1352

Up until now, the license() builtin juts felt back to:

    See https://www.python.org/psf/license/

However it should output the full license text.

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.
  • Loading branch information
hroncok committed Jul 22, 2019
1 parent ec995d8 commit 46d035d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions python3.spec
Original file line number Diff line number Diff line change
Expand Up @@ -925,9 +925,6 @@ find %{buildroot} -name \*.bat -exec rm {} \;
find %{buildroot}/ -name "*~" -exec rm -f {} \;
find . -name "*~" -exec rm -f {} \;

# Get rid of a stray copy of the license:
rm %{buildroot}%{pylibdir}/LICENSE.txt

# Do bytecompilation with the newly installed interpreter.
# This is similar to the script in macros.pybytecompile
# compile *.pyc
Expand Down Expand Up @@ -1075,7 +1072,6 @@ CheckPython optimized


%files
%license LICENSE
%doc README.rst

%if %{without flatpackage}
Expand All @@ -1098,13 +1094,14 @@ CheckPython optimized
%{_mandir}/*/python.1*

%files libs
%license LICENSE
%doc README.rst
%endif

%dir %{pylibdir}
%dir %{dynload_dir}

%license %{pylibdir}/LICENSE.txt

%{pylibdir}/lib2to3
%if %{without flatpackage}
%exclude %{pylibdir}/lib2to3/tests
Expand Down

0 comments on commit 46d035d

Please sign in to comment.