From 784858956eac51100a2c2dea7a0277569965c799 Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 10 Feb 2021 21:56:00 +0100 Subject: [PATCH] setup.py - get rid of hardcoded paths --- examples/ext/lib_test/setup.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/ext/lib_test/setup.py b/examples/ext/lib_test/setup.py index 0c945de..656b141 100755 --- a/examples/ext/lib_test/setup.py +++ b/examples/ext/lib_test/setup.py @@ -3,13 +3,18 @@ # see LICENSE.txt from setuptools import setup, Extension +import pybind11 +includes=[] +includes.append('../../lib/lib_test') +includes.append(pybind11.commands.get_include()) + + + ext_modules = [ Extension( "lib_test", ["lib_test/lib_test.cc"], - include_dirs=['../../lib/lib_test', - '/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8', - 'venv_lib_test/lib/python3.8/site-packages/pybind11/include'], + include_dirs=includes, extra_compile_args=['-std=c++11'], libraries=['lib_test'], library_dirs=['../../lib/lib_test/']