overdev / raylib-py

A Python binding for the great C library raylib.
Other
185 stars 20 forks source link

import error on raspberry pi #8

Closed Siiiimon closed 5 years ago

Siiiimon commented 5 years ago

Hi,

I have a fresh install of the raspbian minimal image, installed all the necessary prerequisites and tried to run from raylibpy import * which failed with the following:

Traceback (most recent call last): File "main.py", line 1, in <module> from raylibpy import * File "/home/pi/.local/lib/python3.5/site-packages/raylibpy/__init__.py", line 3088 files: list = [] ^ SyntaxError: invalid syntax

using Python 3.5.3

thanks for looking into it and any help is appreciated!

overdev commented 5 years ago

Hi, @Siiiimon. Sorry for the delay.

Hmm... this seems to be in the get_dropped_files() function. That happens because there's a local variable with type annotation https://github.com/overdev/raylib-py/blob/bcdafc95899bf2de58f2feccf99858d2894056f8/raylibpy/__init__.py#L3094 that is not supported by Python versions earlier than 3.6.

I'll just have to remove the type annotation. Thanks for the catch! I'll fix it ASAP.

overdev commented 5 years ago

Fixed the source, at last.