From 71170ebbd4d7ee7d90fc66d6a19b69016e630e98 Mon Sep 17 00:00:00 2001 From: Jack Thomasson <4302889+jkt628@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:07:09 -0400 Subject: [PATCH] PY_SSIZE_T_CLEAN is required since python 3.8 otherwise headers are lost --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index f501b10..c174e82 100644 --- a/setup.py +++ b/setup.py @@ -184,6 +184,7 @@ def strikethrough(self, text): from sys import version_info from setuptools import Extension, setup +import sysconfig _version = '2' if version_info[0] == 2 else '3' @@ -201,6 +202,8 @@ def strikethrough(self, text): 'ext/hoedown/version.c' ] +extra_compile_args = sysconfig.get_config_var('CFLAGS').split() +extra_compile_args += ["-DPY_SSIZE_T_CLEAN"] setup( name = 'hoep', @@ -216,6 +219,7 @@ def strikethrough(self, text): ext_modules = [ Extension( 'hoep', + extra_compile_args = extra_compile_args, sources = _sources ) ],