diff options
| author | Haocong Luo <richardluo723@gmail.com> | 2026-06-01 20:04:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-01 20:04:48 +0200 |
| commit | ee802e6c310a2248c74d341d53d57d5948df6468 (patch) | |
| tree | c4cc1654e50cee95e6dbc842c32be3fd374e3f73 /sources/api/pySoftMC/setup.py | |
| parent | 81860f141ca3103663be80279b3dff7f34cd8fc2 (diff) | |
| parent | a22b6dbc4d93a568d608995e02f5e84d34461a1c (diff) | |
| download | dram-bender-ee802e6c310a2248c74d341d53d57d5948df6468.tar.gz | |
Merge pull request #13 from gussmith23/gus/fix-pybind-gitlink
Misc. fixes to pybind11 bindings
Diffstat (limited to 'sources/api/pySoftMC/setup.py')
| -rw-r--r-- | sources/api/pySoftMC/setup.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sources/api/pySoftMC/setup.py b/sources/api/pySoftMC/setup.py new file mode 100644 index 0000000..b962937 --- /dev/null +++ b/sources/api/pySoftMC/setup.py @@ -0,0 +1,22 @@ +from setuptools import setup, Extension +import os, pybind11 + +here = os.path.dirname(os.path.abspath(__file__)) +api_dir = os.path.join(here, "..") +pybind11_include = pybind11.get_include() + +ext = Extension( + "pySoftMC", + sources=[ + os.path.join(api_dir, "board.cpp"), + os.path.join(api_dir, "instruction.cpp"), + os.path.join(api_dir, "platform.cpp"), + os.path.join(api_dir, "prog.cpp"), + os.path.join(here, "pySoftMC.cpp"), + ], + include_dirs=[here, api_dir, pybind11_include], + language="c++", + extra_compile_args=["-std=c++14", "-pthread", "-O3", "-DPYSMC"], +) + +setup(name="pySoftMC", ext_modules=[ext]) |
