Updates for python 3.9 (#6338)

* Update blis and thinc version ranges

* Update thinc version range

* Update setup.cfg for python 3.9

* Adjust blis and thinc ranges
* Add python 3.9 classifier

* Update CI for python 3.9

* Add --prefer-binary to CI sdist install

* Update CI python 3.7 mac image

* Add --prefer-binary to Travis CI

* Update install instructions in README

* Specify blis versions separately for < / >= 3.6

* Update --prefer-binary in README

* Test cleaner sdist install

* Also upgrade pip

(This is kind of unnecessary given --prefer-binary but may avoid other
issues related to sdist installs in the future.)

* Compile with -j 2

* Remove wheel from setup_requires

* Update to have separate CI uninstall step

* Remove wheel from pyproject.toml

* Recommend upgrading setuptools in addition to pip
This commit is contained in:
Adriane Boyd 2020-11-23 09:45:18 +01:00 committed by GitHub
parent e3ac90b035
commit 13f0676f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 21 deletions

View File

@ -110,12 +110,22 @@ For detailed installation instructions, see the
### pip ### pip
Using pip, spaCy releases are available as source packages and binary wheels (as 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 ```bash
pip install -U pip setuptools
pip install spacy 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 To install additional data tables for lemmatization and normalization in
**spaCy v2.2+** you can run `pip install spacy[lookups]` or install **spaCy v2.2+** you can run `pip install spacy[lookups]` or install
[`spacy-lookups-data`](https://github.com/explosion/spacy-lookups-data) [`spacy-lookups-data`](https://github.com/explosion/spacy-lookups-data)

View File

@ -51,15 +51,15 @@ jobs:
imageName: 'macos-10.14' imageName: 'macos-10.14'
python.version: '3.6' python.version: '3.6'
# Don't test on 3.7 for now to speed up builds # Don't test on 3.7 for now to speed up builds
# Python37Linux: Python37Linux:
# imageName: 'ubuntu-16.04' imageName: 'ubuntu-16.04'
# python.version: '3.7' python.version: '3.7'
# Python37Windows: Python37Windows:
# imageName: 'vs2017-win2016' imageName: 'vs2017-win2016'
# python.version: '3.7' python.version: '3.7'
# Python37Mac: Python37Mac:
# imageName: 'macos-10.13' imageName: 'macos-10.14'
# python.version: '3.7' python.version: '3.7'
Python38Linux: Python38Linux:
imageName: 'ubuntu-16.04' imageName: 'ubuntu-16.04'
python.version: '3.8' python.version: '3.8'
@ -69,6 +69,15 @@ jobs:
Python38Mac: Python38Mac:
imageName: 'macos-10.14' imageName: 'macos-10.14'
python.version: '3.8' 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 maxParallel: 4
pool: pool:
vmImage: $(imageName) vmImage: $(imageName)
@ -80,12 +89,12 @@ jobs:
architecture: 'x64' architecture: 'x64'
- script: | - script: |
python -m pip install -U setuptools python -m pip install -U pip setuptools
pip install -r requirements.txt --prefer-binary pip install -r requirements.txt --prefer-binary
displayName: 'Install dependencies' displayName: 'Install dependencies'
- script: | - script: |
python setup.py build_ext --inplace python setup.py build_ext --inplace -j 2
python setup.py sdist --formats=gztar python setup.py sdist --formats=gztar
displayName: 'Compile and build sdist' displayName: 'Compile and build sdist'
@ -94,9 +103,12 @@ jobs:
contents: 'spacy' contents: 'spacy'
displayName: 'Delete source directory' displayName: 'Delete source directory'
- bash: | - script: |
pip freeze > installed.txt pip freeze > installed.txt
pip uninstall -y -r 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) SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1)
pip install dist/$SDIST --only-binary :all: pip install dist/$SDIST --only-binary :all:
displayName: 'Install from sdist' displayName: 'Install from sdist'

View File

@ -1,11 +1,10 @@
[build-system] [build-system]
requires = [ requires = [
"setuptools", "setuptools",
"wheel",
"cython>=0.25", "cython>=0.25",
"cymem>=2.0.2,<2.1.0", "cymem>=2.0.2,<2.1.0",
"preshed>=3.0.2,<3.1.0", "preshed>=3.0.2,<3.1.0",
"murmurhash>=0.28.0,<1.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" build-backend = "setuptools.build_meta"

View File

@ -1,8 +1,9 @@
# Our libraries # Our libraries
cymem>=2.0.2,<2.1.0 cymem>=2.0.2,<2.1.0
preshed>=3.0.2,<3.1.0 preshed>=3.0.2,<3.1.0
thinc==7.4.1 thinc>=7.4.1,<7.5.0
blis>=0.4.0,<0.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 murmurhash>=0.28.0,<1.1.0
wasabi>=0.4.0,<1.1.0 wasabi>=0.4.0,<1.1.0
srsly>=1.0.2,<1.1.0 srsly>=1.0.2,<1.1.0

View File

@ -23,6 +23,7 @@ classifiers =
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Scientific/Engineering Topic :: Scientific/Engineering
[options] [options]
@ -32,20 +33,20 @@ scripts =
bin/spacy bin/spacy
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
setup_requires = setup_requires =
wheel
cython>=0.25 cython>=0.25
# We also need our Cython packages here to compile against # We also need our Cython packages here to compile against
cymem>=2.0.2,<2.1.0 cymem>=2.0.2,<2.1.0
preshed>=3.0.2,<3.1.0 preshed>=3.0.2,<3.1.0
murmurhash>=0.28.0,<1.1.0 murmurhash>=0.28.0,<1.1.0
thinc==7.4.1 thinc>=7.4.1,<7.5.0
install_requires = install_requires =
# Our libraries # Our libraries
murmurhash>=0.28.0,<1.1.0 murmurhash>=0.28.0,<1.1.0
cymem>=2.0.2,<2.1.0 cymem>=2.0.2,<2.1.0
preshed>=3.0.2,<3.1.0 preshed>=3.0.2,<3.1.0
thinc==7.4.1 thinc>=7.4.1,<7.5.0
blis>=0.4.0,<0.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 wasabi>=0.4.0,<1.1.0
srsly>=1.0.2,<1.1.0 srsly>=1.0.2,<1.1.0
catalogue>=0.0.7,<1.1.0 catalogue>=0.0.7,<1.1.0