build pyjnius==1.4.0 wheel on m1

378 views
Skip to first unread message

Vitalii Heria

unread,
Aug 8, 2023, 9:56:15 AM8/8/23
to Kivy users support
Hi,
I'm trying to install the dependency of pyliquibase==2.0.7 on Python 3.9.16.
It transitively installs pyjnius==1.4.0 and tries to build a wheel and fails within an error:

pyjnius==1.5.0 installed successfully

Building wheels for collected packages: pyjnius
  Building wheel for pyjnius (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pyjnius (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      warning: [options] bootstrap class path not set in conjunction with -source 1.7
      1 warning
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13.4-arm64-cpython-39
      copying jnius_config.py -> build/lib.macosx-13.4-arm64-cpython-39
      copying setup_sdist.py -> build/lib.macosx-13.4-arm64-cpython-39
      creating build/lib.macosx-13.4-arm64-cpython-39/jnius
      copying jnius/__init__.py -> build/lib.macosx-13.4-arm64-cpython-39/jnius
      copying jnius/env.py -> build/lib.macosx-13.4-arm64-cpython-39/jnius
      copying jnius/signatures.py -> build/lib.macosx-13.4-arm64-cpython-39/jnius
      copying jnius/reflect.py -> build/lib.macosx-13.4-arm64-cpython-39/jnius
      creating build/lib.macosx-13.4-arm64-cpython-39/jnius/src
      creating build/lib.macosx-13.4-arm64-cpython-39/jnius/src/org
      creating build/lib.macosx-13.4-arm64-cpython-39/jnius/src/org/jnius
      copying jnius/src/org/jnius/NativeInvocationHandler.java -> build/lib.macosx-13.4-arm64-cpython-39/jnius/src/org/jnius
      copying jnius/src/org/jnius/NativeInvocationHandler.class -> build/lib.macosx-13.4-arm64-cpython-39/jnius/src/org/jnius
      running build_ext
      warning: jnius/config.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/config.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/jnius.pyx:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/config.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/config.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/jnius_jvm_dlopen.pxi:57:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/jnius.pyx:113:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      Compiling jnius/jnius.pyx because it changed.
      [1/1] Cythonizing jnius/jnius.pyx
      building 'jnius' extension
      error: unknown file type '.pxi' (from 'jnius/jni.pxi')
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyjnius
Failed to build pyjnius
ERROR: Could not build wheels for pyjnius, which is required to install pyproject.toml-based projects

Robert

unread,
Aug 8, 2023, 3:25:33 PM8/8/23
to Kivy users support
There are no m1 binaries in the macos wheels 

See also 
https://github.com/kivy/pyjnius/issues/662    (its a bug)
https://github.com/kivy/pyjnius/issues/663    (potential workaround)
https://github.com/kivy/pyjnius/issues/663#issuecomment-1653502155  (describes your situation exactly)
Reply all
Reply to author
Forward
0 new messages