This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: it would be nice if installers made by bdist_wininst stored an EstimatedSize property in the Windows registry
Type: enhancement Stage: resolved
Components: Distutils Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: tarek Nosy List: eric.araujo, jasonspiro, loewis, tarek
Priority: low Keywords:

Created on 2008-08-20 16:14 by jasonspiro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
testcase.zip jasonspiro, 2008-08-20 16:16 testcase: basically just some sample code from the distutils documentation
Messages (6)
msg71554 - (view) Author: Jason Spiro (jasonspiro) Date: 2008-08-20 16:14
== Summary ==

Installers made by bdist_wininst never set EstimatedSize in the Windows 
registry.  So Windows makes an estimate[1] of the installed software's 
size so the Add/Remove Programs control panel can tell users how much 
space the software is are taking up.  Windows overestimates the size: 
it estimates the size as equal to the size of the entire C:\Python 
directory.

Nowadays, disk space is cheaper than ever, so I assume it's uncommon 
for people to try to uninstall software to gain space back.  So I do 
not think it's worth fixing this bug.  Does anyone think it *is* worth 
fixing?

== Steps to repro ==

You *must* be running Windows XP or higher to repro this.[2]  I used 
Python 2.5 (which I installed using the MSI installer) but I would be 
extremely surprised if this was already fixed in a newer Python's 
distutils.

- Download the attached testcase.zip
- Unzip it to a temp directory
- From the temp directory, run the commands:
        setup.py bdist_wininst
        cd dist
        foo-1.0.win32.exe
- Click on Start Menu > Settings > Control Panel > Add/Remove Programs
- Scroll down to "Python 2.5 foo-1.0".

== Actual results ==

- The "Size" column on the right says 46.86MB (that's the size of my 
entire "C:\Python 2.5" directory.)

== Expected results ==

- The "Size" column on the right should say something close to 0.1 
megabytes.

== Suggested fix ==

- When creating an installer, bdist_wininst should look at the total 
size of all files to install, multiply that number by 3 (a reasonable 
estimate of the total size the .pyc and .pyo files will take up), and 
make the installer set the EstimatedSize[3] in the registry to that 
number.

== Footnotes ==

^ [1].  See the blog entry "How does Add/Remove Programs get the size 
and other information?" by Raymond Chen at 
http://blogs.msdn.com/oldnewthing/archive/2004/07/09/178342.aspx for 
info on the algorithm Windows uses.

^ [2].  Versions of Windows older than XP never try to estimate the 
size of installed programs.

^ [3].  This is 
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\(application 
descriptor)\EstimatedSize and should be a DWORD representing the number 
of kilobytes the software takes up, according to 
http://forum.installsite.net/?showtopic=698#entry12501
msg71556 - (view) Author: Jason Spiro (jasonspiro) Date: 2008-08-20 16:16
Attaching testcase.  It's basically just some sample code from the 
distutils documentation.
msg101101 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-03-15 13:06
Can you provide a patch?
msg101169 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-03-16 14:23
Moving the target to Distutils2, as Distutils is now feature frozen.
msg105611 - (view) Author: Jason Spiro (jasonspiro) Date: 2010-05-12 22:56
> Can you provide a patch?

Unfortunately not.  I still don't think it's worth fixing this bug.  :)  I think you should document it in the bdist_wininst documentation then close this bug as "won't fix due to lack of volunteer resources".  That way the problem will be documented both here and in that documentation, but nobody need spend the time to fix such a minor bug.

Or at least you should lower this bug's priority to the lowest setting.
msg213462 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-13 20:35
Closing per OP’s message.
History
Date User Action Args
2022-04-11 14:56:37adminsetgithub: 47871
2014-03-13 20:35:09eric.araujosetstatus: open -> closed

components: + Distutils, - Distutils2
versions: - 3rd party
nosy: + eric.araujo

messages: + msg213462
resolution: rejected
stage: resolved
2010-09-29 23:47:26eric.araujosetversions: + 3rd party, - Python 3.1, Python 2.7
2010-05-13 00:06:30loewissetpriority: normal -> low
2010-05-12 22:56:50jasonspirosetmessages: + msg105611
2010-03-16 14:23:29tareksetmessages: + msg101169
components: + Distutils2, - Distutils
2010-03-15 13:06:12loewissetnosy: + loewis
messages: + msg101101
2009-02-06 09:15:42tareksetassignee: tarek
nosy: + tarek
versions: + Python 3.1, Python 2.7
2008-08-20 16:16:21jasonspirosetfiles: + testcase.zip
messages: + msg71556
2008-08-20 16:14:09jasonspirocreate