|
| 1 | +python = import('python').find_installation(pure: false) |
| 2 | + |
| 3 | +# Install pure python sources |
| 4 | +install_subdir( |
| 5 | + '.', |
| 6 | + install_dir: python.get_install_dir(subdir: 'pydatastructs'), |
| 7 | +) |
| 8 | + |
| 9 | +# utils extension modules |
| 10 | +python.extension_module( |
| 11 | + 'pydatastructs.utils._backend.cpp._nodes', |
| 12 | + 'utils/_backend/cpp/nodes.cpp', |
| 13 | + install: true, |
| 14 | + subdir: 'pydatastructs/utils' |
| 15 | +) |
| 16 | +python.extension_module( |
| 17 | + 'pydatastructs.utils._backend.cpp._graph_utils', |
| 18 | + 'utils/_backend/cpp/graph_utils.cpp', |
| 19 | + install: true, |
| 20 | + subdir: 'pydatastructs/utils' |
| 21 | +) |
| 22 | + |
| 23 | +# linear_data_structures extension modules |
| 24 | +python.extension_module( |
| 25 | + 'pydatastructs.linear_data_structures._backend.cpp._arrays', |
| 26 | + 'linear_data_structures/_backend/cpp/arrays/arrays.cpp', |
| 27 | + install: true, |
| 28 | + subdir: 'pydatastructs/linear_data_structures' |
| 29 | +) |
| 30 | +python.extension_module( |
| 31 | + 'pydatastructs.linear_data_structures._backend.cpp._algorithms', |
| 32 | + 'linear_data_structures/_backend/cpp/algorithms/algorithms.cpp', |
| 33 | + install: true, |
| 34 | + subdir: 'pydatastructs/linear_data_structures' |
| 35 | +) |
| 36 | + |
| 37 | +# miscellaneous_data_structures extension module |
| 38 | +python.extension_module( |
| 39 | + 'pydatastructs.miscellaneous_data_structures._backend.cpp._stack', |
| 40 | + 'miscellaneous_data_structures/_backend/cpp/stack/stack.cpp', |
| 41 | + install: true, |
| 42 | + subdir: 'pydatastructs/miscellaneous_data_structures' |
| 43 | +) |
| 44 | + |
| 45 | +# trees extension module |
| 46 | +python.extension_module( |
| 47 | + 'pydatastructs.trees._backend.cpp._trees', |
| 48 | + 'trees/_backend/cpp/trees.cpp', |
| 49 | + install: true, |
| 50 | + subdir: 'pydatastructs/trees' |
| 51 | +) |
| 52 | + |
| 53 | +# graphs extension modules |
| 54 | +py_include = include_directories('utils/_backend/cpp') |
| 55 | +python.extension_module( |
| 56 | + 'pydatastructs.graphs._backend.cpp._graph', |
| 57 | + 'graphs/_backend/cpp/graph.cpp', |
| 58 | + include_directories: py_include, |
| 59 | + install: true, |
| 60 | + subdir: 'pydatastructs/graphs' |
| 61 | +) |
| 62 | +python.extension_module( |
| 63 | + 'pydatastructs.graphs._backend.cpp._algorithms', |
| 64 | + 'graphs/_backend/cpp/algorithms.cpp', |
| 65 | + include_directories: py_include, |
| 66 | + install: true, |
| 67 | + subdir: 'pydatastructs/graphs' |
| 68 | +) |
0 commit comments