mirror of https://github.com/explosion/spaCy.git
More dirty Windows stuff - just for now
This commit is contained in:
parent
8e03239ac5
commit
9d949c857b
|
@ -7,20 +7,27 @@ rem http://www.microsoft.com/en-us/download/details.aspx?id=44266
|
|||
rem C99 compliant stdint.h for MSVC:
|
||||
rem http://msinttypes.googlecode.com/svn/trunk/stdint.h
|
||||
|
||||
IF "%1"=="32" GOTO x86-32
|
||||
IF "%1"=="64" GOTO x86-64
|
||||
|
||||
@echo Usage: build-Python27 32/64
|
||||
EXIT /B
|
||||
|
||||
:x86-32
|
||||
PATH = D:\Python27-32\;D:\Python27-32\Scripts;%PATH%
|
||||
GOTO run
|
||||
|
||||
:x86-64
|
||||
PATH = D:\Python27\;D:\Python27\Scripts;%PATH%
|
||||
|
||||
:run
|
||||
|
||||
IF NOT EXIST "%LOCALAPPDATA%\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h" COPY D:\local\include\stdint.h "%LOCALAPPDATA%\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h"
|
||||
|
||||
|
||||
SET INCLUDE = D:\local\include;%INCLUDE%
|
||||
|
||||
pip install --upgrade setuptools
|
||||
pip install cython fabric fabtools
|
||||
pip install -r requirements.txt
|
||||
python setup.py build_ext --inplace
|
||||
pause
|
||||
python setup.py build
|
||||
python setup.py test
|
||||
python setup.py install
|
||||
rem python setup.py test
|
||||
rem python setup.py install
|
||||
rem python tests\conftest.py
|
||||
rem python tests\test_matcher.py
|
||||
|
|
17
setup.py
17
setup.py
|
@ -138,16 +138,11 @@ VERSION = '0.94'
|
|||
def main(modules, is_pypy):
|
||||
language = "cpp"
|
||||
includes = ['.', path.join(sys.prefix, 'include')]
|
||||
<<<<<<< HEAD
|
||||
# This is gcc only. Also -03 is everywhere and is not recognized :()
|
||||
# compile_args = ['-O3', '-Wno-strict-prototypes']
|
||||
# TODO: http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used
|
||||
# compile_args = ['-O3', '-Wno-strict-prototypes', '-Wno-unused-function']
|
||||
compile_args = ['-Ox', '-EHsc']
|
||||
=======
|
||||
compile_args = ['-O3', '-Wno-strict-prototypes', '-Wno-unused-function']
|
||||
>>>>>>> refs/remotes/honnibal/master
|
||||
link_args = []
|
||||
# It is not prefix !!!
|
||||
if sys.prefix == 'darwin':
|
||||
if sys.platform.startswith('darwin'):
|
||||
compile_args.append(['-mmacosx-version-min=10.8', '-stdlib=libc++'])
|
||||
link_args.append('-lc++')
|
||||
if use_cython:
|
||||
|
@ -163,13 +158,7 @@ MOD_NAMES = ['spacy.parts_of_speech', 'spacy.strings',
|
|||
'spacy.morphology', 'spacy.tagger',
|
||||
'spacy.syntax.stateclass',
|
||||
'spacy._ml', 'spacy._theano',
|
||||
<<<<<<< HEAD
|
||||
'spacy.tokenizer',
|
||||
#'spacy.en.attrs',
|
||||
#'spacy.en.pos',
|
||||
=======
|
||||
'spacy.tokenizer',
|
||||
>>>>>>> refs/remotes/honnibal/master
|
||||
'spacy.syntax.parser',
|
||||
'spacy.syntax.transition_system',
|
||||
'spacy.syntax.arc_eager',
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
@echo off
|
||||
rem Python 2.7 x86-64 spaCy Windows test
|
||||
|
||||
IF "%1"=="32" GOTO x86-32
|
||||
IF "%1"=="64" GOTO x86-64
|
||||
|
||||
@echo Usage: test-Python27 32/64
|
||||
EXIT /B
|
||||
|
||||
:x86-32
|
||||
PATH = D:\Python27-32\;D:\Python27-32\Scripts;%PATH%
|
||||
GOTO run
|
||||
|
||||
:x86-64
|
||||
PATH = D:\Python27\;D:\Python27\Scripts;%PATH%
|
||||
|
||||
:run
|
||||
|
||||
rem python -m spacy.en.download
|
||||
|
||||
@echo Patience ...
|
||||
python -c "import spacy.en; nlp = spacy.en.English(); print([w.text for w in nlp(u'I would like to be a dog')])"
|
||||
@echo Patience ...
|
||||
python examples\information_extraction.py
|
||||
@echo Patience ...
|
||||
python examples\matcher_example.py
|
||||
|
Loading…
Reference in New Issue