Make sure we don't ship any exe files (not needed an prebuilt)

Such files are only used to create Microsoft Windows installers
and that functionality is broken on Linux anyway.

We can keep the exe files in SRPM, as they are free software as
confirmed by the Python Software Foundation:

> Hello,
>
> Shipping and distributing these files is ok.
>
> These files are stubs, used as the executable part of a self-unzipping
> executable and showing an "installer window" to the user.
> They are original to Python and, while they call win32 functions,
> they don't have Windows SDK code in them.
> The source is at: PC/bdist_wininst/install.c
>
> The binaries are included so that anyone creating a bdist_wininst
> distribution (mostly deprecated, actually) can do so, even when
> cross-compiling.
>
> Thanks,
> Van (Lindberg)

See also https://mail.python.org/pipermail/python-dev/2018-October/155507.html
This commit is contained in:
Miro Hrončok 2018-12-07 10:03:24 +01:00
parent 5258d1d194
commit 1092d478f5
1 changed files with 8 additions and 3 deletions

View File

@ -14,7 +14,7 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.1
Release: 4%{?dist}
Release: 5%{?dist}
License: Python
@ -627,6 +627,10 @@ version once Python %{pybasever} is stable.
%prep
%setup -q -n Python-%{version}%{?prerel}
# Remove all exe files to ensure we are not shipping prebuilt binaries
# note that those are only used to create Microsoft Windows installers
# and that functionality is broken on Linux anyway
find -name '*.exe' -print -delete
# Remove bundled libraries to ensure that we're using the system copy.
rm -r Modules/expat
@ -1283,7 +1287,6 @@ CheckPython optimized
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
%{pylibdir}/distutils/README
%{pylibdir}/distutils/command
%exclude %{pylibdir}/distutils/command/wininst-*.exe
%dir %{pylibdir}/email/
%dir %{pylibdir}/email/__pycache__/
@ -1353,7 +1356,6 @@ CheckPython optimized
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
%endif
%{pylibdir}/distutils/command/wininst-*.exe
%{_includedir}/python%{LDVERSION_optimized}/*.h
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
@ -1575,6 +1577,9 @@ CheckPython optimized
# ======================================================
%changelog
* Fri Dec 07 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-5
- Make sure we don't ship any exe files (not needed an prebuilt)
* Wed Nov 21 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-4
- Make sure the entire test.support module is in python3-libs (#1651245)