summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bradshaw <robertwb@gmail.com>2016-07-07 12:21:07 -0700
committerStefan Behnel <stefan_ml@behnel.de>2016-07-15 08:21:41 +0200
commit7fa11da9a20cecab6e912c690d4ac33e69d4f986 (patch)
treed070288a1322a15e81d731c8e22d73ff9cc2dfe5
parentd9b29b33051c4db74e7ae0f3e5b56a8e9780819c (diff)
downloadcython-7fa11da9a20cecab6e912c690d4ac33e69d4f986.tar.gz
Example of using package_data for pxd files.
-rw-r--r--docs/src/reference/compilation.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/src/reference/compilation.rst b/docs/src/reference/compilation.rst
index 837506249..5637d0ec5 100644
--- a/docs/src/reference/compilation.rst
+++ b/docs/src/reference/compilation.rst
@@ -222,6 +222,20 @@ list in the Extensions when not using Cython::
extension.sources[:] = sources
return extensions
+If you want to expose the C-level interface of your library for other
+libraries to cimport from, use package_data to install the ``.pxd`` files,
+e.g.::
+
+ setup(
+ package_data = {
+ 'my_package': ['*.pxd'],
+ 'my_package/sub_package': ['*.pxd'],
+ },
+ ...
+ )
+
+These ``.pxd`` files need not correspond have corresponding ``.pyx``
+modules if they contain purely declarations of external libraries.
Compiling with ``pyximport``
=============================