Coverage for setup.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v6.4, created at 2022-06-02 03:22 -0700

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 setuptools import setup 

17from pybind11.setup_helpers import Pybind11Extension, build_ext 

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 = [Pybind11Extension("lsst.sphgeom._sphgeom", 

26 sorted(cpp_src + pybind_src), 

27 include_dirs=["include"])] 

28 

29setup( 

30 ext_modules=ext_modules, 

31 cmdclass={'build_ext': build_ext}, 

32)