Question regarding building Python Windows installer

Mcadams, Philip W philip.w.mcadams at intel.com
Mon Jul 15 14:02:08 EDT 2013


Thanks for the reply Zachery. We have decided to just use another solution. Out of curiosity though I wanted to clarification on your statement:

just stick the hg modules somewhere on PYTHONPATH.

Are you saying that I would just map hg modules i.e.: C:\Users\pwmcadam\Downloads\Python-2.7.4\Python-2.7.4\Modules to my environment variables in Windows.

Wasn't exactly following your comment.

Thank you.

Philip McAdams
Systems Administrator - NVM Solutions Group Systems Engineering Apps & Infrastructure
Desk: (916) 377-6156 Cell: (916) 534-0092 Pole: FM3-1-D7



-----Original Message-----
From: zachary.ware at gmail.com [mailto:zachary.ware at gmail.com] On Behalf Of Zachary Ware
Sent: Monday, July 15, 2013 8:47 AM
To: Mcadams, Philip W
Cc: python-list at python.org
Subject: Re: Question regarding building Python Windows installer

On Mon, Jul 15, 2013 at 8:11 AM, Mcadams, Philip W <philip.w.mcadams at intel.com> wrote:
> I’m attempting to create a Python 64-bit Windows Installer.  Following 
> the instructions here: 
> http://docs.python.org/2/distutils/builtdist.html I’m to navigate to my Python folder and user command:
>
>
>
> python setup.py build --plat-name=win-amd64 bdist_wininst
>
>
>
> I get error: COMPILED_WTH_PYDEBUG = (‘—with-pydebug’ in
> sysconfig.get_config_var(“CONFIG_ARGS”))
>
> TypeError: argument of type ‘NoneType’ is not iterable
>
>
>
> I also have tried:
>
>
>
> setup.py build --plat-name=win-amd64 bdist_wininst
>
>
>
> and get error:
>
>
>
> File “setup.py”, line 263
>
> Print “%-*s %-*s %-*s” % (longest, e, longet, f,
>
>
>
> SyntaxError: invalid syntax
>
>
>
> I followed the instructions here: 
> http://docs.python.org/devguide/setup.html
> to create a PC build for Windows which allows me to run a Python prompt.
> Now I need to create a Windows Installer to install this Python on a 
> Windows Server 2008 R2 box.
>
>
>
> To explain why I’m attempting to do this instead of just using the 
> Windows Installer provided by Python:
>
>
>
> I needed to modify a _ssl.c file in the Python source code to deal a 
> Mercurial that I’m trying to resolve.
>
>
>
> Any help on why I’m hitting these errors would be appreciated.
>
>
>
> Thank you.
>
>

Most of your problem is that setup.py is just for the extension modules of the standard library, not the interpreter and all.  The rest of your problem is that setup.py is really just not Windows-friendly, relying on some Makefile vars and Modules/Setup.

Do you really need to install it?  If you're still in the testing phase, would it be enough to just copy the source tree (with compiled
interpreter) to the box you need it on?  You can still use Mercurial with it, just stick the hg modules somewhere on PYTHONPATH.

If you really do need an installer, I would suggest trying out Tools/buildbot/buildmsi.bat and see if you can get it to work for you.
 I will warn you, buildmsi.bat is not well maintained and it may take quite a bit of effort to make it work.

HTH,

--
Zach


More information about the Python-list mailing list