Skip to content


robertwb edited this page · 4 revisions
Clone this wiki locally

CEP 106 - Package pxds for common libraries with Cython

Cython now ships (as of with the following standard .pxd's:
  • numpy.pxd
  • stdio.pxd
  • stdlib.pxd
  • python.pxd
  • python2.5.pxd
  • python_bool.pxd
  • python_buffer.pxd
  • python_complex.pxd
  • python_dict.pxd
  • python_exc.pxd
  • python_float.pxd
  • python_function.pxd
  • python_instance.pxd
  • python_int.pxd
  • python_iterator.pxd
  • python_list.pxd
  • python_long.pxd
  • python_mapping.pxd
  • python_mem.pxd
  • python_method.pxd
  • python_module.pxd
  • python_number.pxd
  • python_object.pxd
  • python_parse.pxd
  • python_ref.pxd
  • python_sequence.pxd
  • python_set.pxd
  • python_string.pxd
  • python_tuple.pxd
  • python_type.pxd

Original CEP

Cython should ship with a list of .pxd files for standard libraries, so that users can get up and running quickly rather than having to wrap their own. They could just do "cimport numpy" and it would find numpy.pxd in the cython-shipped include directory (although they would of course have to have numpy on their system to make it actually work). Pluggins, if needed, would be provided as well. Libraries to link and needed compile flags could be specified in these pxd files (see the build enhancement proposal)

To start, it would be nice to wrap:
  • The basic clib functions (stdio, stdmath, stdlib, etc).
  • The Python/C API (we already have this. Hopefully users won't need it much)
  • numpy
  • gmp
  • gsl
  • ntl


(This list is partially motivated by the fact we have much of this done already in Sage.)

Something went wrong with that request. Please try again.