jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
357 stars 59 forks source link

Not compiling since 2.3.0. IndexError: list index out of range #136

Closed algent-al closed 2 years ago

algent-al commented 2 years ago

This page is for reporting problems with the Python interface to libgphoto2. If your question is about using libgphoto2 you should ask on the gphoto2 mailing list.

Your system What version of Python are you using? python3 version: 3.9.9

What version of libgphoto2 have you installed? libgphoto2 v2.5.28

How have you installed (or attempted to install) python-gphoto2? Packaging in Solus.

Your problem Please describe what you are trying to do and what goes wrong. A short Python script that shows the problem may be useful. I get this error:

Traceback (most recent call last):
  File "/var/cache/solbuild/unstable-x86_64/python-gphoto2/tmp/home/build/YPKG/root/python-gphoto2/build/python-gphoto2-2.3.2/setup.py", line 108, in <module>
    swigged_version = swigged_versions[0]
IndexError: list index out of range

Usig swig version 4.0.2

jim-easterbrook commented 2 years ago

You need to run SWIG before running setup.py, as described in the README. This generates the "swigged" files that setup.py compiles.

algent-al commented 2 years ago

Oh, I should have run python3 developer/build_swig.py system. Now it is compiling. Thank you!

jim-easterbrook commented 2 years ago

Is having to run SWIG a big hassle for packaging? If there's anything I can do to make a packager's job easier I would welcome suggestions.

I haven't included the SWIG generated files in the GitHub repository as they're quite large and not really source files. If I added them people would not need to run SWIG at all.

algent-al commented 2 years ago

Is having to run SWIG a big hassle for packaging?

I think it is fine as it is.