Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-35081: Internal headers require Py_BUILD_CORE #10363

Merged
merged 2 commits into from
Nov 9, 2018
Merged

bpo-35081: Internal headers require Py_BUILD_CORE #10363

merged 2 commits into from
Nov 9, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 6, 2018

Modify internal header files to fail if Py_BUILD_CORE is not defined.

https://bugs.python.org/issue35081

@vstinner
Copy link
Member Author

vstinner commented Nov 6, 2018

I tried to modify pycore_accu.h, but it broke the compilation of the _json module:
https://mail.python.org/pipermail/python-dev/2018-November/155688.html

I don't understand what is Py_BUILD_CORE_BUILTIN and how it should be used.

* 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.
@vstinner vstinner changed the title [WIP] bpo-35081: More internal headers require Py_BUILD_CORE bpo-35081: Internal headers require Py_BUILD_CORE Nov 9, 2018
Add an example to show how to build _json as a built-in module.
It requires non trivial compiler options.
@vstinner vstinner merged commit 130893d into python:master Nov 9, 2018
@vstinner vstinner deleted the need_build_pycore branch November 9, 2018 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants