msel-source / pymef

Python wrapper for MEF library
Other
5 stars 3 forks source link

Failed install - Python >3.12 on osx-arm64 #42

Open xmival00 opened 5 months ago

xmival00 commented 5 months ago

Problem Description

Installing pymef on MacOS - osx-arm64.

What steps reproduce the problem?

pip install pymef

Paste Traceback/Error Below (if applicable)


Collecting pymef
  Using cached pymef-1.4.2.tar.gz (134 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy (from pymef)
  Using cached numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl.metadata (61 kB)
Using cached numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl (13.7 MB)
Building wheels for collected packages: pymef
  Building wheel for pymef (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pymef (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      /private/var/folders/6d/gghpm1sn5mv154tm3z8tjh840000gr/T/pip-build-env-c3_i85h2/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:83: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
        corresp(dist, value, root_dir)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.1-arm64-cpython-312
      creating build/lib.macosx-11.1-arm64-cpython-312/pymef
      copying pymef/mef_session.py -> build/lib.macosx-11.1-arm64-cpython-312/pymef
      copying pymef/version.py -> build/lib.macosx-11.1-arm64-cpython-312/pymef
      copying pymef/__init__.py -> build/lib.macosx-11.1-arm64-cpython-312/pymef
      copying pymef/mef_constants.py -> build/lib.macosx-11.1-arm64-cpython-312/pymef
      creating build/lib.macosx-11.1-arm64-cpython-312/pymef/mef_file
      copying pymef/mef_file/__init__.py -> build/lib.macosx-11.1-arm64-cpython-312/pymef/mef_file
      running egg_info
      writing pymef.egg-info/PKG-INFO
      writing dependency_links to pymef.egg-info/dependency_links.txt
      writing requirements to pymef.egg-info/requires.txt
      writing top-level names to pymef.egg-info/top_level.txt
      reading manifest file 'pymef.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.txt'
      writing manifest file 'pymef.egg-info/SOURCES.txt'
      copying pymef/mef_file/pymef3_file.c -> build/lib.macosx-11.1-arm64-cpython-312/pymef/mef_file
      copying pymef/mef_file/pymef3_file.h -> build/lib.macosx-11.1-arm64-cpython-312/pymef/mef_file
      running build_ext
      building 'pymef.mef_file.pymef3_file' extension
      creating build/temp.macosx-11.1-arm64-cpython-312
      creating build/temp.macosx-11.1-arm64-cpython-312/pymef
      creating build/temp.macosx-11.1-arm64-cpython-312/pymef/mef_file
      clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/mivalt.filip/miniconda3/envs/mef-tools/include -arch arm64 -fPIC -O2 -isystem /Users/mivalt.filip/miniconda3/envs/mef-tools/include -arch arm64 -Imeflib/meflib -I/private/var/folders/6d/gghpm1sn5mv154tm3z8tjh840000gr/T/pip-build-env-c3_i85h2/overlay/lib/python3.12/site-packages/numpy/core/include -I/Users/mivalt.filip/miniconda3/envs/mef-tools/include/python3.12 -c pymef/mef_file/pymef3_file.c -o build/temp.macosx-11.1-arm64-cpython-312/pymef/mef_file/pymef3_file.o -O3
      In file included from pymef/mef_file/pymef3_file.c:27:
      pymef/mef_file/pymef3_file.h:277:35: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, PyObject *, PyObject *)' (aka 'struct _object *(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types]
          {"read_mef_session_metadata", read_mef_session_metadata, METH_VARARGS | METH_KEYWORDS, read_mef_session_metadata_docstring},
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
      pymef/mef_file/pymef3_file.h:278:35: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, PyObject *, PyObject *)' (aka 'struct _object *(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types]
          {"read_mef_channel_metadata", read_mef_channel_metadata, METH_VARARGS | METH_KEYWORDS, read_mef_channel_metadata_docstring},
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
      pymef/mef_file/pymef3_file.h:279:35: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, PyObject *, PyObject *)' (aka 'struct _object *(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types]
          {"read_mef_segment_metadata", read_mef_segment_metadata, METH_VARARGS | METH_KEYWORDS, read_mef_segment_metadata_docstring},
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from pymef/mef_file/pymef3_file.c:32:
      meflib/meflib/meflib.c:2558:67: warning: variable 'd' set but not used [-Wunused-but-set-variable]
              sf16                    **a, **inv_a, **ta1, **ta2, *b, *bt, *c, d, t;
                                                                               ^
      meflib/meflib/meflib.c:3665:8: warning: variable 'lock_type' set but not used [-Wunused-but-set-variable]
                      si4             lock_type;
                                      ^
      pymef/mef_file/pymef3_file.c:192:9: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
          if (!strcmp(type,TIME_SERIES_CHANNEL_DIRECTORY_TYPE_STRING) | !strcmp(type,VIDEO_CHANNEL_DIRECTORY_TYPE_STRING)) {
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                      ||
      pymef/mef_file/pymef3_file.c:192:9: note: cast one or both operands to int to silence this warning
      pymef/mef_file/pymef3_file.c:1713:10: warning: variable 'total_samps' set but not used [-Wunused-but-set-variable]
          si8  total_samps;//, samp_counter_base;
               ^
      pymef/mef_file/pymef3_file.c:3721:9: warning: unused variable 'template' [-Wunused-variable]
                      si4             *template = (si4 *) rh + MEFREC_LNTP_1_0_TEMPLATE_OFFSET;
                                       ^
      5 warnings and 3 errors 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 pymef
Failed to build pymef
ERROR: Could not build wheels for pymef, which is required to install pyproject.toml-based projects
(mef-tools) mivalt.filip@r5424403 PycharmProjects % 

Pymef version and platform

Python 3.12 pymef 1.4.2 (latest version - default on pip install) MacOS - osx-arm64

dipterix commented 1 month ago

Same issue here with Python 3.9