OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Rename Include/internals/ to Include/pycore/


Le jeu. 1 nov. 2018 ? 16:38, Steve Dower <steve.dower at python.org> a ?crit :
> I assume the redundancy was there to handle the naming collision
> problem, but a better way to do that is to have only header files that
> users should ever use in "include/", and put the rest inside
> "include/python/" and "include/internal/" (and if possible, we don't
> distribute the internal directory as part of -develop packages, which
> only really impacts the Windows installer as far as we're concerned, but
> I assume some distros will care).

Aha, I didn't try this approach. I counted 41 Include/ header files
which are not included by Python.h:

Python-ast.h
abstract.h
asdl.h
ast.h
bitset.h
bytes_methods.h
bytesobject.h
code.h
codecs.h
datetime.h
dictobject.h
dynamic_annotations.h
errcode.h
fileobject.h
frameobject.h
graminit.h
grammar.h
longintrepr.h
marshal.h
metagrammar.h
node.h
opcode.h
osdefs.h
parsetok.h
patchlevel.h
pgen.h
pgenheaders.h
py_curses.h
pydtrace.h
pyexpat.h
pystrhex.h
pythonrun.h
pythread.h
pytime.h
setobject.h
structmember.h
symtable.h
token.h
ucnhash.h
unicodeobject.h

For Py_BUILD_CORE, there is at least datetime.h which may be a
Include/internal/ twin header.

Now I'm not sure how it's going to fit with the second step, "Move
!Py_LIMITED_API to Include/pycapi/":
https://bugs.python.org/issue35134

Victor