Skip to content

Wheel not being built. MacOS. #24

Open
@jamesgwen

Description

@jamesgwen

Trying to install python-javabridge as part of a github actions for MacOS. For Windows/Linux, I do not have a problem but when running the tests on MacOS, I get the following error message about the wheel not being built.

This happens with Python 3.8/9/10.

Run pip install python-javabridge==4.0.3
Collecting python-javabridge==4.0.3
  Downloading python-javabridge-4.0.3.tar.gz (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 29.0 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: numpy>=1.20.1 in /Users/runner/micromamba/envs/pathml/lib/python3.[8](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:9)/site-packages (from python-javabridge==4.0.3) (1.23.5)
Building wheels for collected packages: python-javabridge
  Building wheel for python-javabridge (setup.py): started
  Building wheel for python-javabridge (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [145 lines of output]
      /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!
      
              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************
      
      !!
        dist.fetch_build_eggs(dist.setup_requires)
      /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/setuptools/_distutils/dist.py:268: UserWarning: Unknown distribution option: 'tests_require'
        warnings.warn(msg)
      /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/setuptools/_distutils/dist.py:268: UserWarning: Unknown distribution option: 'test_suite'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-38
      creating build/lib.macosx-11.0-arm64-cpython-38/javabridge
      copying javabridge/jutil.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge
      copying javabridge/locate.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge
      copying javabridge/__init__.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge
      copying javabridge/wrappers.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge
      copying javabridge/noseplugin.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge
      creating build/lib.macosx-11.0-arm64-cpython-38/javabridge/tests
      copying javabridge/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/tests
      copying javabridge/tests/test_cpython.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/tests
      copying javabridge/tests/test_javabridge.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/tests
      copying javabridge/tests/test_jutil.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/tests
      copying javabridge/tests/test_wrappers.py -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/tests
      creating build/lib.macosx-11.0-arm64-cpython-38/javabridge/jars
      copying javabridge/jars/rhino-1.7R4.jar -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/jars
      copying javabridge/jars/runnablequeue.jar -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/jars
      copying javabridge/jars/cpython.jar -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/jars
      copying javabridge/jars/test.jar -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/jars
      copying javabridge/jars/libjava2cpython.jnilib -> build/lib.macosx-11.0-arm64-cpython-38/javabridge/jars
      running build_ext
      javac -source 8 -target 8 /private/var/folders/hw/1f0gcr8d6kn[9](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:10)ms0_wn0_57qc0000gn/T/pip-install-kud_uybf/python-javabridge_2[10](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:11)a4e302dc04e06a09bdee1d1f3c35f/java/org/cellprofiler/runnablequeue/RunnableQueue.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      1 warning
      javac -source 8 -target 8 /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-install-kud_uybf/python-javabridge_210a4e302dc04e06a09bdee1d1f3c35f/java/org/cellprofiler/javabridge/test/RealRect.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      1 warning
      javac -source 8 -target 8 /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-install-kud_uybf/python-javabridge_210a4e302dc04e06a09bdee1d1f3c35f/java/org/cellprofiler/javabridge/CPython.java /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-install-kud_uybf/python-javabridge_210a4e302dc04e06a09bdee1d1f3c35f/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      Note: /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-install-kud_uybf/python-javabridge_210a4e302dc04e06a09bdee1d1f3c35f/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java uses unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      1 warning
      building 'javabridge._javabridge' extension
      creating build/temp.macosx-[11](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:12).0-arm64-cpython-38
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/runner/micromamba/envs/pathml/include -arch arm64 -fPIC -O2 -isystem /Users/runner/micromamba/envs/pathml/include -arch arm64 -I/Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include -I/Users/runner/micromamba/envs/pathml/lib/jvm/include -I/Users/runner/micromamba/envs/pathml/lib/jvm/include/darwin -I/Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include -I/Users/runner/micromamba/envs/pathml/include/python3.8 -c _javabridge.c -o build/temp.macosx-11.0-arm64-cpython-38/_javabridge.o
      In file included from _javabridge.c:610:
      In file included from /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5:
      In file included from /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:[12](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:13):
      In file included from /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948:
      /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      _javabridge.c:5225:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5516:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5749:37: warning: cast to smaller integer type 'int' from 'jclass' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6115:41: warning: cast to smaller integer type 'int' from 'jmethodID' (aka 'struct _jmethodID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6403:41: warning: cast to smaller integer type 'int' from 'jfieldID' (aka 'struct _jfieldID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:21144:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:21278:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:284[13](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:14):3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
        0, /*tp_print*/
        ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
          Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
          ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      _javabridge.c:28513:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
        0, /*tp_print*/
        ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
          Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
          ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      _javabridge.c:28644:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
        0, /*tp_print*/
        ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
          Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
          ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      _javabridge.c:28775:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
        0, /*tp_print*/
        ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
          Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
          ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      _javabridge.c:28878:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
        0, /*tp_print*/
        ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
          Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
          ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      _javabridge.c:29058:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
        0, /*tp_print*/
        ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
          Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
          ^
      /Users/runner/micromamba/envs/pathml/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      _javabridge.c:30352:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
        import_array();
        ^~~~~~~~~~~~~~
      /Users/runner/micromamba/envs/pathml/lib/python3.8/site-packages/numpy/core/include/numpy/__multiarray_api.h:1545:151: note: expanded from macro 'import_array'
      #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                            ^~~~
      /Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
      #  define NULL ((void*)0)
                     ^~~~~~~~~~
      [14](https://github.com/Dana-Farber-AIOS/pathml/actions/runs/10410001612/job/28830849681#step:5:15) warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-javabridge
  Running setup.py clean for python-javabridge
Failed to build python-javabridge
ERROR: Could not build wheels for python-javabridge, which is required to install pyproject.toml-based projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions