Coverage for setup.py: 0%
8 statements
« prev ^ index » next coverage.py v6.5.0, created at 2023-02-02 14:09 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2023-02-02 14:09 +0000
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 pybind11.setup_helpers import Pybind11Extension, build_ext
17from setuptools import setup
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 = [
26 Pybind11Extension("lsst.sphgeom._sphgeom", sorted(cpp_src + pybind_src), include_dirs=["include"])
27]
29setup(
30 ext_modules=ext_modules,
31 cmdclass={"build_ext": build_ext},
32)