Title: Compiled bdist_wininst missing from embedded distribution
Type: compile error Stage:
Components: Windows Versions: Python 3.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: denimpowell, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-07-25 19:28 by denimpowell, last changed 2016-07-26 20:44 by steve.dower. This issue is now closed.

Messages (5)
msg271301 - (view) Author: Michael Smith (denimpowell) Date: 2016-07-25 19:28
It seems that the embedded distribution is missing bdist_wininst.pyc from the .  If you go to distutils\command, you'll notice only 23 compiled python files, where in the regular web based installer for the same Python version there are 24 python files in similar relevant folder.  I encountered this while trying to install a library into the python runtime that had this import statement:

import distutils.command.bdist_wininst
msg271307 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-07-25 21:12
This is deliberate. You should "vendor" packages into the embedded distro by copying them from an install into a regular one. Your application installer should put the correct files onto the user's machine - don't rely on pip.

If that last sentence didn't make sense, then you probably shouldn't be using the embedded distro. If you're just looking for a lightweight install of Python that doesn't have any obvious entry points or registration, see whether fits your needs.
msg271308 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-07-25 21:13
Also, the doc page at describes this in more detail. (Though it doesn't yet refer to the Nuget packages as those are an experiment that I may or may not continue.)
msg271410 - (view) Author: Michael Smith (denimpowell) Date: 2016-07-26 19:20
Thanks so much Steve I got it working right away!

I peeked into the and saw that it also depended on some local exe files.  Copied both of those to the embedded and everything worked like a charm.  I did read the documentation previously so I thought the only real dependency was the C Runtime.  Working on a network without any net access I have to bring in libraries we version, so basically what you describe "vendoring".

If you have time to answer I would like to understand why this particular item is not part of the embedded.  Or why is it in the regular install by default?  When I look at the distutils documentation there is very little information about this file.  Is this particular item a 3rd party not core python or?  In any case thanks for the help again.
msg271411 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-07-26 20:44
It's core Python, but it's specifically intended for producing redistributable installers containing Python packages. This is not something that the embedded distro is meant for, and it neatens things up to omit them.

There is very little information because it's considered an internal implementation detail (otherwise it would be thoroughly documented). That said, because of the narrower use case for the embedded distro, omitting even thoroughly documented modules would be okay if it didn't make sense in this context (e.g. the turtledemo module is documented, but also not in the embedded distro).
Date User Action Args
2016-07-26 20:44:53steve.dowersetmessages: + msg271411
2016-07-26 19:20:13denimpowellsetmessages: + msg271410
2016-07-25 21:13:01steve.dowersetmessages: + msg271308
2016-07-25 21:12:04steve.dowersetstatus: open -> closed
resolution: not a bug
messages: + msg271307
2016-07-25 19:46:59ned.deilysetnosy: + paul.moore, tim.golden, zach.ware, steve.dower, - eric.araujo, dstufft
components: + Windows, - Distutils
2016-07-25 19:28:00denimpowellcreate