Bug 1566459 - python-devel ships .exe files
Summary: python-devel ships .exe files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1630906
TreeView+ depends on / blocked
 
Reported: 2018-04-12 11:11 UTC by Tomas Tomecek
Modified: 2019-02-18 10:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1633219 1633220 (view as bug list)
Environment:
Last Closed: 2019-02-18 10:55:22 UTC
Target Upstream Version:
rfontana: needinfo+


Attachments (Terms of Use)

Description Tomas Tomecek 2018-04-12 11:11:46 UTC
Description of problem:
...which can't be used on a linux system easily

$ rpm -ql -p python-devel-2.7.5-58.el7.x86_64.rpm| grep exe
/usr/lib64/python2.7/distutils/command/wininst-6.0.exe
/usr/lib64/python2.7/distutils/command/wininst-7.1.exe
/usr/lib64/python2.7/distutils/command/wininst-8.0.exe
/usr/lib64/python2.7/distutils/command/wininst-9.0-amd64.exe
/usr/lib64/python2.7/distutils/command/wininst-9.0.exe

$ file *.exe
wininst-9.0-amd64.exe: PE32+ executable (GUI) x86-64, for MS Windows
wininst-9.0.exe:       PE32 executable (GUI) Intel 80386, for MS Windows


Version-Release number of selected component (if applicable):
python-devel-2.7.5-58.el7.x86_64.rpm


Expected results:

No *.exe files are being shipped.

Comment 3 Petr Viktorin 2018-04-12 11:48:09 UTC
These files are stubs that get included in an archive to build Windows executable installers. (e.g. `python setup.py bdist_wininst`)

Removing them will disable this functionality.

Comment 4 Petr Viktorin 2018-04-12 11:51:26 UTC
See these Fedora bugs for context:
https://bugzilla.redhat.com/show_bug.cgi?id=525469#c5
https://bugzilla.redhat.com/show_bug.cgi?id=1426257

Comment 8 Petr Viktorin 2018-04-24 19:06:00 UTC
We can remove these, but I need guidance on the "Windows SDK license issue".

Should these files be removed from the SRPM also, or are they OK there?

Comment 9 Petr Viktorin 2018-06-07 14:11:55 UTC
ping. Can you please answer?

Comment 17 Victor Stinner 2018-09-06 13:43:54 UTC
Debian doesn't distribute wininst*.exe binaries in their python* packages. debian/rules explicitly removes thesee files:

find $(d) -name 'wininst*.exe' | xargs -r rm -f

Comment 18 Petr Viktorin 2018-09-07 11:46:16 UTC
The PSF is taking way too much time to respond. We need to do this downstream.

Comment 21 Victor Stinner 2018-09-07 12:59:00 UTC
On my Fedora 28, "python3 setup.py bdist_wininst" fails early because the code is really written for Windows:

$ python3 setup.py bdist_wininst
(...)
creating dist
Traceback (most recent call last):
  (...)
  File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/site-packages/setuptools/command/bdist_wininst.py", line 19, in run
    orig.bdist_wininst.run(self)
  File "/usr/lib64/python3.6/distutils/command/bdist_wininst.py", line 179, in run
    self.create_exe(arcname, fullname, self.bitmap)
  File "/usr/lib64/python3.6/distutils/command/bdist_wininst.py", line 262, in create_exe
    cfgdata = cfgdata.encode("mbcs")
LookupError: unknown encoding: mbcs

Removing .exe files from a Linux package is fine since the command never worked anyway on Linux.

Comment 22 Miro Hrončok 2018-10-18 15:01:03 UTC
Python Software Foundation replied back:


--------------------------
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: https://github.com/python/cpython/blob/master/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
--------------------------


So:

 * we don't need to include the exe files in the built packages
 * we don't need to strip them down from the SRPM

Comment 23 Petr Viktorin 2018-11-27 15:55:19 UTC
On Python 2, bdist_wininst currently works.
We need to provide a good error message, for example:

   Support for xreating Windows installers using bdist_wininst was removed for legal reasons. For more information, see https://bugzilla.redhat.com/show_bug.cgi?id=1566459

Comment 35 Victor Stinner 2019-02-18 10:55:22 UTC
Remove .exe can break legit applications running on RHEL7, whereas VanL, the PSF Layer, wrote that it's asafe to distribute these .exe files. See the discussion starting at:
https://mail.python.org/pipermail/python-dev/2018-October/155507.html

Comment 36 Victor Stinner 2019-02-18 10:55:49 UTC
> asafe

Oops, typo: you should read "safe" obviously :-)


Note You need to log in before you can comment on or make changes to this bug.