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 sbt
Recipients chris.jerdonek, eric.araujo, fdrake, ned.deily, ronaldoussoren, sbt, tarek
Date 2012-07-19.15:16:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342710988.56.0.0235861497841.issue15364@psf.upfronthosting.co.za>
In-reply-to
Content
> I'd make get_config_var('srcdir') to be None for installed systems, 
> because the source tree is not available there.

While playing with a version of the patch which returns None for non-source builds, I found that distutils.support._get_xxmodule_path() depends on get_config_var('srcdir') always returning a string:

def _get_xxmodule_path():
    srcdir = sysconfig.get_config_var('srcdir')
    candidates = [
        os.path.join(os.path.dirname(__file__), 'xxmodule.c'),
        os.path.join(srcdir, 'Modules', 'xxmodule.c'),
        os.path.join(srcdir, '..', '..', '..', 'Modules', 'xxmodule.c'),
    ]
    for path in candidates:
        if os.path.exists(path):
            return path

It is easy enough to modify _get_xxmodule_path() to check for None.  But this does suggest that returning None might break some currently working 3rd party code.
History
Date User Action Args
2012-07-19 15:16:29sbtsetrecipients: + sbt, fdrake, ronaldoussoren, tarek, ned.deily, eric.araujo, chris.jerdonek
2012-07-19 15:16:28sbtsetmessageid: <1342710988.56.0.0235861497841.issue15364@psf.upfronthosting.co.za>
2012-07-19 15:16:27sbtlinkissue15364 messages
2012-07-19 15:16:26sbtcreate