Files
nuitka-mirror/bin/generate-specialized-offsets-code
Kay Hayen 5fc6298cac Module: Fix, 3.13 and 3.14 backports breaking module mode compatibility across micro versions
* We now generate modified Python headers in case of affected versions,
  which allows us to not use static offsets but instead corrected for
  values.

* The two value sources are for module mode the corrections based on
  runtime vs. compile time version differences. And for MinGW64 we use
  the static offsets, but we store them in JSON files and then generate
  the header code for it.

* Move the Python include directory detection out of Scons into Nuitka
  so we know before compilation what files to modify.

* Added experimental flag for MinGW64 usage with 3.13+ which works via
  collected offset values for internal structures.

* Enhanced the way we handle experimental flags. Previously they were
  not available during environment creation, but we use that now and
  it is much cleaner this way.
2026-04-26 06:52:05 +02:00

34 lines
1.1 KiB
Python
Executable File

#!/usr/bin/env python3
# Copyright 2026, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
"""Launcher for dynamic CPython JSON offsets data generation tool."""
import os
import sys
# Add the nuitka package to sys.path
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))
# isort:start
from nuitka.tools.general.generate_header.GenerateOffsets import main
main()
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the GNU Affero General Public License, Version 3 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.gnu.org/licenses/agpl.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.