From 307d3a98c1bc83ed4dbcd8156d845d11ae3eaa27 Mon Sep 17 00:00:00 2001 From: Gus Smith Date: Fri, 29 May 2026 10:34:10 -0700 Subject: Add readme --- sources/api/pySoftMC/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sources/api/pySoftMC/README.md (limited to 'sources/api/pySoftMC/README.md') diff --git a/sources/api/pySoftMC/README.md b/sources/api/pySoftMC/README.md new file mode 100644 index 0000000..3565d46 --- /dev/null +++ b/sources/api/pySoftMC/README.md @@ -0,0 +1,21 @@ +# pySoftMC + +Python bindings for the DRAM Bender API via pybind11. + +## Building with `make` + +Requires the pybind11 submodule (`git clone --recursive` or `git submodule update --init --recursive`) and a system Python installation with headers at `/usr/include/python3.X`. + +``` +make +``` + +## Building with `setup.py` + +A more portable alternative that works with virtual environments and pyenv: + +``` +python3 setup.py build_ext --inplace +``` + +This uses the active Python interpreter's own build machinery, so it works regardless of where Python is installed. -- cgit v1.2.3 From db0dc94d8a3161333b21636aacdfb9ce9284a16b Mon Sep 17 00:00:00 2001 From: Gus Smith Date: Fri, 29 May 2026 10:38:26 -0700 Subject: Don't use pybind in submod --- sources/api/pySoftMC/README.md | 5 ++++- sources/api/pySoftMC/setup.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sources/api/pySoftMC/README.md') diff --git a/sources/api/pySoftMC/README.md b/sources/api/pySoftMC/README.md index 3565d46..f59c30f 100644 --- a/sources/api/pySoftMC/README.md +++ b/sources/api/pySoftMC/README.md @@ -12,9 +12,12 @@ make ## Building with `setup.py` -A more portable alternative that works with virtual environments and pyenv: +A more portable alternative that works with virtual environments and pyenv. +Requires pybind11 installed in the active Python environment (`pip install pybind11`); +does not require the pybind11 git submodule. ``` +pip install pybind11 python3 setup.py build_ext --inplace ``` diff --git a/sources/api/pySoftMC/setup.py b/sources/api/pySoftMC/setup.py index c353396..b962937 100644 --- a/sources/api/pySoftMC/setup.py +++ b/sources/api/pySoftMC/setup.py @@ -1,9 +1,9 @@ from setuptools import setup, Extension -import os +import os, pybind11 here = os.path.dirname(os.path.abspath(__file__)) api_dir = os.path.join(here, "..") -pybind11_include = os.path.join(here, "../ext/pybind11/include") +pybind11_include = pybind11.get_include() ext = Extension( "pySoftMC", -- cgit v1.2.3