[New-bugs-announce] [issue21093] ctypes test_macholib fails if libz is not installed in /usr/lib

Nullpex report at bugs.python.org
Sat Mar 29 03:31:12 CET 2014


New submission from Nullpex:

I'm compiling on a Mac OS X 10.9.2.
Python version 3.4.0.
My libz --prefix is $HOME so the library is in $HOME/lib/
The issue is line 53 of Lib/ctypes/test/test_macholib.py which has /usr/lib/libz.1 hardcoded:

======================================================================
FAIL: test_find (ctypes.test.test_macholib.MachOTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/machados/src/Python-3.4.0/Lib/ctypes/test/test_macholib.py", line 53, in test_find
    self.assertTrue(result.startswith('/usr/lib/libz.1'))
AssertionError: False is not true

I've added a print before the assert command and the library is successfully found:

$ ./python.exe ./Lib/ctypes/test/test_macholib.py
/Users/machados/lib/libz.1.2.8.dylib
F
======================================================================
FAIL: test_find (__main__.MachOTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/machados/src/Python-3.4.0/Lib/ctypes/test/test_macholib.py", line 54, in test_find
    self.assertTrue(result.startswith('/usr/lib/libz.1'))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 1 test in 0.001s

As you can see the library is found in /Users/machados/lib/libz.1.2.8.dylib which is correct.

----------
components: ctypes
messages: 215107
nosy: nullpex
priority: normal
severity: normal
status: open
title: ctypes test_macholib fails if libz is not installed in /usr/lib
type: compile error
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21093>
_______________________________________


More information about the New-bugs-announce mailing list