Add entry point-style auto alias for "spacy"

Simplest way to run commands as spacy xxx instead of python -m spacy
xxx, while avoiding environment conflicts
This commit is contained in:
ines 2017-08-09 12:17:30 +02:00
parent 764540a6dd
commit 495e042429
3 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
recursive-include include *.h recursive-include include *.h
include LICENSE include LICENSE
include README.rst include README.rst
include bin/spacy

1
bin/spacy Normal file
View File

@ -0,0 +1 @@
python -m spacy "$@"

View File

@ -187,6 +187,7 @@ def setup_package():
url=about['__uri__'], url=about['__uri__'],
license=about['__license__'], license=about['__license__'],
ext_modules=ext_modules, ext_modules=ext_modules,
scripts=['bin/spacy'],
install_requires=[ install_requires=[
'numpy>=1.7', 'numpy>=1.7',
'murmurhash>=0.28,<0.29', 'murmurhash>=0.28,<0.29',