From ac29b5a73986bf6c9413751078c9a234842bcbe4 Mon Sep 17 00:00:00 2001 From: Gus Smith Date: Fri, 29 May 2026 10:26:32 -0700 Subject: Try a different approach via setup.py --- sources/api/pySoftMC/setup.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sources/api/pySoftMC/setup.py (limited to 'sources/api/pySoftMC/setup.py') diff --git a/sources/api/pySoftMC/setup.py b/sources/api/pySoftMC/setup.py new file mode 100644 index 0000000..c353396 --- /dev/null +++ b/sources/api/pySoftMC/setup.py @@ -0,0 +1,22 @@ +from setuptools import setup, Extension +import os + +here = os.path.dirname(os.path.abspath(__file__)) +api_dir = os.path.join(here, "..") +pybind11_include = os.path.join(here, "../ext/pybind11/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]) -- cgit v1.2.3