diff --git a/README.md b/README.md index c5f1a2b78..e488bc117 100644 --- a/README.md +++ b/README.md @@ -110,12 +110,22 @@ For detailed installation instructions, see the ### pip Using pip, spaCy releases are available as source packages and binary wheels (as -of `v2.0.13`). +of `v2.0.13`). Before you install spaCy and its dependencies, make sure that +`pip` and `setuptools` are up to date. ```bash +pip install -U pip setuptools pip install spacy ``` +For installation on python 3.5 where binary wheels are not provided for the most +recent versions of the dependencies, you can prefer older binary wheels over +newer source packages with `--prefer-binary`: + +```bash +pip install spacy --prefer-binary +``` + To install additional data tables for lemmatization and normalization in **spaCy v2.2+** you can run `pip install spacy[lookups]` or install [`spacy-lookups-data`](https://github.com/explosion/spacy-lookups-data) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 991d4cc33..95a76abcd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -51,15 +51,15 @@ jobs: imageName: 'macos-10.14' python.version: '3.6' # Don't test on 3.7 for now to speed up builds - # Python37Linux: - # imageName: 'ubuntu-16.04' - # python.version: '3.7' - # Python37Windows: - # imageName: 'vs2017-win2016' - # python.version: '3.7' - # Python37Mac: - # imageName: 'macos-10.13' - # python.version: '3.7' + Python37Linux: + imageName: 'ubuntu-16.04' + python.version: '3.7' + Python37Windows: + imageName: 'vs2017-win2016' + python.version: '3.7' + Python37Mac: + imageName: 'macos-10.14' + python.version: '3.7' Python38Linux: imageName: 'ubuntu-16.04' python.version: '3.8' @@ -69,6 +69,15 @@ jobs: Python38Mac: imageName: 'macos-10.14' python.version: '3.8' + Python39Linux: + imageName: 'ubuntu-16.04' + python.version: '3.9' + Python39Windows: + imageName: 'vs2017-win2016' + python.version: '3.9' + Python39Mac: + imageName: 'macos-10.14' + python.version: '3.9' maxParallel: 4 pool: vmImage: $(imageName) @@ -80,12 +89,12 @@ jobs: architecture: 'x64' - script: | - python -m pip install -U setuptools + python -m pip install -U pip setuptools pip install -r requirements.txt --prefer-binary displayName: 'Install dependencies' - script: | - python setup.py build_ext --inplace + python setup.py build_ext --inplace -j 2 python setup.py sdist --formats=gztar displayName: 'Compile and build sdist' @@ -94,9 +103,12 @@ jobs: contents: 'spacy' displayName: 'Delete source directory' - - bash: | + - script: | pip freeze > installed.txt pip uninstall -y -r installed.txt + displayName: 'Uninstall all packages' + + - bash: | SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1) pip install dist/$SDIST --only-binary :all: displayName: 'Install from sdist' diff --git a/pyproject.toml b/pyproject.toml index fe66494ff..c5cc5a06c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,10 @@ [build-system] requires = [ "setuptools", - "wheel", "cython>=0.25", "cymem>=2.0.2,<2.1.0", "preshed>=3.0.2,<3.1.0", "murmurhash>=0.28.0,<1.1.0", - "thinc==7.4.1", + "thinc>=7.4.1,<7.5.0", ] build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index 367eef111..91996b261 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ # Our libraries cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 -thinc==7.4.1 -blis>=0.4.0,<0.5.0 +thinc>=7.4.1,<7.5.0 +blis>=0.4.0,<0.8.0; python_version >= "3.6" +blis>=0.4.0,<0.5.0; python_version < "3.6" murmurhash>=0.28.0,<1.1.0 wasabi>=0.4.0,<1.1.0 srsly>=1.0.2,<1.1.0 diff --git a/setup.cfg b/setup.cfg index 9bd45d45d..8e40a7afd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,6 +23,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Topic :: Scientific/Engineering [options] @@ -32,20 +33,20 @@ scripts = bin/spacy python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* setup_requires = - wheel cython>=0.25 # We also need our Cython packages here to compile against cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 murmurhash>=0.28.0,<1.1.0 - thinc==7.4.1 + thinc>=7.4.1,<7.5.0 install_requires = # Our libraries murmurhash>=0.28.0,<1.1.0 cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 - thinc==7.4.1 - blis>=0.4.0,<0.5.0 + thinc>=7.4.1,<7.5.0 + blis>=0.4.0,<0.8.0; python_version >= "3.6" + blis>=0.4.0,<0.5.0; python_version < "3.6" wasabi>=0.4.0,<1.1.0 srsly>=1.0.2,<1.1.0 catalogue>=0.0.7,<1.1.0