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 sbt
Date 2012-07-16.10:01:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342432899.52.0.53646689099.issue15364@psf.upfronthosting.co.za>
In-reply-to
Content
With unix, and a source build, sysconfig.get_config_var('srcdir') and sysconfig.get_path('include') misbehave:

  user@mint-vm ~/Repos/cpython $ cd /
  user@mint-vm / $ ~/Repos/cpython/python 
  Python 3.3.0b1 (default:671894ae19a2, Jul 16 2012, 10:43:27) 
  [GCC 4.5.2] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sysconfig
  >>> sysconfig.get_config_var('srcdir')
  '/'
  >>> sysconfig.get_path('include')
  '//Include'

The problem seems to be the else clause of

        if 'srcdir' not in _CONFIG_VARS:
            _CONFIG_VARS['srcdir'] = _PROJECT_BASE
        else:
            _CONFIG_VARS['srcdir'] = _safe_realpath(_CONFIG_VARS['srcdir'])

The else clause (in slightly modified form) was introduced in 356d0ea8ea34, and it turns a relative path into an absolute path, using the current working directory as a base.

For me, simply removing the line allows the absolute path to be calculated correctly a few lines later on.

I don't know what problem 356d0ea8ea34 was intended to fix.
History
Date User Action Args
2012-07-16 10:01:39sbtsetrecipients: + sbt
2012-07-16 10:01:39sbtsetmessageid: <1342432899.52.0.53646689099.issue15364@psf.upfronthosting.co.za>
2012-07-16 10:01:38sbtlinkissue15364 messages
2012-07-16 10:01:37sbtcreate