mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds. This was usually the case already, but this change guarantees it in all circumstances.
This commit is contained in:
parent
89b744a772
commit
7686c752b3
13 changed files with 68 additions and 78 deletions
|
|
@ -468,7 +468,7 @@ def get_config_h_filename():
|
|||
"""Return the path of pyconfig.h."""
|
||||
if _PYTHON_BUILD:
|
||||
if os.name == "nt":
|
||||
inc_dir = os.path.dirname(sys._base_executable)
|
||||
inc_dir = os.path.join(_PROJECT_BASE, 'PC')
|
||||
else:
|
||||
inc_dir = _PROJECT_BASE
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -531,13 +531,10 @@ def test_srcdir(self):
|
|||
Python_h = os.path.join(srcdir, 'Include', 'Python.h')
|
||||
self.assertTrue(os.path.exists(Python_h), Python_h)
|
||||
# <srcdir>/PC/pyconfig.h.in always exists even if unused
|
||||
pyconfig_h = os.path.join(srcdir, 'PC', 'pyconfig.h.in')
|
||||
self.assertTrue(os.path.exists(pyconfig_h), pyconfig_h)
|
||||
pyconfig_h_in = os.path.join(srcdir, 'pyconfig.h.in')
|
||||
self.assertTrue(os.path.exists(pyconfig_h_in), pyconfig_h_in)
|
||||
if os.name == 'nt':
|
||||
# <executable dir>/pyconfig.h exists on Windows in a build tree
|
||||
pyconfig_h = os.path.join(sys.executable, '..', 'pyconfig.h')
|
||||
pyconfig_h = os.path.join(srcdir, 'PC', 'pyconfig.h')
|
||||
self.assertTrue(os.path.exists(pyconfig_h), pyconfig_h)
|
||||
elif os.name == 'posix':
|
||||
makefile_dir = os.path.dirname(sysconfig.get_makefile_filename())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue