Skip to content

install issue with uv for python >=3.13 #338

@Remi-Gau

Description

@Remi-Gau

Am having issues try to install the package locally using pip:

uv venv -p 3.14 
source .venv/bin/activate
uv pip install .

Error

Resolved 25 packages in 400ms
      Built sphinxcontrib-matlabdomain @ file:///home/remi-gau/github/matlabdomain
  × Failed to build `tree-sitter-matlab==1.0.4`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      copying bindings/python/tree_sitter_matlab/__init__.py -> build/lib.linux-x86_64-cpython-314t/tree_sitter_matlab
      running egg_info
      writing bindings/python/tree_sitter_matlab.egg-info/PKG-INFO
      writing dependency_links to bindings/python/tree_sitter_matlab.egg-info/dependency_links.txt
      writing requirements to bindings/python/tree_sitter_matlab.egg-info/requires.txt
      writing top-level names to bindings/python/tree_sitter_matlab.egg-info/top_level.txt
      reading manifest file 'bindings/python/tree_sitter_matlab.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'bindings/python/tree_sitter_matlab.egg-info/SOURCES.txt'
      copying bindings/python/tree_sitter_matlab/__init__.pyi -> build/lib.linux-x86_64-cpython-314t/tree_sitter_matlab
      copying bindings/python/tree_sitter_matlab/binding.c -> build/lib.linux-x86_64-cpython-314t/tree_sitter_matlab
      copying bindings/python/tree_sitter_matlab/py.typed -> build/lib.linux-x86_64-cpython-314t/tree_sitter_matlab
      running build_ext
      building '_binding' extension
      cc -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -fPIC -fPIC
      -DPy_LIMITED_API=0x03080000 -DPY_SSIZE_T_CLEAN -Isrc -I/home/remi-gau/.cache/uv/builds-v0/.tmpa0dkAQ/include
      -I/home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t
      -c bindings/python/tree_sitter_matlab/binding.c -o
      build/temp.linux-x86_64-cpython-314t/bindings/python/tree_sitter_matlab/binding.o -std=c11

      [stderr]
      /home/remi-gau/.cache/uv/builds-v0/.tmpa0dkAQ/lib/python3.14t/site-packages/setuptools/config/_apply_pyprojecttoml.py:82:
      SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
      !!

              ********************************************************************************
              Please use a simple string containing a SPDX expression for `project.license`. You can also use
      `project.license-files`. (Both options available on setuptools>=77.0.0).

              By 2026-Feb-18, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        corresp(dist, value, root_dir)
      /home/remi-gau/.cache/uv/builds-v0/.tmpa0dkAQ/lib/python3.14t/site-packages/setuptools/config/_apply_pyprojecttoml.py:61:
      SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: MIT License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        dist._finalize_license_expression()
      /home/remi-gau/.cache/uv/builds-v0/.tmpa0dkAQ/lib/python3.14t/site-packages/setuptools/dist.py:759:
      SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: MIT License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      In file included from bindings/python/tree_sitter_matlab/binding.c:1:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/Python.h:51:4:
      error: #error "The limited API is not currently supported in the free-threaded build"
         51 | #  error "The limited API is not currently supported in the free-threaded build"
            |    ^~~~~
      In file included from
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/Python.h:81:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/object.h:158:5:
      error: unknown type name ‘PyMutex’
        158 |     PyMutex ob_mutex;           // per-object lock
            |     ^~~~~~~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/object.h:
      In function ‘Py_SET_SIZE’:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/object.h:311:5:
      warning: implicit declaration of function ‘_Py_atomic_store_ssize_relaxed’ [-Wimplicit-function-declaration]
        311 |     _Py_atomic_store_ssize_relaxed(&ob->ob_size, size);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/Python.h:82:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:
      In function ‘_Py_REFCNT’:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:109:26:
      warning: implicit declaration of function ‘_Py_atomic_load_uint32_relaxed’ [-Wimplicit-function-declaration]
        109 |         uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:113:29:
      warning: implicit declaration of function ‘_Py_atomic_load_ssize_relaxed’ [-Wimplicit-function-declaration]
        113 |         Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
            |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:
      In function ‘_Py_IsImmortal’:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:126:63:
      warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
        126 |     return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
            |                                                               ^~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:
      In function ‘Py_SET_REFCNT’:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:171:9:
      warning: implicit declaration of function ‘_Py_IsOwnedByCurrentThread’ [-Wimplicit-function-declaration]
        171 |     if (_Py_IsOwnedByCurrentThread(ob)) {
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:
      In function ‘Py_INCREF’:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:274:9:
      warning: implicit declaration of function ‘_Py_atomic_store_uint32_relaxed’ [-Wimplicit-function-declaration]
        274 |         _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:277:9:
      warning: implicit declaration of function ‘_Py_atomic_add_ssize’; did you mean ‘__atomic_add_fetch’?
      [-Wimplicit-function-declaration]
        277 |         _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
            |         ^~~~~~~~~~~~~~~~~~~~
            |         __atomic_add_fetch
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:
      In function ‘Py_DECREF’:
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:373:13:
      warning: implicit declaration of function ‘_Py_MergeZeroLocalRefcount’ [-Wimplicit-function-declaration]
        373 |             _Py_MergeZeroLocalRefcount(op);
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/remi-gau/.local/share/uv/python/cpython-3.14.0+freethreaded-linux-x86_64-gnu/include/python3.14t/refcount.h:377:9:
      warning: implicit declaration of function ‘_Py_DecRefShared’; did you mean ‘_Py_DecRef’?
      [-Wimplicit-function-declaration]
        377 |         _Py_DecRefShared(op);
            |         ^~~~~~~~~~~~~~~~
            |         _Py_DecRef
      bindings/python/tree_sitter_matlab/binding.c: At top level:
      bindings/python/tree_sitter_matlab/binding.c:18:5: warning: braces around scalar initializer
         18 |     .m_base = PyModuleDef_HEAD_INIT,
            |     ^
      bindings/python/tree_sitter_matlab/binding.c:18:5: note: (near initialization for
      ‘module.m_base.ob_base.ob_mutex’)
      error: command '/usr/bin/cc' failed with exit code 1

      hint: This usually indicates a problem with the package or the build environment.
  help: `tree-sitter-matlab` (v1.0.4) was included because `sphinxcontrib-matlabdomain` (v0.22.2.dev50+g56c515fab)
        depends on `tree-sitter-matlab`

Note that this only happens for python >= 3.13.

From the error message this is an upstream error due to tree-sitter-matlab

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions