8000 Merge pull request #6 from wjakob/master · martin-honnen/python_example@17808d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17808d7

Browse files
committed
Merge pull request pybind#6 from wjakob/master
query pip for pybind11 include path (fixes compilation for Brew-ed Python on OSX)
2 parents 6d267c2 + 4fcc31a commit 17808d7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
from setuptools import setup, Extension
22
from setuptools.command.build_ext import build_ext
3-
import os, sys
3+
from pip import locations
4+
import os
5+
import sys
6+
import setuptools
47

58
ext_modules = [
69
Extension(
710
'pbtest',
811
['py/main.cpp'],
9-
include_dirs=['include'],
12+
include_dirs=[
13+
# Path to pybind11 headers
14+
os.path.dirname(locations.distutils_scheme('pybind11')['headers'])
15+
],
1016
language='c++',
1117
),
1218
]

0 commit comments

Comments
 (0)
0