Issue 983775: Allow bdist_wininst to install for non-admin users (original) (raw)

Attached is a patch which allows a distutils binary installation to work when Python is installed by a non-admin, and the extension is also to be installed by a non-admin user.

It makes the following changes:

Another change in this patch is that 'tempnam()' is used rather than 'tmpnam()' - 'tmpnam' creates a temp file on the root of the current drive, and if this is readonly would explain the 'freopen' errors occasionally reported. 'tempnam' creates the temp file in the %TEMP% directory.

I've tested this when Python is installed by an admin, but the person installing the extension does not have admin permissions. Assuming the user has write permissions into the Python directory, this works correctly.

As usual, assigning to Thomas for comment/review.