Debian Codegraph @

setup.py

raw
1 # --------------------------------------------------------------------------------------
2 # Copyright (c) 2013-2026, Nucleic Development Team.
3 #
4 # Distributed under the terms of the Modified BSD License.
5 #
6 # The full license is in the file LICENSE, distributed with this software.
7 # --------------------------------------------------------------------------------------
8
9 from setuptools import Extension, setup
10
11 try:
12 from cppy import CppyBuildExt
13 except ImportError as e:
14 raise RuntimeError(
15 "Missing setup required dependencies: cppy. "
16 "Installing through pip as recommended ensure one never hits this issue."
17 ) from e
18
19 # Before releasing the version needs to be updated in kiwi/version.h, if the changes
20 # are not limited to the solver.
21
22 ext_modules = [
23 Extension(
24 "kiwisolver._cext",
25 [
26 "py/src/kiwisolver.cpp",
27 "py/src/constraint.cpp",
28 "py/src/expression.cpp",
29 "py/src/solver.cpp",
30 "py/src/strength.cpp",
31 "py/src/term.cpp",
32 "py/src/variable.cpp",
33 ],
34 include_dirs=["."],
35 language="c++",
36 ),
37 ]
38
39
40 setup(
41 ext_modules=ext_modules,
42 cmdclass={"build_ext": CppyBuildExt},
43 )