Enforce C++ compiler for Cython and fix Python binding
- Standardized the C++ compiler across build environments by setting it in `setup.py`, ensuring consistent compilation of Cython extensions. - Transitioned to using `setuptools.build_meta` as the build backend in `pyproject.toml` for enhanced package build processes. - Modified the extension module path in `setup.py` to align with the new Python binding structure. - Introduced Python property decorators to `PyLimeConfig` class in `limedriver.pyx` for getter methods, enhancing the Pythonic interface of the Cython module. - Facilitated direct import of the binding in `__init__.py`, streamlining the usage of the `limedriver` package.
This commit is contained in:
parent
4e279892aa
commit
1f24eb3f64
4 changed files with 10 additions and 3 deletions
5
setup.py
5
setup.py
|
@ -6,11 +6,12 @@ import os
|
|||
|
||||
from Cython.Build import cythonize
|
||||
|
||||
os.environ['CXX'] = 'h5c++'
|
||||
|
||||
class BuildExtCommand(build_ext):
|
||||
"""Custom build_ext command to ensure that the submodule is retrieved and built."""
|
||||
|
||||
def build_extensions(self):
|
||||
os.environ['CXX'] = 'h5c++'
|
||||
super().build_extensions()
|
||||
|
||||
def run(self):
|
||||
|
@ -31,7 +32,7 @@ class BuildExtCommand(build_ext):
|
|||
|
||||
ext_modules = [
|
||||
Extension(
|
||||
'limedriver',
|
||||
'limedriver.binding',
|
||||
sources=['src/limedriver/limedriver.pyx', 'extern/limedriver/src/limedriver.cpp'],
|
||||
include_dirs=["extern/limedriver/src/"],
|
||||
libraries=["LimeSuite"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue