Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Thorough Python 2.7.3 Windows Build Documentation?

Reply
Thread Tools

Re: Thorough Python 2.7.3 Windows Build Documentation?

 
 
donarb
Guest
Posts: n/a
 
      01-17-2013
On Jan 17, 7:29*am, "Leonard, Arah" <(E-Mail Removed)>
wrote:
> Hello fellow Python programmers,
>
> I'm building a 32-bit CPython 2.7.3 distro for Windows using the MS Visual Studio Professional 2008 SP1 (and all hotfixes) MSVC 9 compiler. *My build works, technically, but it also happens to benchmark over 30% slower than the precompiled binaries in the distributed Python 2.7.3 MSI. *Can anyone point me in the direction of some thoroughly detailed build documentation so that I can figure out how to get that 30% back with my build? *The only documentation that I can find just says MSVC 9, period. *There's no mention of SP1 or not, hotfixes, nor of any specific compiler/linker optimizations used to build the official distro. *Something, somewhere, has to be significantly different between our builds for a 30% performance difference, and it'd probably be handy for the Python community to know how to avoid the same pitfall that cost me performance so that we can all get the most out of Python. *Any and all help will be greatly appreciated. *Thanks..
>
> Sincerely,
> Arah Leonard
>
> Arah Leonard
> Software Development Engineer
>
> Bruker AXS Inc.
> 5465 East Cheryl Parkway
> Madison, WI 53711
> US * * * Phone: +1 608-276-3812
> *Phone: +1 800-234-XRAY(9729)
> *Fax:
>
> * (E-Mail Removed)<(E-Mail Removed)>
> *www.bruker.com<http://www.bruker.com/>
>
> ________________________________
>
> The information contained in this email is confidential. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately.


Try dumping the build configuration parameters:

>>> import pprint, sysconfig
>>> pprint.pprint(sysconfig.get_config_vars())


Then you can compare the existing version with yours.
 
Reply With Quote
 
 
 
 
Leonard, Arah
Guest
Posts: n/a
 
      01-17-2013
>Try dumping the build configuration parameters:
>
> >>> import pprint, sysconfig
> >>> pprint.pprint(sysconfig.get_config_vars())

>
>Then you can compare the existing version with yours.


I would absolutely love to be able to do that and have it work. Most unfortunately that only works on *nix OSes. The Python sysconfig module's config vars are almost non-existent on Windows with a really tiny and almost useless subset. I really wish someone would fix that, but hey, it's free so I'm not complaining. Just wishing. In case anyone else didn't know that, here's the results containing the complete and total list of config varson Windows:

>>> import pprint, sysconfig
>>> pprint.pprint(sysconfig.get_config_vars())

{'BINDIR': 'C:\\Python27',
'BINLIBDEST': 'C:\\Python27\\Lib',
'EXE': '.exe',
'INCLUDEPY': 'C:\\Python27\\Include',
'LIBDEST': 'C:\\Python27\\Lib',
'SO': '.pyd',
'VERSION': '27',
'base': 'C:\\Python27',
'exec_prefix': 'C:\\Python27',
'platbase': 'C:\\Python27',
'prefix': 'C:\\Python27',
'projectbase': 'C:\\Python27',
'py_version': '2.7.3',
'py_version_nodot': '27',
'py_version_short': '2.7',
'srcdir': 'C:\\Python27',
'userbase': 'C:\\Documents and Settings\\Administrator\\Application Data\\Python'}

That's it. It's actually also a common cause of problems in distutils and the likes when people write their module installers for Linux and never test those scriptlets on Windows, not realizing that in Python on Windows the sysconfig / distutils.sysconfig config vars are hamstrung like that.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Thorough Python 2.7.3 Windows Build Documentation? Leonard, Arah Python 0 01-17-2013 06:10 PM
Re: Thorough Python 2.7.3 Windows Build Documentation? Stefan Krah Python 0 01-17-2013 05:29 PM
RE: Thorough Python 2.7.3 Windows Build Documentation? Leonard, Arah Python 0 01-17-2013 05:09 PM
Re: Thorough Python 2.7.3 Windows Build Documentation? Stefan Krah Python 0 01-17-2013 04:12 PM
Re: Thorough Python 2.7.3 Windows Build Documentation? Terry Reedy Python 0 01-17-2013 03:55 PM



Advertisments