Bug 525469

Summary: windows executable inside package
Product: [Fedora] Fedora Reporter: Sergei LITVINENKO <sergei.litvinenko>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dmalcolm, ivazqueznet, james.antill, jonathansteffan, katzj, mclasen, mrunge, sergei.litvinenko
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-12 15:57:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergei LITVINENKO 2009-09-24 14:04:05 UTC
Description of problem:

/usr/lib/python2.6/distutils/command/wininst-7.1.exe
/usr/lib/python2.6/distutils/command/wininst-6.0.exe
/usr/lib/python2.6/distutils/command/wininst-8.0.exe
/usr/lib/python2.6/distutils/command/wininst-9.0-amd64.exe
/usr/lib/python2.6/distutils/command/wininst-9.0.exe

file /usr/lib/python2.6/distutils/command/wininst-7.1.exe
/usr/lib/python2.6/distutils/command/wininst-7.1.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit

Version-Release number of selected component (if applicable):
python-2.6.2-2.fc12.i686

How reproducible:
100%

Steps to Reproduce:
1. ll /usr/lib/python2.6/distutils/command/*.exe
2.
3.
  
Actual results:
windows executable there are


Expected results:
No windows executable in standard python package.

Additional info:

Comment 1 Fabian Affolter 2009-09-29 21:43:31 UTC
Isn't this bug filled against the wrong component (pysnmp)? Shouldn't it be python itself?

Comment 2 Fabian Affolter 2009-10-23 13:42:55 UTC
ping?

Comment 3 Sergei LITVINENKO 2009-10-23 17:13:56 UTC
IMHO, nobody cares

Fedora-11:

[sergeil@homedesk ~]$ ls -1 /usr/lib/python2.6/distutils/command/*.exe
/usr/lib/python2.6/distutils/command/wininst-6.0.exe
/usr/lib/python2.6/distutils/command/wininst-7.1.exe
/usr/lib/python2.6/distutils/command/wininst-8.0.exe
/usr/lib/python2.6/distutils/command/wininst-9.0-amd64.exe
/usr/lib/python2.6/distutils/command/wininst-9.0.exe

$ rpm -qf /usr/lib/python2.6/distutils/command/*.exe | sort | uniq
python-2.6-11.fc11.i586



Fedora-12 (beta)

[root@eee901 ~]# ls -1 /usr/lib/python2.6/distutils/command/*.exe
/usr/lib/python2.6/distutils/command/wininst-6.0.exe
/usr/lib/python2.6/distutils/command/wininst-7.1.exe
/usr/lib/python2.6/distutils/command/wininst-8.0.exe
/usr/lib/python2.6/distutils/command/wininst-9.0-amd64.exe
/usr/lib/python2.6/distutils/command/wininst-9.0.exe

# rpm -qf /usr/lib/python2.6/distutils/command/*.exe | sort | uniq
python-2.6.2-2.fc12.i686

Comment 4 Fabian Affolter 2009-10-24 11:03:25 UTC
pysmnp is the wrong component. You are talking about python.

Comment 5 Dave Malcolm 2009-11-06 22:11:12 UTC
Thanks for filing this bug report.

From my reading of /usr/lib/python2.6/distutils/command/bdist_wininst.py the .exe files are templates that are used when constructing installers for python modules; the installer is formed from one of those files at the front, with the content glued to the back.

Attempting to run this on an F11 box to create a windows installer for a simple package gives this:
$ python setup.py bdist_wininst
running bdist_wininst
running build
running build_py
creating build
(...snip many lines...)
creating dist
Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules _winreg, win32api or win32con are installed.
removing 'build/bdist.linux-i686/wininst' (and everything under it)

However, the above warning is non-fatal, and it creates a .exe file in the dist subdir that appears to work (briefly tested in Wine).

So the .exe files are actually useful on Linux for some use cases.

$ du -h /usr/lib/python2.6/distutils/command/*.exe
60K	/usr/lib/python2.6/distutils/command/wininst-6.0.exe
64K	/usr/lib/python2.6/distutils/command/wininst-7.1.exe
60K	/usr/lib/python2.6/distutils/command/wininst-8.0.exe
220K	/usr/lib/python2.6/distutils/command/wininst-9.0-amd64.exe
192K	/usr/lib/python2.6/distutils/command/wininst-9.0.exe

...giving 596K of disk usage for a rarely-used feature in a package that's installed on most systems.

Comment 6 Dave Malcolm 2009-11-06 22:19:17 UTC
> $ du -h /usr/lib/python2.6/distutils/command/*.exe
> 60K /usr/lib/python2.6/distutils/command/wininst-6.0.exe
> 64K /usr/lib/python2.6/distutils/command/wininst-7.1.exe
> 60K /usr/lib/python2.6/distutils/command/wininst-8.0.exe
> 220K /usr/lib/python2.6/distutils/command/wininst-9.0-amd64.exe
> 192K /usr/lib/python2.6/distutils/command/wininst-9.0.exe
> 
> ...giving 596K of disk usage for a rarely-used feature in a package that's
> installed on most systems.  

mclasen: IIRC you're fighting a constant battle for disk space on LiveCDs.  How significant a saving would the above be?

Comment 7 Matthias Clasen 2009-11-06 22:34:51 UTC
I've taken smaller savings in the past, but we are not in immediate emergency mode atm.

Comment 8 Bug Zapper 2009-11-16 12:51:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Jonathan Steffan 2010-04-10 20:39:03 UTC
Would it make sense to move these to the devel subpackage? I don't want to break being able to build for MS Windows from Fedora but afaik these will never be needed during runtime, only when doing build. This would make it so we don't lose this feature completely, but will give us the space savings for the python runtime package.

Comment 10 Dave Malcolm 2010-04-12 15:57:12 UTC
Good idea - I've moved them to the -devel subpackage in python-2.6.5-6.fc14 as part of this commit
http://cvs.fedoraproject.org/viewvc/rpms/python/devel/python.spec?r1=1.181&r2=1.182

Comment 11 Miro HronĨok 2017-02-23 15:36:18 UTC
*** Bug 1426250 has been marked as a duplicate of this bug. ***