summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-09 12:03:37 (GMT)
committerGitHub <noreply@github.com>2018-11-09 12:03:37 (GMT)
commit130893debfd97c70e3a89d9ba49892f53e6b9d79 (patch)
tree35b45b8939a9ab75ec470f0defb37d1ee1f8c77e /setup.py
parent0a18e0510a145427d8ff1864a011c81ea02cdcd4 (diff)
downloadcpython-130893debfd97c70e3a89d9ba49892f53e6b9d79.zip
cpython-130893debfd97c70e3a89d9ba49892f53e6b9d79.tar.gz
cpython-130893debfd97c70e3a89d9ba49892f53e6b9d79.tar.bz2
bpo-35081: Internal headers require Py_BUILD_CORE (GH-10363)
* All internal header files now require Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN to be defined. * _json.c is now compiled with Py_BUILD_CORE_BUILTIN to access pycore_accu.h header. * Add an example to Modules/Setup to show how to build _json as a built-in module; it requires non trivial compiler options.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 37c5dd5..b87d05d 100644
--- a/setup.py
+++ b/setup.py
@@ -678,7 +678,9 @@ class PyBuildExt(build_ext):
# atexit
exts.append( Extension("atexit", ["atexitmodule.c"]) )
# _json speedups
- exts.append( Extension("_json", ["_json.c"]) )
+ exts.append( Extension("_json", ["_json.c"],
+ # pycore_accu.h requires Py_BUILD_CORE_BUILTIN
+ extra_compile_args=['-DPy_BUILD_CORE_BUILTIN']) )
# Python C API test module
exts.append( Extension('_testcapi', ['_testcapimodule.c'],
depends=['testcapi_long.h']) )