Skip to content
Snippets Groups Projects
Commit b4f0ce91 authored by Rahil Doshi's avatar Rahil Doshi
Browse files

Add an extension module for "fast_interpolation" using...

Add an extension module for "fast_interpolation" using temperature_from_energy_density_array.cpp, add pybind11 to the installation requirements
parent 4026f999
Branches
No related tags found
No related merge requests found
from setuptools import setup, find_packages from setuptools import setup, find_packages, Extension
import pybind11
# Define the extension module
ext_modules = [
Extension(
"pymatlib.core.fast_interpolation", # Module name in Python
["src/pymatlib/core/cpp/temperature_from_energy_density_array.cpp"],
include_dirs=[pybind11.get_include()],
extra_compile_args=['-O3', '-std=c++11'], # Enable high optimization and C++11
language='c++'
),
]
setup( setup(
name='pymatlib', name='pymatlib',
version='0.1.0', # Update this version as needed version='0.1.0', # Update this version as needed
author='Rahil Doshi', # Replace with your name author='Rahil Doshi',
author_email='rahil.doshi@fau.de', # Replace with your email author_email='rahil.doshi@fau.de',
description='A Python based material library', description='A Python based material library',
long_description=open('README.md').read(), # Ensure you have a README.md file long_description=open('README.md').read(),
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
url='https://i10git.cs.fau.de/rahil.doshi/pymatlib', # Replace with your repository URL url='https://i10git.cs.fau.de/rahil.doshi/pymatlib',
packages=find_packages(where='src'), # Automatically find packages in the src directory packages=find_packages(where='src'), # Automatically find packages in the src directory
package_dir={'': 'src'}, # Set the source directory package_dir={'': 'src'}, # Set the source directory
classifiers=[ classifiers=[
...@@ -26,7 +38,8 @@ setup( ...@@ -26,7 +38,8 @@ setup(
'numpy>=1.18.0', # Specify required packages and their versions 'numpy>=1.18.0', # Specify required packages and their versions
'sympy>=1.7.0', 'sympy>=1.7.0',
'pytest>=6.0.0', 'pytest>=6.0.0',
'pystencils@git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev' 'pystencils@git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev',
'pybind11>=2.6.0',
], ],
extras_require={ extras_require={
'dev': [ 'dev': [
...@@ -35,5 +48,6 @@ setup( ...@@ -35,5 +48,6 @@ setup(
'black', # For code formatting 'black', # For code formatting
], ],
}, },
ext_modules=ext_modules,
include_package_data=True, # Include package data specified in MANIFEST.in include_package_data=True, # Include package data specified in MANIFEST.in
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment