Skip to content

Commit 2741d01

Browse files
committed
Check for Python.h file needed for sysv_ipc
1 parent e33c590 commit 2741d01

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

setup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import io
1212
import os
13+
import glob
1314

1415
from setuptools import setup, find_packages
1516

@@ -20,6 +21,12 @@
2021
with io.open(os.path.join(here, "README.rst"), encoding="utf-8") as f:
2122
long_description = "\n" + f.read()
2223

24+
if not glob.glob("//usr//include//python3.*//Python.h"):
25+
raise RuntimeError(
26+
"This package requires a Python development environment. "
27+
"Please install the python3-dev package for your distribution."
28+
)
29+
2330
board_reqs = []
2431
if os.path.exists("/proc/device-tree/compatible"):
2532
with open("/proc/device-tree/compatible", "rb") as f:

0 commit comments

Comments
 (0)