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.

classification
Title: test_distutils fails on os x 10.6
Type: behavior Stage:
Components: Distutils Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: tarek Nosy List: chuck, ned.deily, ronaldoussoren, tarek
Priority: normal Keywords:

Created on 2009-10-02 20:33 by chuck, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg93454 - (view) Author: Jan (chuck) * Date: 2009-10-02 20:33
FAIL: test_get_python_inc 
(distutils.tests.test_sysconfig.SysconfigTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distuti
ls/tests/test_sysconfig.py", line 54, in test_get_python_inc
    self.assert_(os.path.isdir(inc_dir), inc_dir)
AssertionError: /Users/ronald/Projects/python/r263/Include

----------------------------------------------------------------------
msg93459 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-10-02 22:46
What version of Python are you running precisely ?
msg93464 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-10-03 00:30
I don't know how it works on other platforms but test_get_python_inc is 
incorrect when run, as in this case, from a user-installed python rather 
than as part of a build of python.

The relevant code in test_sysconfig.py:

>>> (srcdir,) = sysconfig.get_config_vars('srcdir')
>>> srcdir
'/Users/ronald/Projects/python/r263'
>>> inc_dir = sysconfig.get_python_inc()
>>> inc_dir
'/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6'

That's where Python.h exists in an OS X framework install.  The srcdir 
captured is useless on other than the build machine; there is none.  
(People who build OS X python installers don't see this problem when 
they run the tests on a machine which happens to have a build directory 
in the same location.)
msg93466 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-10-03 00:53
Ok thanks,
msg93468 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-10-03 01:23
done in r75199 Thanks ! (this problem was fixed in trunk/py3k earlier,
so only concerns 2.6 branch)
msg93471 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-10-03 01:54
Thanks, I should have looked in trunk first.  I thought you had fixed this 
already.
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51288
2009-10-03 01:54:12ned.deilysetmessages: + msg93471
2009-10-03 01:23:00tareksetstatus: open -> closed

messages: + msg93468
versions: - Python 3.1, Python 2.7, Python 3.2
2009-10-03 00:53:54tareksetpriority: normal
resolution: accepted
messages: + msg93466

versions: + Python 2.6, Python 3.1, Python 3.2
2009-10-03 00:30:52ned.deilysetnosy: + ronaldoussoren, ned.deily
messages: + msg93464
2009-10-02 22:46:38tareksetnosy: + tarek
messages: + msg93459

assignee: tarek
components: + Distutils, - Library (Lib), Tests
2009-10-02 20:33:07chuckcreate