Coverage for setup.py: 0%
8 statements
« prev ^ index » next coverage.py v6.5.0, created at 2023-01-14 02:23 -0800
« prev ^ index » next coverage.py v6.5.0, created at 2023-01-14 02:23 -0800
1"""
2Basic setuptools description.
4This is not a complete definition.
6* Version number is not correct.
7* The shared library and include files are not installed. This makes it
8 unusable with other python packages that directly reference the C++
9 interface.
10"""
12import glob
14# Importing this automatically enables parallelized builds
15import numpy.distutils.ccompiler # noqa: F401
16from setuptools import setup
17from pybind11.setup_helpers import Pybind11Extension, build_ext
19# Find the source code -- we can combine it into a single module
20pybind_src = sorted(glob.glob("python/lsst/sphgeom/*.cc"))
21cpp_src = sorted(glob.glob("src/*.cc"))
23# Very inefficient approach since this compiles the maing sphgeom
24# library code for every extension rather than building everything once
25ext_modules = [Pybind11Extension("lsst.sphgeom._sphgeom",
26 sorted(cpp_src + pybind_src),
27 include_dirs=["include"])]
29setup(
30 ext_modules=ext_modules,
31 cmdclass={'build_ext': build_ext},
32)