From 815994a21220d9491e3c9cce7af3595054a7e654 Mon Sep 17 00:00:00 2001 From: maxirmx Date: Sat, 10 Oct 2015 17:32:44 +0300 Subject: [PATCH] MSVC x86-64 Pyton 2.7 dirty build --- build-Python27.bat | 26 ++++++++++++++++++++++++++ requirements.txt | 2 +- setup.py | 13 +++++++++---- 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 build-Python27.bat diff --git a/build-Python27.bat b/build-Python27.bat new file mode 100644 index 000000000..8eb2350e7 --- /dev/null +++ b/build-Python27.bat @@ -0,0 +1,26 @@ +@echo off +rem Python 2.7 x86-64 spaCy Windows build +rem Toolchain: +rem Python 2.7.10 :) +rem Microsoft Visual C++ Compiler Package for Python 2.7: +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 + + +PATH = D:\Python27\;D:\Python27\Scripts;%PATH% +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 tests\conftest.py +rem python tests\test_matcher.py diff --git a/requirements.txt b/requirements.txt index acbf3a3b1..2b5ff53ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ cython cymem == 1.11 pathlib -preshed == 0.41 +preshed == 0.42 thinc == 3.3 murmurhash == 0.24 text-unidecode diff --git a/setup.py b/setup.py index e6fbc246a..f76c10082 100644 --- a/setup.py +++ b/setup.py @@ -121,7 +121,7 @@ def run_setup(exts): "spacy.syntax": ["*.pxd"]}, ext_modules=exts, license="MIT", - install_requires=['numpy', 'murmurhash', 'cymem >= 1.11', 'preshed == 0.41', + install_requires=['numpy', 'murmurhash', 'cymem >= 1.11', 'preshed == 0.42', 'thinc == 3.3', "text_unidecode", 'wget', 'plac', 'six', 'ujson'], setup_requires=["headers_workaround"], @@ -138,8 +138,11 @@ VERSION = '0.93' def main(modules, is_pypy): language = "cpp" includes = ['.', path.join(sys.prefix, 'include')] - compile_args = ['-O3', '-Wno-strict-prototypes'] +# This is gcc only. Also -03 is everywhere and is not recognized :() +# compile_args = ['-O3', '-Wno-strict-prototypes'] + compile_args = ['-Ox', '-EHsc'] link_args = [] +# It is not prefix !!! if sys.prefix == 'darwin': compile_args.append(['-mmacosx-version-min=10.8', '-stdlib=libc++']) link_args.append('-lc++') @@ -156,8 +159,10 @@ MOD_NAMES = ['spacy.parts_of_speech', 'spacy.strings', 'spacy.morphology', 'spacy.tagger', 'spacy.syntax.stateclass', 'spacy._ml', 'spacy._theano', - 'spacy.tokenizer', 'spacy.en.attrs', - 'spacy.en.pos', 'spacy.syntax.parser', + 'spacy.tokenizer', +#'spacy.en.attrs', +#'spacy.en.pos', + 'spacy.syntax.parser', 'spacy.syntax.transition_system', 'spacy.syntax.arc_eager', 'spacy.syntax._parse_features',