Ticket #63 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

Python ctypes module is broken

Reported by: davea Owned by: saurik
Priority: major Component: General
Keywords: Cc: dave@…

Description

The ctypes module is broken in the latest version of Python. It seems that the _ctypes module that does all the heavy lifting has been missed out of the package. However a file with a similar filename (/usr/lib/python2.5/lib-dynload/_ctypes_test.dylib) does exist but doesn't seem to provide equivalent functionality.

Steps to reproduce:

  1. Open the python interpreter on your iPhone using MobileTerminal or an ssh session
  2. Try to import the ctypes module by typing 'import ctypes'
  3. Observe failure to import module

Expected results:
The ctypes module is imported and available to use.

Actual results:
The ctypes module is not imported, and the following error is displayed:

>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/ctypes/__init__.py", line 10, in <module>
    from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes

I'm pretty sure this used to work with previous versions of Python.

Change History

Changed 7 months ago by davea

  • cc dave@… added

Changed 7 months ago by saurik

  • status changed from new to closed
  • resolution set to fixed

This has been fixed in 2.5.1-15. I found some support for LIBRARY_PATH and C_INCLUDE_PATH, which Python was only using on AtheOS for some lame reason, and both activated it and extended it for CPATH. I then modified the db and sqlite specialized search routines to use these paths as their base rather than starting over with their own path lists. I think all these path issues should now be fixed, and we can all stop using my stupidly old 2.5.1-10 ;P.

Note: See TracTickets for help on using tickets.