#33 Keep the LICENSE.txt file in lib/pythonX.Y dir
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/python38 license  into  master

file modified
+2 -5
@@ -904,9 +904,6 @@ 

  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
@@ -1058,7 +1055,6 @@ 




- %license LICENSE

  %doc README.rst


  %if %{without flatpackage}
@@ -1079,13 +1075,14 @@ 



  %files libs

- %license LICENSE

  %doc README.rst



  %dir %{pylibdir}

  %dir %{dynload_dir}


+ %license %{pylibdir}/LICENSE.txt



  %if %{without flatpackage}

  %exclude %{pylibdir}/lib2to3/tests

The license() builtin tries to read it and virtualenv tries to copy it.

See https://github.com/pypa/virtualenv/issues/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

This fix is not critical and hence it doesn't bump release, for easier
backporting to all our Python packages.

I would just say don't delete it from the location it installs by default, and keep installing the file into /usr/share/licenses as well. That's the location we tell everyone to locate licenses of software, and it'd be bad to break that.

I've considered %license like %doc - either you use a relative path and it ends up in /usr/share/licenses or you just mark an absolute path as %license.

I wonder whether we can put a symbolic link to /usr/share/licenses...

rebased onto ff90d23

2 years ago

It looks good, merge it!

Pull-Request has been merged by churchyard

2 years ago

OK. Needs backporting to "all the Pythons".

I'll take care of that and also make sure that all of them provide pythonX.Y as well (as does this one for a longer time already).