Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[revamp] Invalid syntax for python3 #444

Closed
thopiekar opened this issue Sep 9, 2015 · 5 comments
Closed

[revamp] Invalid syntax for python3 #444

thopiekar opened this issue Sep 9, 2015 · 5 comments
Labels

Comments

@thopiekar
Copy link
Contributor

Just tested our new python-for-android packages after one week and well found this while I think it will be easy to fix.

python3-pythonforandroid (0.0.0-0~201509020917~rev465~pkg4~revamp~ubuntu15.10.1) wird eingerichtet ...
  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/compiler.py", line 33
    exec '(0 if 0 else 0)'
                         ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/environment.py", line 552
    info.external_attr = 0755 << 16L
                            ^
SyntaxError: invalid token

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/utils.py", line 51
    except TypeError, _error:
                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/debug.py", line 21
    exec "raise TypeError, 'foo'"
                                ^
SyntaxError: Missing parentheses in call to 'exec'

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/ext.py", line 539
    except TemplateSyntaxError, e:
                              ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/lexer.py", line 528
    except Exception, e:
                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/filters.py", line 618
    def __new__(cls, (key, value)):
                     ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/build.py", line 186
    print '%s: %s' % (tfn, fn)
                 ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/compiler.py", line 33
    exec '(0 if 0 else 0)'
                         ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/environment.py", line 552
    info.external_attr = 0755 << 16L
                            ^
SyntaxError: invalid token

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/utils.py", line 51
    except TypeError, _error:
                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/debug.py", line 21
    exec "raise TypeError, 'foo'"
                                ^
SyntaxError: Missing parentheses in call to 'exec'

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/ext.py", line 539
    except TemplateSyntaxError, e:
                              ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/lexer.py", line 528
    except Exception, e:
                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/filters.py", line 618
    def __new__(cls, (key, value)):
                     ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/build.py", line 186
    print '%s: %s' % (tfn, fn)
                 ^
SyntaxError: invalid syntax
@thopiekar thopiekar changed the title [revamp] Wrong syntax for python3 [revamp] Invalid syntax for python3 Sep 9, 2015
@dvenkatsagar
Copy link
Contributor

@thopiekar
Ok Ill check it out and fix it.
I just need to know what you did ....

@thopiekar
Copy link
Contributor Author

Made packages for our Daily PPA. Installed the packages for testing, but dh_python3 (a debhelper tool) checks the syntax of python3 packages on installation. The result is what I get above.

dvenkatsagar added a commit to dvenkatsagar/python-for-android that referenced this issue Sep 10, 2015
@dvenkatsagar
Copy link
Contributor

@thopiekar
Well I changed them to python3 syntax but I haven't tested. Ill keep a pull request, so check it out.

inclement added a commit that referenced this issue Sep 12, 2015
[revamp] Fixed some invalid python syntax errors in the pygame builds. Fixes #444
@thopiekar
Copy link
Contributor Author

@dvenkatsagar Your PR fixed a lot, but there is still something left.
Thank you for your effort and time 👍

python3-pythonforandroid (0.0.0-0~201509121631~rev469~pkg4~revamp~ubuntu15.10.1) wird eingerichtet ...
  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/environment.py", line 552
    info.external_attr = 0o755 << 16L
                                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/utils.py", line 60
    raise exc_type, exc_value, tb.tb_next
                  ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/debug.py", line 162
    raise exc_info[0], exc_info[1], exc_info[2]
                     ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/build.py", line 309
    print 'An error occured while calling', ANDROID, 'update'
                                         ^
SyntaxError: Missing parentheses in call to 'print'

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/environment.py", line 552
    info.external_attr = 0o755 << 16L
                                    ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/utils.py", line 60                                                                                                               
    raise exc_type, exc_value, tb.tb_next                                                                                                                                                                                                   
                  ^                                                                                                                                                                                                                         
SyntaxError: invalid syntax                                                                                                                                                                                                                 

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/buildlib/jinja2.egg/jinja2/debug.py", line 162                                                                                                              
    raise exc_info[0], exc_info[1], exc_info[2]                                                                                                                                                                                             
                     ^                                                                                                                                                                                                                      
SyntaxError: invalid syntax                                                                                                                                                                                                                 

  File "/usr/lib/python3/dist-packages/pythonforandroid/bootstraps/pygame/build/build.py", line 309                                                                                                                                         
    print 'An error occured while calling', ANDROID, 'update'                                                                                                                                                                               
                                         ^                                                                                                                                                                                                  
SyntaxError: Missing parentheses in call to 'print'

@dvenkatsagar
Copy link
Contributor

Ok ill just try to port the entire package to python 3..... will get back in some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants