Skip to content

Commit 12227b0

Browse files
committed
Use HTTPS
1 parent e27d9c7 commit 12227b0

4 files changed

Lines changed: 16 additions & 29 deletions

File tree

‎README.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ To install via pip::
6666
Prerequisites
6767
-------------
6868

69-
- `Python 3.2+ <http://www.python.org>`_ (or 2.7)
69+
- `Python 3.2+ <https://www.python.org>`_ (or 2.7)
7070
- `lib3to2 <https://bitbucket.org/amentajo/lib3to2>`_
7171
(if installing for Python 2)
72-
- `LanguageTool <http://www.languagetool.org>`_ (Java 6.0+)
72+
- `LanguageTool <https://www.languagetool.org>`_ (Java 6.0+)
7373

7474

7575
The installation process should take care of downloading LanguageTool
7676
(it may take a few minutes).
7777
Otherwise, you can manually download `LanguageTool-stable.zip
78-
<http://www.languagetool.org/download/LanguageTool-stable.zip>`_
78+
<https://www.languagetool.org/download/LanguageTool-stable.zip>`_
7979
and unzip it into where the ``language_check`` package resides.
8080

8181
Vim plugin

‎setup.cfg‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
[global]
2-
setup_hooks=
3-
setup_language_check.hook
4-
setup.default_hook
5-
61
[metadata]
72
name=language-check
83
summary=Checks grammar using LanguageTool.

‎setup.py‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
import shutil
1111
import subprocess
1212
import sys
13-
1413
from distutils.version import LooseVersion
1514

1615
from setuptools import setup
1716

17+
from download_lt import download_lt
18+
1819
try:
1920
from configparser import RawConfigParser
2021
except ImportError:
@@ -557,14 +558,8 @@ def load_config(file='setup.cfg'):
557558

558559

559560
def run_setup_hooks(config):
560-
for hook_name in get_cfg_value(config, 'global', 'setup_hooks'):
561-
module, obj = hook_name.split('.', 1)
562-
if module == 'setup':
563-
func = globals()[obj]
564-
else:
565-
module = __import__(module, globals(), locals(), [], 0)
566-
func = getattr(module, obj)
567-
func(config)
561+
language_tool_hook(config)
562+
default_hook(config)
568563

569564

570565
def default_hook(config):
@@ -582,6 +577,15 @@ def default_hook(config):
582577
set_cfg_value(config, 'files', 'packages_root', packages_root)
583578

584579

580+
def language_tool_hook(config):
581+
if 'sdist' in sys.argv:
582+
del config['files']['package_data']
583+
elif any(arg.startswith('install') or
584+
arg.startswith('build') or
585+
arg.startswith('bdist') for arg in sys.argv):
586+
download_lt()
587+
588+
585589
def main():
586590
"""Running with distutils or setuptools."""
587591
config = load_config()

‎setup_language_check.py‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)