myint / language-check

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

Support LanguageTool 2.7 #3

Closed Tilka closed 10 years ago

Tilka commented 10 years ago

The newest possible version is determined during installation:

If Java cannot be found or is too old, the installation fails.

Not sure if it's bad style to import from language_check during its installation.

Tilka commented 10 years ago

Hmm, I just noticed language-check is also supposed to support Python 2 but it seems like it's already broken (language_check/__init__.py uses function annotations) so whatever...

myint commented 10 years ago

language-check uses lib3to2 upon installation to support Python 2. download_lt.py is used during installation (before lib3to2 runs). So you shouldn't import anything from language_check inside setup.py or download_lt.py. You could just copy over the relevant which() code into download_lt.py.

Tilka commented 10 years ago

Declared a custom exception class and replaced which() with distutils.spawn.find_executable() which doesn't use PATHEXT but I'll leave it for you to decide if that's a problem (see also: http://bugs.python.org/issue2200). If it's not, you might also consider substituting it for the whole which.py file.

myint commented 10 years ago

Thanks!