From 4fcc31ac53ace9098f0df31787e13781cccd0794 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 7 Apr 2016 09:55:00 +0200 Subject: [PATCH] query pip for pybind11 include path (fixes compilation for Brew-ed Python on OSX) --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3447ac5..9a3e7bc 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,18 @@ from setuptools import setup, Extension from setuptools.command.build_ext import build_ext -import os, sys +from pip import locations +import os +import sys +import setuptools ext_modules = [ Extension( 'pbtest', ['py/main.cpp'], - include_dirs=['include'], + include_dirs=[ + # Path to pybind11 headers + os.path.dirname(locations.distutils_scheme('pybind11')['headers']) + ], language='c++', ), ]