[issue15364] sysconfig confused by relative paths

2012-08-13 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15364] sysconfig confused by relative paths

2012-07-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > One example is 'srcdir': this value is only useful in the build tree and > there currently is no clean way to signal that you are retrieving a > value that is not useful. In the particular case of 'srcdir', sysconfig.is_python_build() tells you whether the

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset c2618b916081 by Ned Deily in branch 'default': Issue #15364: Fix test_srcdir for the installed case. http://hg.python.org/cpython/rev/c2618b916081 -- ___ Python tracker

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: The current patch should be fine, although it is IMHO not the long-term solution. For installed python's get_config_var('srcdir') still lies, but now at least returns slightly more sane path. As I noted before the real problem is that it is not clear which c

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Éric Araujo
Éric Araujo added the comment: Okay, so LGTM. Let’s ask the RMs if this is a new behavior or a bugfix. -- nosy: +benjamin.peterson, georg.brandl versions: +Python 3.4 -Python 3.3 ___ Python tracker __

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset d2f448dbc30d by Richard Oudkerk in branch 'default': Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path. http://hg.python.org/cpython/rev/d2f448dbc30d -- nosy: +python-dev ___ Py

[issue15364] sysconfig confused by relative paths

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Does get_config_var('srcdir') always return a string or sometimes None? Always a string. distutils.support._get_xxmodule_path() is one place which (currently) would throw an exception if it returned None. -- __

[issue15364] sysconfig confused by relative paths

2012-07-26 Thread Éric Araujo
Éric Araujo added the comment: Does get_config_var('srcdir') always return a string or sometimes None? -- ___ Python tracker ___ ___

[issue15364] sysconfig confused by relative paths

2012-07-26 Thread Ned Deily
Ned Deily added the comment: LGTM -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue15364] sysconfig confused by relative paths

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: Any objection if I commit the last patch before the next beta? This is the one which on installed Pythons have get_config_var('srcdir') == os.path.dirname(get_makefile_filename()) on posix systems. -- ___ Py

[issue15364] sysconfig confused by relative paths

2012-07-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: > 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() de

[issue15364] sysconfig confused by relative paths

2012-07-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'd make get_config_var('srcdir') to be None for installed systems, because the source tree is not available there. The advantage of making the value None is that this is easy to test for and would quickly break path manipulation code that tries to construct

[issue15364] sysconfig confused by relative paths

2012-07-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: Forgot to remove some unnecessary code in patch. -- Added file: http://bugs.python.org/file26427/sysconf.patch ___ Python tracker ___

[issue15364] sysconfig confused by relative paths

2012-07-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: Here is an updated patch which also modifies distutils.sysconfig. For "installed" pythons on posix systems it makes get_config_var('srcdir') == os.path.dirname(get_makefile_filename()) (The older patches would give the same result only if the relative sr

[issue15364] sysconfig confused by relative paths

2012-07-17 Thread Éric Araujo
Éric Araujo added the comment: Agree on fixing this for 3.3, if it’s not possible to backport to all stable branches. Will review. -- versions: +Python 3.3 ___ Python tracker

[issue15364] sysconfig confused by relative paths

2012-07-17 Thread Ned Deily
Ned Deily added the comment: I should have noted that, in the above tests, distutils.sysconfig.get_makefile_filename() is already doing the right thing: >>> dsc.get_makefile_filename() '/py/dev/default/b10.7_t10.7_x4.3_cclang_d/fw/root/Library/Frameworks/pytest_10_7.framework/Versions/3.3/lib/

[issue15364] sysconfig confused by relative paths

2012-07-17 Thread Ned Deily
Ned Deily added the comment: 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

[issue15364] sysconfig confused by relative paths

2012-07-17 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Beyond that, I don't understand why the patch behavior depends on > whether the srcdir is an absolute path or not. The os.path.isabs() test is actually redundant since os.path.join(base, srcdir) == srcdir if srcdir is an absolute path. I only added that t

[issue15364] sysconfig confused by relative paths

2012-07-17 Thread Ned Deily
Ned Deily added the comment: > This is a little arbitrary, but seems as sensible a value as any other. > (Or maybe it would be better to have get_config_var('srcdir') == None > instead.) 'srcdir' is problematic for any installed build. Once "make install" has been performed, there is no oblig

[issue15364] sysconfig confused by relative paths

2012-07-17 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated patch which clarifies that for an installed python on a posix system, get_config_var('srcdir') == get_path('stdlib'). Eg, if sys.executable == '/usr/local/bin/python3.3' then get_config_var('srcdir') == '/usr/local/lib/python3.3'. This is a little a

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: In the attached patch _safe_realpath() is only called after calculating the absolute path for srcdir. -- keywords: +patch Added file: http://bugs.python.org/file26407/sysconf.patch ___ Python tracker

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: Issue 15322 is a recently filed bug regarding srcdir: "sysconfig.get_config_var('srcdir') returns unexpected value" -- nosy: +cjerdonek ___ Python tracker ___

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: srcdir vs. project base is quite easy: srcdir is the directory containing the source files, the project base is where you ran configure. These are the same if you run configure in the root of a checkout, but don't have to be, for example when you do: $ mkdi

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Éric Araujo
Éric Araujo added the comment: I have to add that I’m quite confused by srcdir vs. projectbase. There are a handful of open bugs related to sysconfig and built but uninstalled Pythons, and many commits changing code to use srcdir or projectbase after empirical testing or buildbot failures. :

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Éric Araujo
Éric Araujo added the comment: It is actually simple to find the revision: http://hg.python.org/lookup/r81999 :) -- ___ Python tracker ___ _

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I don't recall what the issue was the resulted in the check-in that you > mention. I think it was http://bugs.python.org/issue8577. The issue was about having srcdir != builddir. The initial patch caused a test failure, and 356d0ea8ea34 fixed (or at leas

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't recall what the issue was the resulted in the check-in that you mention. Sadly enough it is not-trivial to find that check-in I mention due to the migration from Subversion to Mercurial. How was python itself configured (configure command line)? What

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Richard Oudkerk
New submission from Richard Oudkerk : 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)