Re: Thorough Python 2.7.3 Windows Build Documentation?

Discussion in 'Python' started by donarb, Jan 17, 2013.

  1. donarb

    donarb Guest

    On Jan 17, 7:29 am, "Leonard, Arah" <>
    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:
    >
    >   <mailto:>
    >  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.
    donarb, Jan 17, 2013
    #1
    1. Advertising

  2. >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.
    Leonard, Arah, Jan 17, 2013
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Terry Reedy
    Replies:
    0
    Views:
    115
    Terry Reedy
    Jan 17, 2013
  2. Stefan Krah
    Replies:
    0
    Views:
    124
    Stefan Krah
    Jan 17, 2013
  3. Leonard, Arah
    Replies:
    0
    Views:
    123
    Leonard, Arah
    Jan 17, 2013
  4. Stefan Krah
    Replies:
    0
    Views:
    141
    Stefan Krah
    Jan 17, 2013
  5. Leonard, Arah
    Replies:
    0
    Views:
    121
    Leonard, Arah
    Jan 17, 2013
Loading...

Share This Page