LimeDriverBindings/setup.py
Kumi 1e8ff8684d
Updated CXX env var and removed redundant
library_dirs in setup

Enhanced the 'CXX' environment variable assignment in setup.py to
include the '-shlib' flag for shared library support. Also, streamlined
the Extension configuration by eliminating the now unnecessary
specification of default library directories, simplifying the build
process.

Refactors setup configuration for efficiency and compatibility with
shared libraries.
2024-02-10 20:00:27 +01:00

24 lines
611 B
Python

from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import subprocess
import os
from Cython.Build import cythonize
os.environ['CXX'] = 'h5c++ -shlib'
ext_modules = [
Extension(
'limedriver.binding',
sources=['src/limedriver/limedriver.pyx', 'extern/limedriver/src/limedriver.cpp'],
include_dirs=["extern/limedriver/src/", "/usr/include/hdf5/serial/"], # TODO: This is REALLY ugly.
libraries=["LimeSuite", "hdf5_cpp", "hdf5"],
language="c++",
),
]
setup(
name='limedriver',
ext_modules=cythonize(ext_modules),
)