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

Update location of the stable_abi.py script #1103

Merged
merged 1 commit into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions developer-workflow/c-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ Adding a new definition to the Limited API

.. code-block:: shell

./python ./Tools/scripts/stable_abi.py --generate-all ./Misc/stable_abi.toml
./python ./Tools/build/stable_abi.py --generate-all ./Misc/stable_abi.toml

- Build Python and check the using ``make check-limited-abi``.
On platforms without ``make``, run this command directly:

.. code-block:: shell

./python ./Tools/scripts/stable_abi.py --all ./Misc/stable_abi.toml
./python ./Tools/build/stable_abi.py --all ./Misc/stable_abi.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one still fails on my machine with a fresh build of 3.12 FYI:

> python ./Tools/build/stable_abi.py --all ./Misc/stable_abi.toml
Running Debug|x64 interpreter...
Traceback (most recent call last):
  File "C:\Users\alexw\coding\cpython\Tools\build\stable_abi.py", line 757, in <module>
    main()
  File "C:\Users\alexw\coding\cpython\Tools\build\stable_abi.py", line 723, in main
    results['unixy_check'] = do_unixy_check(manifest, args)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\alexw\coding\cpython\Tools\build\stable_abi.py", line 394, in do_unixy_check
    present_macros = gcc_get_limited_api_macros(['Include/Python.h'])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\alexw\coding\cpython\Tools\build\stable_abi.py", line 526, in gcc_get_limited_api_macros
    sysconfig.get_config_var("CC").split()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

But at least the instructions now point to scripts that actually exist 😆


- Add tests -- see below.

Expand Down