digital-chemistry-laboratory / libconeangle

Library for calculating exact ligand cone angles
MIT License
12 stars 1 forks source link

libconeangle (0.1.2) not supporting PEP 517 builds #18

Open nhadler opened 11 months ago

nhadler commented 11 months ago

When I try to install libconeangle as part of a python 3.11 poetry package, it throws this error:

Using version ^0.1.2 for libconeangle

Updating dependencies
Resolving dependencies... (2.4s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing libconeangle (0.1.2): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  --------------------------------------------------------------------------------
  -- Trying 'Ninja' generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  Not searching for unused variables given on the command line.

  -- The C compiler identification is GNU 4.8.5
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 4.8.5
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.6s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/tmp7x43z05d/libconeangle-0.1.2/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Ninja' generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      /tmp/tmp7x43z05d/libconeangle-0.1.2/_skbuild/linux-x86_64-3.11/cmake-build
    Command:
      /tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/cmake/data/bin/cmake /tmp/tmp7x43z05d/libconeangle-0.1.2 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/tmp7x43z05d/libconeangle-0.1.2/_skbuild/linux-x86_64-3.11/cmake-install -DPYTHON_VERSION_STRING:STRING=3.11.5 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/tmp/tmpru0t5nna/.venv/bin/python -DPYTHON_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPYTHON_LIBRARY:PATH=/home/nhadler/mambaforge/envs/libra-ml/lib/libpython3.11.so -DPython_EXECUTABLE:PATH=/tmp/tmpru0t5nna/.venv/bin/python -DPython_ROOT_DIR:PATH=/tmp/tmpru0t5nna/.venv -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPython3_EXECUTABLE:PATH=/tmp/tmpru0t5nna/.venv/bin/python -DPython3_ROOT_DIR:PATH=/tmp/tmpru0t5nna/.venv -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/ninja/data/bin/ninja -DSKBUILD=ON -DCMAKE_BUILD_TYPE:STRING=Release

  Not searching for unused variables given on the command line.
  -- The Fortran compiler identification is GNU 4.8.5
  -- Detecting Fortran compiler ABI info
  -- Detecting Fortran compiler ABI info - done
  -- Check for working Fortran compiler: /usr/bin/f95 - skipped
  -- Retrieving stdlib from https://github.com/fortran-lang/stdlib
  -- Performing Test WITH_CBOOL
  -- Performing Test WITH_CBOOL - Success
  CMake Error at _skbuild/linux-x86_64-3.11/cmake-build/_deps/fortran_stdlib-src/CMakeLists.txt:31 (message):
    GCC Version 9 or newer required

  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
      env = cmkr.configure(
            ^^^^^^^^^^^^^^^
    File "/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/skbuild/cmaker.py", line 357, in configure
      raise SKBuildError(msg)

  An error occurred while configuring with CMake.
    Command:
      /tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/cmake/data/bin/cmake /tmp/tmp7x43z05d/libconeangle-0.1.2 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/tmp7x43z05d/libconeangle-0.1.2/_skbuild/linux-x86_64-3.11/cmake-install -DPYTHON_VERSION_STRING:STRING=3.11.5 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/tmp/tmpru0t5nna/.venv/bin/python -DPYTHON_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPYTHON_LIBRARY:PATH=/home/nhadler/mambaforge/envs/libra-ml/lib/libpython3.11.so -DPython_EXECUTABLE:PATH=/tmp/tmpru0t5nna/.venv/bin/python -DPython_ROOT_DIR:PATH=/tmp/tmpru0t5nna/.venv -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPython3_EXECUTABLE:PATH=/tmp/tmpru0t5nna/.venv/bin/python -DPython3_ROOT_DIR:PATH=/tmp/tmpru0t5nna/.venv -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/tmpru0t5nna/.venv/lib/python3.11/site-packages/ninja/data/bin/ninja -DSKBUILD=ON -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /tmp/tmp7x43z05d/libconeangle-0.1.2
    Working directory:
      /tmp/tmp7x43z05d/libconeangle-0.1.2/_skbuild/linux-x86_64-3.11/cmake-build
  Please see CMake's output for more information.

  at ~/mambaforge/envs/libra-ml/lib/python3.11/site-packages/poetry/installation/chef.py:147 in _prepare
      143│ 
      144│                 error = ChefBuildError("\n\n".join(message_parts))
      145│ 
      146│             if error is not None:
    → 147│                 raise error from None
      148│ 
      149│             return path
      150│ 
      151│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with libconeangle (0.1.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "libconeangle (==0.1.2)"'.

I tried to install is verify it via the command it suggested, and it threw an breaking error:

Collecting libconeangle==0.1.2
  Using cached libconeangle-0.1.2.tar.gz (36 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy>=1.20 (from libconeangle==0.1.2)
  File was already downloaded /home/nhadler/projects/Auto-Hydroformylation/numpy-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Building wheels for collected packages: libconeangle
  Building wheel for libconeangle (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for libconeangle (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]

      --------------------------------------------------------------------------------
      -- Trying 'Ninja' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.

      Not searching for unused variables given on the command line.

      -- The C compiler identification is GNU 4.8.5
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is GNU 4.8.5
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done (0.5s)
      -- Generating done (0.0s)
      -- Build files have been written to: /tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e/_cmake_test_compile/build
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja' generator - success
      --------------------------------------------------------------------------------

      Configuring Project
        Working directory:
          /tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e/_skbuild/linux-x86_64-3.11/cmake-build
        Command:
          /tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake /tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e/_skbuild/linux-x86_64-3.11/cmake-install -DPYTHON_VERSION_STRING:STRING=3.11.5 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/home/nhadler/mambaforge/envs/libra-ml/bin/python3.11 -DPYTHON_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPYTHON_LIBRARY:PATH=/home/nhadler/mambaforge/envs/libra-ml/lib/libpython3.11.so -DPython_EXECUTABLE:PATH=/home/nhadler/mambaforge/envs/libra-ml/bin/python3.11 -DPython_ROOT_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPython3_EXECUTABLE:PATH=/home/nhadler/mambaforge/envs/libra-ml/bin/python3.11 -DPython3_ROOT_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -DSKBUILD=ON -DCMAKE_BUILD_TYPE:STRING=Release

      Not searching for unused variables given on the command line.
      -- The Fortran compiler identification is GNU 4.8.5
      -- Detecting Fortran compiler ABI info
      -- Detecting Fortran compiler ABI info - done
      -- Check for working Fortran compiler: /usr/bin/f95 - skipped
      -- Retrieving stdlib from https://github.com/fortran-lang/stdlib
      -- Performing Test WITH_CBOOL
      -- Performing Test WITH_CBOOL - Success
      CMake Error at _skbuild/linux-x86_64-3.11/cmake-build/_deps/fortran_stdlib-src/CMakeLists.txt:31 (message):
        GCC Version 9 or newer required

      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
          env = cmkr.configure(
                ^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 357, in configure
          raise SKBuildError(msg)

      An error occurred while configuring with CMake.
        Command:
          /tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake /tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e/_skbuild/linux-x86_64-3.11/cmake-install -DPYTHON_VERSION_STRING:STRING=3.11.5 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/home/nhadler/mambaforge/envs/libra-ml/bin/python3.11 -DPYTHON_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPYTHON_LIBRARY:PATH=/home/nhadler/mambaforge/envs/libra-ml/lib/libpython3.11.so -DPython_EXECUTABLE:PATH=/home/nhadler/mambaforge/envs/libra-ml/bin/python3.11 -DPython_ROOT_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DPython3_EXECUTABLE:PATH=/home/nhadler/mambaforge/envs/libra-ml/bin/python3.11 -DPython3_ROOT_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/nhadler/mambaforge/envs/libra-ml/include/python3.11 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-uekriyld/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -DSKBUILD=ON -DCMAKE_BUILD_TYPE:STRING=Release
        Source directory:
          /tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e
        Working directory:
          /tmp/pip-wheel-3axobsjb/libconeangle_f6242c66cbe2486b8904d16b757cef1e/_skbuild/linux-x86_64-3.11/cmake-build
      Please see CMake's output for more information.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for libconeangle
Failed to build libconeangle
ERROR: Failed to build one or more wheels
kjelljorner commented 11 months ago

This is because there is no pre-built wheels for Python 3.11 and it attempts to build it from source instead. I would need to update the build script here and on Conda-forge to do that. I'll put it on my todo-list, but a workaround for now is to use Python 3.10 instead. Alternatively, you can install GCC > 9 and the error might be resolved.