Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36944 > unrolled thread

Thorough Python 2.7.3 Windows Build Documentation?

Started by"Leonard, Arah" <Arah.Leonard@bruker-axs.com>
First post2013-01-17 15:29 +0000
Last post2013-01-17 18:25 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Thorough Python 2.7.3 Windows Build Documentation? "Leonard, Arah" <Arah.Leonard@bruker-axs.com> - 2013-01-17 15:29 +0000
    Re: Thorough Python 2.7.3 Windows Build Documentation? donarb <donarb@nwlink.com> - 2013-01-17 09:51 -0800
      RE: Thorough Python 2.7.3 Windows Build Documentation? "Leonard, Arah" <Arah.Leonard@bruker-axs.com> - 2013-01-17 18:25 +0000

#36944 — Thorough Python 2.7.3 Windows Build Documentation?

From"Leonard, Arah" <Arah.Leonard@bruker-axs.com>
Date2013-01-17 15:29 +0000
SubjectThorough Python 2.7.3 Windows Build Documentation?
Message-ID<mailman.591.1358436638.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

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:


  Arah.Leonard@bruker-axs.com<mailto:Arah.Leonard@bruker-axs.com>
  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.


[toc] | [next] | [standalone]


#36957

Fromdonarb <donarb@nwlink.com>
Date2013-01-17 09:51 -0800
Message-ID<6df5947a-5665-4b92-906d-5aba9e399b5b@d10g2000yqe.googlegroups.com>
In reply to#36944
On Jan 17, 7:29 am, "Leonard, Arah" <Arah.Leon...@bruker-axs.com>
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:
>
>   Arah.Leon...@bruker-axs.com<mailto:Arah.Leon...@bruker-axs.com>
>  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.

[toc] | [prev] | [next] | [standalone]


#36961

From"Leonard, Arah" <Arah.Leonard@bruker-axs.com>
Date2013-01-17 18:25 +0000
Message-ID<mailman.605.1358447110.2939.python-list@python.org>
In reply to#36957
>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 vars on 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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web