Coverage for setup.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v7.2.3, created at 2023-04-19 10:37 +0000

1""" 

2Basic setuptools description. 

3 

4This is not a complete definition. 

5 

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""" 

11 

12import glob 

13 

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 

18 

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")) 

22 

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] 

28 

29setup( 

30 ext_modules=ext_modules, 

31 cmdclass={"build_ext": build_ext}, 

32)