jonasschneider / box2d-py

Other
6 stars 34 forks source link

Undeclared build-time dependencies (Swig) #1

Open manucalop opened 1 year ago

manucalop commented 1 year ago

How to reproduce:

$ docker run --rm -it --entrypoint /bin/bash python:3.10
root@3ce15a9d553a:/# pip install --use-pep517 box2d-py
Collecting box2d-py
  Downloading box2d-py-2.3.8.tar.gz (374 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 374.5/374.5 kB 5.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: box2d-py
  Building wheel for box2d-py (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for box2d-py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Using setuptools (version 65.5.0).
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-310
      creating build/lib.linux-aarch64-cpython-310/Box2D
      copying library/Box2D/Box2D.py -> build/lib.linux-aarch64-cpython-310/Box2D
      copying library/Box2D/__init__.py -> build/lib.linux-aarch64-cpython-310/Box2D
      creating build/lib.linux-aarch64-cpython-310/Box2D/b2
      copying library/Box2D/b2/__init__.py -> build/lib.linux-aarch64-cpython-310/Box2D/b2
      running build_ext
      building 'Box2D._Box2D' extension
      swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
      swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
      error: command 'swig' failed: No such file or directory
      [end of output]

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

Hi there, We have the same issue in https://github.com/Farama-Foundation/Gymnasium/issues/245. Since Swig is now available on PyPI: https://pypi.org/project/swig/, would it be possible to add it as a build-time dependency (as suggested in https://github.com/python-poetry/poetry/issues/6839), so it's not needed to install it beforehand anymore?

kir0ul commented 1 year ago

Friendly ping to @pzhokhov, @kne and @jonasschneider just in case, since it seems I can't open an issue on https://github.com/openai/box2d-py.

craig-sony commented 10 months ago

Any updates on this one?