#12 Keep the LICENSE file in lib/pythonX.Y dir
Merged 2 months ago by churchyard. Opened 2 months ago by churchyard.
rpms/ churchyard/pypy3 license  into  master

file modified
+3 -5

@@ -688,7 +688,6 @@ 

  

  # 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 @@ 

  %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 @@ 

  %endif

  

  %files

- %license LICENSE

  %doc README.rst

  %{_bindir}/pypy3

  %{_bindir}/pypy%{pyversion}

@@ -862,7 +861,6 @@ 

  

  %if 0%{with_stackless}

  %files stackless

- %license LICENSE

  %doc README.rst

  %{_bindir}/pypy-stackless

  %endif

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://bitbucket.org/pypy/pypy/src/default/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.

See also https://src.fedoraproject.org/rpms/python38/pull-request/33

When this builds, it needs to be tested with https://src.fedoraproject.org/rpms/python-virtualenv/pull-request/9

This removes the virtualenv warning and license() wokr in virtualenvs, but is still just shows the link outside of it :(

Looking at the code, It cannot work. No idea how it works in virtualenv.

rebased onto 7fc9514

2 months ago

I've amended the commit message accordingly.

Pull-Request has been merged by churchyard

2 months ago