Message165737
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). |
|
Date |
User |
Action |
Args |
2012-07-18 00:03:46 | ned.deily | set | recipients:
+ ned.deily, fdrake, ronaldoussoren, tarek, eric.araujo, chris.jerdonek, sbt |
2012-07-18 00:03:45 | ned.deily | set | messageid: <1342569825.85.0.523299655384.issue15364@psf.upfronthosting.co.za> |
2012-07-18 00:03:45 | ned.deily | link | issue15364 messages |
2012-07-18 00:03:43 | ned.deily | create | |
|