myint / language-check

Python wrapper for LanguageTool grammar checker
https://pypi.python.org/pypi/language-check
GNU Lesser General Public License v3.0
326 stars 102 forks source link

setup_requires=3to2 doesnt work #36

Open jayvdb opened 7 years ago

jayvdb commented 7 years ago

If 3to2 is not pre-installed, it is not installed for the user during python setup.py install. It seems kwargs['setup_requires'] = ['3to2'] in setup.py is not sufficient.

The result can be seen at https://travis-ci.org/jayvdb/language-check/jobs/213723679

Traceback (most recent call last):
  File "setup.py", line 595, in <module>
    sys.exit(main())
  File "setup.py", line 590, in main
    run_setup_hooks(config)
  File "setup.py", line 562, in run_setup_hooks
    default_hook(config)
  File "setup.py", line 573, in default_hook
    generate_py2k(config)
  File "setup.py", line 542, in generate_py2k
    run_3to2(copied_py_files)
  File "setup.py", line 375, in run_3to2
    raise OSError('3to2 script is unavailable.')
OSError: 3to2 script is unavailable.

The same problem occurs in guess_language: https://bitbucket.org/spirit/guess_language/issues/18/pip-doesnt-understand-that-guess-language

There @wichert found that the code was almost python 2 compatible with some minor and routine adjustments.

If there is no easy way forward, maybe a better error message could tell the user how to install 3to2.

jxmorris12 commented 4 years ago

Hi! Since this project has been abandoned, I started a new fork over at https://github.com/jxmorris12/language_tool_python.

My version supports new versions of Java and LanguageTool. language-check is stuck on Java 8 and LanguageTool 3.2; latest versions are Java 14 and LanguageTool 4.9!

I'm happy to help you with your issue if you raise it over at my repository! Thanks!