From 32fd7b5a6bfb3d468cde8da17de4ad311b1ebdc1 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Wed, 27 May 2015 15:05:14 +0200 Subject: [PATCH] rename falsly named files *.pyx in *.pxd ;-) --- doc/.gitignore | 1 + python/obitools3/obidms/capidms.pxd | 19 ++++++++++++++++ python/obitools3/obidms/capidms.pyd | 19 ---------------- python/obitools3/obidms/capidms.pyx | 22 +++---------------- .../{capidmscolumn.pyd => capidmscolumn.pxd} | 0 5 files changed, 23 insertions(+), 38 deletions(-) create mode 100644 python/obitools3/obidms/capidms.pxd delete mode 100644 python/obitools3/obidms/capidms.pyd rename python/obitools3/obidms/obidmscolumn/{capidmscolumn.pyd => capidmscolumn.pxd} (100%) diff --git a/doc/.gitignore b/doc/.gitignore index a5b098c..ccd0596 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,2 +1,3 @@ /build/ /doxygen/ +/build_dir.txt diff --git a/python/obitools3/obidms/capidms.pxd b/python/obitools3/obidms/capidms.pxd new file mode 100644 index 0000000..b497243 --- /dev/null +++ b/python/obitools3/obidms/capidms.pxd @@ -0,0 +1,19 @@ +cdef extern from *: + ctypedef char* const_char_p "const char*" + +cdef extern from "obidms.h" nogil: + struct OBIDMS_t: + pass + + ctypedef OBIDMS_t* OBIDMS_p + + OBIDMS_p obi_create_dms(const_char_p name) + + OBIDMS_p obi_open_dms(const_char_p name) + + OBIDMS_p obi_dms(const_char_p name) + + int obi_close_dms(OBIDMS_p dms) + +cdef class OBIDMS: + cdef OBIDMS_p pointer diff --git a/python/obitools3/obidms/capidms.pyd b/python/obitools3/obidms/capidms.pyd deleted file mode 100644 index eee5219..0000000 --- a/python/obitools3/obidms/capidms.pyd +++ /dev/null @@ -1,19 +0,0 @@ -cdef extern from *: - ctypedef char* const_char_p "const char*" - - -cdef extern from "obidms.h": - struct OBIDMS_t: - pass - - ctypedef OBIDMS_t* OBIDMS_p - - OBIDMS_p obi_create_dms(const_char_p name) - - OBIDMS_p obi_open_dms(const_char_p name) - - int obi_close_dms(OBIDMS_p dms) - -cdef class OBIDMS: - cdef OBIDMS_p pointer - \ No newline at end of file diff --git a/python/obitools3/obidms/capidms.pyx b/python/obitools3/obidms/capidms.pyx index e96b365..18b3796 100644 --- a/python/obitools3/obidms/capidms.pyx +++ b/python/obitools3/obidms/capidms.pyx @@ -1,27 +1,11 @@ -#from .capidms cimport * - -cdef extern from *: - ctypedef char* const_char_p "const char*" - -cdef extern from "obidms.h": - struct OBIDMS_t: - pass - - ctypedef OBIDMS_t* OBIDMS_p - - OBIDMS_p obi_create_dms(const_char_p name) - - OBIDMS_p obi_open_dms(const_char_p name) - - int obi_close_dms(OBIDMS_p dms) +#cython: language_level=3 +from .capidms cimport * cdef class OBIDMS: - cdef OBIDMS_p pointer - def __init__(self,name): - self.pointer = obi_create_dms(name) + self.pointer = obi_dms(name) def __del__(self): obi_close_dms(self.pointer) \ No newline at end of file diff --git a/python/obitools3/obidms/obidmscolumn/capidmscolumn.pyd b/python/obitools3/obidms/obidmscolumn/capidmscolumn.pxd similarity index 100% rename from python/obitools3/obidms/obidmscolumn/capidmscolumn.pyd rename to python/obitools3/obidms/obidmscolumn/capidmscolumn.pxd