This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients chris.jerdonek, eric.araujo, fdrake, ned.deily, ronaldoussoren, sbt, tarek
Date 2012-07-18.00:03:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342569825.85.0.523299655384.issue15364@psf.upfronthosting.co.za>
In-reply-to
Content
Upon further consideration, while it sounds appealing, perhaps returning None is not the better choice. As far as I know, up until now all config vars are either of type str or type int.  Adding None to the mix might be asking for trouble.

With no patch, running from an installed framework build:
>>> sys.executable
'/py/dev/default/b10.7_t10.7_x4.3_cclang_d/fw/root/bin/python3.3'
>>> import sysconfig as sc, distutils.sysconfig as dsc
>>> sc.is_python_build()
False
>>> sc.get_config_var('srcdir')
'/py/dev/default/b10.7_t10.7_x4.3_cclang_d'
>>> dsc.get_config_var('srcdir')
'.'

With the latest patch, as above:
>>> sys.executable
'/py/dev/default/b10.7_t10.7_x4.3_cclang_d/fw/root/bin/python3.3'
>>> import sysconfig as sc, distutils.sysconfig as dsc
>>> sc.is_python_build()
False
>>> sc.get_config_var('srcdir')
'/py/dev/default/b10.7_t10.7_x4.3_cclang_d/fw/root/Library/Frameworks/pytest_10_7.framework/Versions/3.3/lib/python3.3/config-3.3dm'
>>> dsc.get_config_var('srcdir')
'.'

The patched results looks OK except, of course, for the discrepancy with distutils.sysconfig.  I think we should fix that and get this all into 3.3.0.  Otherwise we'll be stuck with the current broken behavior until 3.4 at the earliest.

One nit comment on the currrent patch: s/"will not effect it"/"will not affect it" (one of those gotchas in English).
History
Date User Action Args
2012-07-18 00:03:46ned.deilysetrecipients: + ned.deily, fdrake, ronaldoussoren, tarek, eric.araujo, chris.jerdonek, sbt
2012-07-18 00:03:45ned.deilysetmessageid: <1342569825.85.0.523299655384.issue15364@psf.upfronthosting.co.za>
2012-07-18 00:03:45ned.deilylinkissue15364 messages
2012-07-18 00:03:43ned.deilycreate