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

[Packaging][Docs] Pyodide builds have incorrect NumPy 2.0 header location and assume pyodide-build to be the same version as Pyodide #45071

Closed
agriyakhetarpal opened this issue Dec 18, 2024 · 1 comment · Fixed by #45072

Comments

@agriyakhetarpal
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

Hi there, we're trying to build PyArrow against NumPy v2 as a part of pyodide/pyodide#4925 and we are targeting an imminent 0.27 release soon after. I've opened this issue to put to light, that:

  • the Pyodide builds are against NumPy 1.X right now, but building against 2.X has a problem because the NumPy headers were moved from numpy/core/include to numpy/_core/include/:

    arrow/python/CMakeLists.txt

    Lines 163 to 177 in b655852

    if($ENV{PYODIDE})
    # These variables are needed for building PyArrow on Emscripten.
    # If they aren't set, CMake cross compiling fails for Python
    # modules (at least under Pyodide it does).
    set(Python3_INCLUDE_DIR $ENV{PYTHONINCLUDE})
    set(Python3_LIBRARY $ENV{CPYTHONLIB})
    set(Python3_NumPy_INCLUDE_DIR $ENV{NUMPY_LIB}/core/include)
    set(Python3_EXECUTABLE)
    set(ENV{_PYTHON_SYSCONFIGDATA_NAME} $ENV{SYSCONFIG_NAME})
    # we set the c and cxx compiler manually to bypass pywasmcross
    # which is pyodide's way of messing with C++ build parameters.
    set(CMAKE_C_COMPILER emcc)
    set(CMAKE_CXX_COMPILER em++)
    endif()

  • the documentation mentions in a few places that the version of pyodide-build must match the Pyodide version – this is no longer the case, since, we have unvendored pyodide-build to a separate repository and now maintain a list of compatible versions against Pyodide.

  • the Pyodide and Emscripten versions are slightly out of date in a few places

I already have a pull request coming for addressing these changes, but since this was also concerning CI/packaging and not just documentation, the Contributing guide suggested that I should open an issue first before opening a pull request.

Thanks for your time!

Component(s)

Python

@kou
Copy link
Member

kou commented Dec 20, 2024

Issue resolved by pull request 45072
#45072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment