From 2741d0139a84fde729dfb55988da2c5e6311193f Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 25 Jun 2025 12:43:45 -0700 Subject: [PATCH] Check for Python.h file needed for sysv_ipc --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index d24a53d..ddfe51f 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,7 @@ import io import os +import glob from setuptools import setup, find_packages @@ -20,6 +21,12 @@ here = os.path.abspath(os.path.dirname(__file__)) with io.open(os.path.join(here, "README.rst"), encoding="utf-8") as f: long_description = "\n" + f.read() +if not glob.glob("//usr//include//python3.*//Python.h"): + raise RuntimeError( + "This package requires a Python development environment. " + "Please install the python3-dev package for your distribution." + ) + board_reqs = [] if os.path.exists("/proc/device-tree/compatible"): with open("/proc/device-tree/compatible", "rb") as f: -- 2.49.0