Coverage for setup.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v7.5.0, created at 2024-05-02 03:12 -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 

14from pybind11.setup_helpers import ParallelCompile, Pybind11Extension, build_ext 

15from setuptools import setup 

16 

17# Optional multithreaded build. 

18ParallelCompile("NPY_NUM_BUILD_JOBS").install() 

19 

20# Find the source code -- we can combine it into a single module 

21pybind_src = sorted(glob.glob("python/lsst/sphgeom/*.cc")) 

22cpp_src = sorted(glob.glob("src/*.cc")) 

23 

24# Very inefficient approach since this compiles the maing sphgeom 

25# library code for every extension rather than building everything once 

26ext_modules = [ 

27 Pybind11Extension("lsst.sphgeom._sphgeom", sorted(cpp_src + pybind_src), include_dirs=["include"]) 

28] 

29 

30setup( 

31 ext_modules=ext_modules, 

32 cmdclass={"build_ext": build_ext}, 

33)