Skip to content

Commit 6461b72

Browse files
committed
2 parents f8bba49 + 5f9a6a4 commit 6461b72

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import sys
55
import setuptools
66
from glob import glob
7+
import subprocess
78

89

910
with open("README.md", "r") as fh:
@@ -18,6 +19,11 @@ class get_pybind_include(object):
1819
method can be invoked. """
1920

2021
def __init__(self, user=False):
22+
try:
23+
import pybind11
24+
except ImportError:
25+
if subprocess.call([sys.executable, '-m', 'pip', 'install', 'pybind11']):
26+
raise RuntimeError('pybind11 install failed.')
2127
self.user = user
2228

2329
def __str__(self):

0 commit comments

Comments
 (0)