From 1ae85236dec0f6de2084b1c031d87923a1f3f063 Mon Sep 17 00:00:00 2001 From: Maryanne Wachter Date: Tue, 30 Apr 2024 21:12:53 -0700 Subject: [PATCH] Restructure file system --- build_ext.py | 12 ++--- {c => src/c}/A.poly | 0 {c => src/c}/README | 0 {c => src/c}/makefile | 0 {c => src/c}/showme.c | 0 {c => src/c}/triangle.c | 0 {c => src/c}/triangle.h | 0 {c => src/c}/tricall.c | 0 {cytriangle => src/cytriangle}/__init__.py | 0 {cytriangle => src/cytriangle}/ctriangle.pxd | 0 {cytriangle => src/cytriangle}/cytriangle.c | 40 ++++++++-------- {cytriangle => src/cytriangle}/cytriangle.pyx | 0 {cytriangle => src/cytriangle}/cytriangleio.c | 48 +++++++++---------- .../cytriangle}/cytriangleio.pxd | 0 .../cytriangle}/cytriangleio.pyx | 0 {test_cytriangle => tests}/sample.py | 0 {test_cytriangle => tests}/test_cytriangle.py | 0 17 files changed, 50 insertions(+), 50 deletions(-) rename {c => src/c}/A.poly (100%) rename {c => src/c}/README (100%) rename {c => src/c}/makefile (100%) rename {c => src/c}/showme.c (100%) rename {c => src/c}/triangle.c (100%) rename {c => src/c}/triangle.h (100%) rename {c => src/c}/tricall.c (100%) rename {cytriangle => src/cytriangle}/__init__.py (100%) rename {cytriangle => src/cytriangle}/ctriangle.pxd (100%) rename {cytriangle => src/cytriangle}/cytriangle.c (99%) rename {cytriangle => src/cytriangle}/cytriangle.pyx (100%) rename {cytriangle => src/cytriangle}/cytriangleio.c (99%) rename {cytriangle => src/cytriangle}/cytriangleio.pxd (100%) rename {cytriangle => src/cytriangle}/cytriangleio.pyx (100%) rename {test_cytriangle => tests}/sample.py (100%) rename {test_cytriangle => tests}/test_cytriangle.py (100%) diff --git a/build_ext.py b/build_ext.py index ccb067f..6263dd6 100644 --- a/build_ext.py +++ b/build_ext.py @@ -15,14 +15,14 @@ extensions = [ Extension( "cytriangle.cytriangleio", - sources=["cytriangle/cytriangleio.pyx", "c/triangle.c"], - include_dirs=["c"], + sources=["src/cytriangle/cytriangleio.pyx", "src/c/triangle.c"], + include_dirs=["src/c"], define_macros=define_macros, ), Extension( "cytriangle.cytriangle", - sources=["cytriangle/cytriangle.pyx", "c/triangle.c"], - include_dirs=["c"], + sources=["src/cytriangle/cytriangle.pyx", "src/c/triangle.c"], + include_dirs=["src/c"], define_macros=define_macros, ), ] @@ -32,8 +32,8 @@ class BuildExt(build_ext): def build_extensions(self): try: super().build_extensions() - except Exception: - pass + except Exception as e: + print(f"An exception occured: {type(e).__name__}: {e}") def build(setup_kwargs): diff --git a/c/A.poly b/src/c/A.poly similarity index 100% rename from c/A.poly rename to src/c/A.poly diff --git a/c/README b/src/c/README similarity index 100% rename from c/README rename to src/c/README diff --git a/c/makefile b/src/c/makefile similarity index 100% rename from c/makefile rename to src/c/makefile diff --git a/c/showme.c b/src/c/showme.c similarity index 100% rename from c/showme.c rename to src/c/showme.c diff --git a/c/triangle.c b/src/c/triangle.c similarity index 100% rename from c/triangle.c rename to src/c/triangle.c diff --git a/c/triangle.h b/src/c/triangle.h similarity index 100% rename from c/triangle.h rename to src/c/triangle.h diff --git a/c/tricall.c b/src/c/tricall.c similarity index 100% rename from c/tricall.c rename to src/c/tricall.c diff --git a/cytriangle/__init__.py b/src/cytriangle/__init__.py similarity index 100% rename from cytriangle/__init__.py rename to src/cytriangle/__init__.py diff --git a/cytriangle/ctriangle.pxd b/src/cytriangle/ctriangle.pxd similarity index 100% rename from cytriangle/ctriangle.pxd rename to src/cytriangle/ctriangle.pxd diff --git a/cytriangle/cytriangle.c b/src/cytriangle/cytriangle.c similarity index 99% rename from cytriangle/cytriangle.c rename to src/cytriangle/cytriangle.c index d0d8ebd..30d41a9 100644 --- a/cytriangle/cytriangle.c +++ b/src/cytriangle/cytriangle.c @@ -22,15 +22,15 @@ ] ], "depends": [ - "c/triangle.h" + "src/c/triangle.h" ], "include_dirs": [ - "c" + "src/c" ], "name": "cytriangle.cytriangle", "sources": [ - "cytriangle/cytriangle.pyx", - "c/triangle.c" + "src/cytriangle/cytriangle.pyx", + "src/c/triangle.c" ] }, "module_name": "cytriangle.cytriangle" @@ -1507,9 +1507,9 @@ static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { - "cytriangle/cytriangle.pyx", + "src/cytriangle/cytriangle.pyx", "", - "cytriangle/cytriangleio.pxd", + "src/cytriangle/cytriangleio.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ @@ -2379,12 +2379,12 @@ static const char __pyx_k_cytriangle_cytriangle[] = "cytriangle.cytriangle"; static const char __pyx_k_CyTriangle_convex_hull[] = "CyTriangle.convex_hull"; static const char __pyx_k_CyTriangle_triangulate[] = "CyTriangle.triangulate"; static const char __pyx_k_pyx_unpickle_CyTriangle[] = "__pyx_unpickle_CyTriangle"; -static const char __pyx_k_cytriangle_cytriangle_pyx[] = "cytriangle/cytriangle.pyx"; static const char __pyx_k_CyTriangle___reduce_cython[] = "CyTriangle.__reduce_cython__"; static const char __pyx_k_CyTriangle___setstate_cython[] = "CyTriangle.__setstate_cython__"; static const char __pyx_k_CyTriangle_get_input_as_dict[] = "CyTriangle.get_input_as_dict"; static const char __pyx_k_CyTriangle_get_output_as_dict[] = "CyTriangle.get_output_as_dict"; static const char __pyx_k_Delaunay_triangulation_failed[] = "Delaunay triangulation failed"; +static const char __pyx_k_src_cytriangle_cytriangle_pyx[] = "src/cytriangle/cytriangle.pyx"; static const char __pyx_k_CyTriangle_get_voronoi_as_dict[] = "CyTriangle.get_voronoi_as_dict"; static const char __pyx_k_Convex_hull_construction_failed[] = "Convex hull construction failed"; static const char __pyx_k_CyTriangle_validate_input_flags[] = "CyTriangle.validate_input_flags"; @@ -2487,7 +2487,6 @@ typedef struct { PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_convex_hull; PyObject *__pyx_n_s_cytriangle_cytriangle; - PyObject *__pyx_kp_s_cytriangle_cytriangle_pyx; PyObject *__pyx_n_s_delaunay; PyObject *__pyx_n_s_dict; PyObject *__pyx_n_s_dict_2; @@ -2529,6 +2528,7 @@ typedef struct { PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_spec; + PyObject *__pyx_kp_s_src_cytriangle_cytriangle_pyx; PyObject *__pyx_n_s_state; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_test; @@ -2652,7 +2652,6 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_convex_hull); Py_CLEAR(clear_module_state->__pyx_n_s_cytriangle_cytriangle); - Py_CLEAR(clear_module_state->__pyx_kp_s_cytriangle_cytriangle_pyx); Py_CLEAR(clear_module_state->__pyx_n_s_delaunay); Py_CLEAR(clear_module_state->__pyx_n_s_dict); Py_CLEAR(clear_module_state->__pyx_n_s_dict_2); @@ -2694,6 +2693,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_spec); + Py_CLEAR(clear_module_state->__pyx_kp_s_src_cytriangle_cytriangle_pyx); Py_CLEAR(clear_module_state->__pyx_n_s_state); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_test); @@ -2795,7 +2795,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_convex_hull); Py_VISIT(traverse_module_state->__pyx_n_s_cytriangle_cytriangle); - Py_VISIT(traverse_module_state->__pyx_kp_s_cytriangle_cytriangle_pyx); Py_VISIT(traverse_module_state->__pyx_n_s_delaunay); Py_VISIT(traverse_module_state->__pyx_n_s_dict); Py_VISIT(traverse_module_state->__pyx_n_s_dict_2); @@ -2837,6 +2836,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_spec); + Py_VISIT(traverse_module_state->__pyx_kp_s_src_cytriangle_cytriangle_pyx); Py_VISIT(traverse_module_state->__pyx_n_s_state); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_test); @@ -2956,7 +2956,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_convex_hull __pyx_mstate_global->__pyx_n_s_convex_hull #define __pyx_n_s_cytriangle_cytriangle __pyx_mstate_global->__pyx_n_s_cytriangle_cytriangle -#define __pyx_kp_s_cytriangle_cytriangle_pyx __pyx_mstate_global->__pyx_kp_s_cytriangle_cytriangle_pyx #define __pyx_n_s_delaunay __pyx_mstate_global->__pyx_n_s_delaunay #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2 @@ -2998,6 +2997,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec +#define __pyx_kp_s_src_cytriangle_cytriangle_pyx __pyx_mstate_global->__pyx_kp_s_src_cytriangle_cytriangle_pyx #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test @@ -6390,7 +6390,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_convex_hull, __pyx_k_convex_hull, sizeof(__pyx_k_convex_hull), 0, 0, 1, 1}, {&__pyx_n_s_cytriangle_cytriangle, __pyx_k_cytriangle_cytriangle, sizeof(__pyx_k_cytriangle_cytriangle), 0, 0, 1, 1}, - {&__pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_k_cytriangle_cytriangle_pyx, sizeof(__pyx_k_cytriangle_cytriangle_pyx), 0, 0, 1, 0}, {&__pyx_n_s_delaunay, __pyx_k_delaunay, sizeof(__pyx_k_delaunay), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1}, @@ -6432,6 +6431,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, + {&__pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_k_src_cytriangle_cytriangle_pyx, sizeof(__pyx_k_src_cytriangle_cytriangle_pyx), 0, 0, 1, 0}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, @@ -6569,7 +6569,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_get_input_as_dict, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_get_input_as_dict, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 32, __pyx_L1_error) /* "cytriangle/cytriangle.pyx":35 * return self._in.to_dict() @@ -6578,7 +6578,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * return self._out.to_dict() * */ - __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_get_output_as_dict, 35, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_get_output_as_dict, 35, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 35, __pyx_L1_error) /* "cytriangle/cytriangle.pyx":38 * return self._out.to_dict() @@ -6587,7 +6587,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * return self._vorout.to_dict() * */ - __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_get_voronoi_as_dict, 38, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_get_voronoi_as_dict, 38, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 38, __pyx_L1_error) /* "cytriangle/cytriangle.pyx":41 * return self._vorout.to_dict() @@ -6599,7 +6599,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_validate_input_flags, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_validate_input_flags, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 41, __pyx_L1_error) /* "cytriangle/cytriangle.pyx":56 * @@ -6611,7 +6611,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_triswitches); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_triangulate, 56, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_triangulate, 56, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 56, __pyx_L1_error) __pyx_tuple__20 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); @@ -6623,7 +6623,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * opts = "Qz".encode('utf-8') * if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) is not None: */ - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_delaunay, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_delaunay, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 62, __pyx_L1_error) /* "cytriangle/cytriangle.pyx":67 * raise RuntimeError('Delaunay triangulation failed') @@ -6632,7 +6632,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * opts = f"Qzc".encode('utf-8') * if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) is not None: */ - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_convex_hull, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_convex_hull, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 67, __pyx_L1_error) /* "cytriangle/cytriangle.pyx":72 * raise RuntimeError('Convex hull construction failed') @@ -6641,7 +6641,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * opts = f"Qzv".encode('utf-8') * if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) is not None: */ - __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangle_pyx, __pyx_n_s_voronoi, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_voronoi, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 72, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< diff --git a/cytriangle/cytriangle.pyx b/src/cytriangle/cytriangle.pyx similarity index 100% rename from cytriangle/cytriangle.pyx rename to src/cytriangle/cytriangle.pyx diff --git a/cytriangle/cytriangleio.c b/src/cytriangle/cytriangleio.c similarity index 99% rename from cytriangle/cytriangleio.c rename to src/cytriangle/cytriangleio.c index faeb3db..6575f14 100644 --- a/cytriangle/cytriangleio.c +++ b/src/cytriangle/cytriangleio.c @@ -22,15 +22,15 @@ ] ], "depends": [ - "c/triangle.h" + "src/c/triangle.h" ], "include_dirs": [ - "c" + "src/c" ], "name": "cytriangle.cytriangleio", "sources": [ - "cytriangle/cytriangleio.pyx", - "c/triangle.c" + "src/cytriangle/cytriangleio.pyx", + "src/c/triangle.c" ] }, "module_name": "cytriangle.cytriangleio" @@ -1507,7 +1507,7 @@ static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { - "cytriangle/cytriangleio.pyx", + "src/cytriangle/cytriangleio.pyx", "", }; /* #### Code section: utility_code_proto_before_types ### */ @@ -2368,11 +2368,11 @@ static const char __pyx_k_TriangleIO_set_triangles[] = "TriangleIO.set_triangles static const char __pyx_k_validate_attribute_number[] = "validate_attribute_number"; static const char __pyx_k_validate_input_attributes[] = "validate_input_attributes"; static const char __pyx_k_TriangleIO___reduce_cython[] = "TriangleIO.__reduce_cython__"; -static const char __pyx_k_cytriangle_cytriangleio_pyx[] = "cytriangle/cytriangleio.pyx"; static const char __pyx_k_TriangleIO___setstate_cython[] = "TriangleIO.__setstate_cython__"; static const char __pyx_k_TriangleIO_set_triangle_areas[] = "TriangleIO.set_triangle_areas"; static const char __pyx_k_TriangleIO_set_vertex_markers[] = "TriangleIO.set_vertex_markers"; static const char __pyx_k_TriangleIO_set_segment_markers[] = "TriangleIO.set_segment_markers"; +static const char __pyx_k_src_cytriangle_cytriangleio_pyx[] = "src/cytriangle/cytriangleio.pyx"; static const char __pyx_k_Attribute_list_must_have_the_sam[] = "Attribute list must have the same number of elements as the input it decorates"; static const char __pyx_k_Attribute_lists_must_have_the_sa[] = "Attribute lists must have the same number of attributes for each element"; static const char __pyx_k_TriangleIO_set_triangle_attribut[] = "TriangleIO.set_triangle_attributes"; @@ -2488,7 +2488,6 @@ typedef struct { PyObject *__pyx_n_s_class_getitem; PyObject *__pyx_n_s_cline_in_traceback; PyObject *__pyx_n_s_cytriangle_cytriangleio; - PyObject *__pyx_kp_s_cytriangle_cytriangleio_pyx; PyObject *__pyx_kp_u_disable; PyObject *__pyx_n_s_double; PyObject *__pyx_n_s_dtype; @@ -2555,6 +2554,7 @@ typedef struct { PyObject *__pyx_n_s_setstate; PyObject *__pyx_n_s_setstate_cython; PyObject *__pyx_n_s_spec; + PyObject *__pyx_kp_s_src_cytriangle_cytriangleio_pyx; PyObject *__pyx_kp_s_stringsource; PyObject *__pyx_n_s_sublist; PyObject *__pyx_n_s_test; @@ -2686,7 +2686,6 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); Py_CLEAR(clear_module_state->__pyx_n_s_cytriangle_cytriangleio); - Py_CLEAR(clear_module_state->__pyx_kp_s_cytriangle_cytriangleio_pyx); Py_CLEAR(clear_module_state->__pyx_kp_u_disable); Py_CLEAR(clear_module_state->__pyx_n_s_double); Py_CLEAR(clear_module_state->__pyx_n_s_dtype); @@ -2753,6 +2752,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_setstate); Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); Py_CLEAR(clear_module_state->__pyx_n_s_spec); + Py_CLEAR(clear_module_state->__pyx_kp_s_src_cytriangle_cytriangleio_pyx); Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); Py_CLEAR(clear_module_state->__pyx_n_s_sublist); Py_CLEAR(clear_module_state->__pyx_n_s_test); @@ -2862,7 +2862,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); Py_VISIT(traverse_module_state->__pyx_n_s_cytriangle_cytriangleio); - Py_VISIT(traverse_module_state->__pyx_kp_s_cytriangle_cytriangleio_pyx); Py_VISIT(traverse_module_state->__pyx_kp_u_disable); Py_VISIT(traverse_module_state->__pyx_n_s_double); Py_VISIT(traverse_module_state->__pyx_n_s_dtype); @@ -2929,6 +2928,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_setstate); Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); Py_VISIT(traverse_module_state->__pyx_n_s_spec); + Py_VISIT(traverse_module_state->__pyx_kp_s_src_cytriangle_cytriangleio_pyx); Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); Py_VISIT(traverse_module_state->__pyx_n_s_sublist); Py_VISIT(traverse_module_state->__pyx_n_s_test); @@ -3054,7 +3054,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback #define __pyx_n_s_cytriangle_cytriangleio __pyx_mstate_global->__pyx_n_s_cytriangle_cytriangleio -#define __pyx_kp_s_cytriangle_cytriangleio_pyx __pyx_mstate_global->__pyx_kp_s_cytriangle_cytriangleio_pyx #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable #define __pyx_n_s_double __pyx_mstate_global->__pyx_n_s_double #define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype @@ -3121,6 +3120,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec +#define __pyx_kp_s_src_cytriangle_cytriangleio_pyx __pyx_mstate_global->__pyx_kp_s_src_cytriangle_cytriangleio_pyx #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource #define __pyx_n_s_sublist __pyx_mstate_global->__pyx_n_s_sublist #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test @@ -13761,7 +13761,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_cytriangle_cytriangleio, __pyx_k_cytriangle_cytriangleio, sizeof(__pyx_k_cytriangle_cytriangleio), 0, 0, 1, 1}, - {&__pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_k_cytriangle_cytriangleio_pyx, sizeof(__pyx_k_cytriangle_cytriangleio_pyx), 0, 0, 1, 0}, {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, @@ -13828,6 +13827,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, + {&__pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_k_src_cytriangle_cytriangleio_pyx, sizeof(__pyx_k_src_cytriangle_cytriangleio_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_sublist, __pyx_k_sublist, sizeof(__pyx_k_sublist), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, @@ -13910,7 +13910,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__5 = PyTuple_Pack(3, __pyx_n_s_attributes, __pyx_n_s_num_attr, __pyx_n_s_sublist); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_validate_input_attributes, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 5, __pyx_L1_error) + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_validate_input_attributes, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 5, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":11 * return num_attr[0] @@ -13922,7 +13922,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_attributes, __pyx_n_s_base_quantity); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_validate_attribute_number, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_validate_attribute_number, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 11, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":116 * self.set_regions(input_dict['regions']) @@ -13934,7 +13934,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_output_dict); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_to_dict, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_to_dict, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 116, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":307 * return norm_list @@ -13946,7 +13946,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__11 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_vertices, __pyx_n_s_num_vertices, __pyx_n_s_i); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_vertices, 307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_vertices, 307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 307, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":318 * self._io.pointlist[2 * i + 1] = vertices[i, 1] @@ -13958,7 +13958,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__13 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_vertex_attributes, __pyx_n_s_num_attr, __pyx_n_s_num_vertices, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_vertex_attributes, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_vertex_attributes, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 318, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":329 * self._io.pointattributelist[i * num_attr + j] = vertex_attributes[i, j] @@ -13970,7 +13970,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__15 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vertex_markers, __pyx_n_s_i); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_vertex_markers, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_vertex_markers, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 329, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":335 * self._io.pointmarkerlist[i] = vertex_markers[i] @@ -13982,7 +13982,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__17 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_triangles, __pyx_n_s_num_triangles, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_triangles, 335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_triangles, 335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 335, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":345 * self._io.trianglelist[i*3 + j] = triangles[i, j] @@ -13994,7 +13994,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__19 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_triangle_attributes, __pyx_n_s_num_attr, __pyx_n_s_num_triangles, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_triangle_attributes, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_triangle_attributes, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 345, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":356 * self._io.triangleattributelist[i * num_attr + j] = triangle_attributes[i, j] @@ -14006,7 +14006,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__21 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_triangle_areas, __pyx_n_s_num_triangles, __pyx_n_s_triangle_max_area, __pyx_n_s_i); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_triangle_areas, 356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_triangle_areas, 356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 356, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":364 * self._io.trianglearealist[i] = triangle_max_area[i] @@ -14018,7 +14018,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__23 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_segments, __pyx_n_s_num_segments, __pyx_n_s_i); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); - __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_segments, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_segments, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 364, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":373 * self._io.segmentlist[i * 2 + 1] = segments[i, 1] @@ -14030,7 +14030,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__25 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_segment_markers, __pyx_n_s_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_segment_markers, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_segment_markers, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 373, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":379 * self._io.segmentmarkerlist[i] = segment_markers[i] @@ -14042,7 +14042,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__27 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_holes, __pyx_n_s_num_holes, __pyx_n_s_i); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_holes, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_holes, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 379, __pyx_L1_error) /* "cytriangle/cytriangleio.pyx":388 * self._io.holelist[2 * i + 1] = holes[i, 1] @@ -14054,7 +14054,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_tuple__29 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_regions, __pyx_n_s_region_array, __pyx_n_s_num_regions, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_region); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytriangle_cytriangleio_pyx, __pyx_n_s_set_regions, 388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangleio_pyx, __pyx_n_s_set_regions, 388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 388, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< diff --git a/cytriangle/cytriangleio.pxd b/src/cytriangle/cytriangleio.pxd similarity index 100% rename from cytriangle/cytriangleio.pxd rename to src/cytriangle/cytriangleio.pxd diff --git a/cytriangle/cytriangleio.pyx b/src/cytriangle/cytriangleio.pyx similarity index 100% rename from cytriangle/cytriangleio.pyx rename to src/cytriangle/cytriangleio.pyx diff --git a/test_cytriangle/sample.py b/tests/sample.py similarity index 100% rename from test_cytriangle/sample.py rename to tests/sample.py diff --git a/test_cytriangle/test_cytriangle.py b/tests/test_cytriangle.py similarity index 100% rename from test_cytriangle/test_cytriangle.py rename to tests/test_cytriangle.py