donnemartin / gitsome

A supercharged Git/GitHub command line interface (CLI). An official integration for GitHub and GitHub Enterprise: https://github.com/works-with/category/desktop-tools
Other
7.56k stars 437 forks source link

Python 3.6: ply.yacc.YaccError: Unable to build parser #105

Closed simon04 closed 5 years ago

simon04 commented 7 years ago

Running python setup.py install fails with ply.yacc.YaccError: Unable to build parser.

$ python setup.py install

running install
Building lexer and parser tables.
Traceback (most recent call last):
  File "setup.py", line 130, in <module>
    main()
  File "setup.py", line 123, in main
    setup(**skw)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 44, in run
    build_tables()
  File "setup.py", line 37, in build_tables
    outputdir='xonsh')
  File "/home/simon/src/gitsome/xonsh/parser.py", line 233, in __init__
    self.parser = yacc.yacc(**yacc_kwargs)
  File "/usr/lib/python3.6/site-packages/ply/yacc.py", line 3424, in yacc
    raise YaccError('Unable to build parser')
ply.yacc.YaccError: Unable to build parser

System info:

$ python 
Python 3.6.0 (default, Jan 16 2017, 12:12:55) 
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ply
>>> ply.__version__
'3.9'

Edit by donnemartin:

gitsome does not currently support Python 3.6. See this comment for more details and status.

kshitij10496 commented 7 years ago

Even I am facing the same issue with installation on MacOSX Sierra using Python 3.6 as:

$ pip3 install gitsome

donnemartin commented 7 years ago

@simon04 thanks for the report. I'm not able to reproduce on Python 3.5, I'll switch to 3.6 soon and try it out.

johackim commented 7 years ago

:+1:

smit9612 commented 7 years ago

Got same error.

running install Building lexer and parser tables. Traceback (most recent call last): File "", line 1, in File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz380000gn/T/pip-d3ze49_6-build/setup.py", line 130, in main() File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 123, in main setup(**skw) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz380000gn/T/pip-d3ze49_6-build/setup.py", line 44, in run build_tables() File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz380000gn/T/pip-d3ze49_6-build/setup.py", line 37, in build_tables outputdir='xonsh') File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz380000gn/T/pip-d3ze49_6-build/xonsh/parser.py", line 233, in init self.parser = yacc.yacc(**yacc_kwargs) File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3426, in yacc raise YaccError('Unable to build parser') ply.yacc.YaccError: Unable to build parser

----------------------------------------

Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/9p/0sqt2rlx7bl7wjyglgwz380000gn/T/pip-llgh286q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/9p/0sqt2rlx7bl7wjyglgwz380000gn/T/pip-d3ze49_6-build/

sdebruyn commented 7 years ago

+1 on this

Installing collected packages: gitsome
  Running setup.py install for gitsome ... error
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-g1wkshgw/gitsome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iuxg7a_m-record/install-record.txt --single-version-externally-managed --compile:

    running install
    Remove xonsh/parser_table.py
    Building lexer and parser tables.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 129, in <module>
        main()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 122, in main
        setup(**skw)
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 44, in run
        build_tables()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 37, in build_tables
        outputdir='xonsh')
      File "/private/tmp/pip-build-g1wkshgw/gitsome/xonsh/parser.py", line 233, in __init__
        self.parser = yacc.yacc(**yacc_kwargs)
      File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3426, in yacc
        raise YaccError('Unable to build parser')
    ply.yacc.YaccError: Unable to build parser

    ----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-g1wkshgw/gitsome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iuxg7a_m-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-g1wkshgw/gitsome/
donnemartin commented 7 years ago

I'm able to duplicate this on 3.6, but not on 3.5. Investigating...

donnemartin commented 7 years ago

From what I can tell, this seems to be an issue with the parser for Python 3.6. This seems to be the relevant ticket: https://github.com/xonsh/xonsh/pull/1717.

We should move towards completing https://github.com/donnemartin/gitsome/issues/25 to bring gitsome up to speed with the latest xonsh.

Unless there's a simple patch that I'm missing, gitsome won't support Python 3.6 until https://github.com/donnemartin/gitsome/issues/25 is resolved.

Edit: Added note about Python 3.6 incompatibility to README: 31a46f7e4278fe46741eb04e013b5eedb32fe352

hobbestigrou commented 6 years ago

The github integration is awesome. But it's to bad the project doesn't works with python 3.6. I hope that will be fix soon.

rsrini7 commented 5 years ago

is there any fix for python 3.6 ? gitsome currently requires Python 3.4 or 3.5

SUMUKHA-PK commented 5 years ago

Hey @donnemartin can I work on the port? I will need some support though.

donnemartin commented 5 years ago

Hey all, sorry been really busy. I'm starting to free up and plan to look into updating gitsome to support the latest Python versions.

zwep commented 5 years ago

@donnemartin Can you explain in some high level terms what needs to be changed? I am curious about the problem, because I never noticed THAT much of a difference between python 3+ versions

donnemartin commented 5 years ago

Hi all, check out https://github.com/donnemartin/gitsome/pull/160, gitsome now supports Python 3.7.

Uploaded to PyPI: https://pypi.org/project/gitsome/