From df4891bed187fff4ca183c863abda6a92f22d690 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Tue, 8 Dec 2020 15:25:19 +0100 Subject: [PATCH] Remove blis python version constraints (#6522) * Remove blis version constraints After updating the blis sdist in v0.7.4, remove python version constraints for blis build and install dependencies. * Install sdist with --prefer-binary for python 3.5 * Fix duplicate sdist install steps * Fix sdist install step types * Fix blis pins in requirements.txt * Remove wheel hack for python 3.5 from CI --- azure-pipelines.yml | 22 +++++++++++++++------- pyproject.toml | 3 +-- requirements.txt | 3 +-- setup.cfg | 3 +-- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 39e0af892..0a7601e95 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -89,10 +89,16 @@ jobs: versionSpec: '$(python.version)' architecture: 'x64' - - script: | - python -m pip install -U pip setuptools - pip install -r requirements.txt --prefer-binary + - script: python -m pip install -U pip setuptools + displayName: 'Update pip' + + - script: pip install -r requirements.txt --prefer-binary + displayName: 'Install dependencies (python 3.5: prefer binary)' + condition: eq(variables['python.version'], '3.5') + + - script: pip install -r requirements.txt displayName: 'Install dependencies' + condition: not(eq(variables['python.version'], '3.5')) - script: | python setup.py build_ext --inplace -j 2 @@ -109,15 +115,17 @@ jobs: pip uninstall -y -r installed.txt displayName: 'Uninstall all packages' - - script: | - pip install wheel - condition: and(eq(variables['os'], 'linux'), eq(variables['python.version'], '3.5')) - displayName: 'Hack: install wheel for python 3.5' + - bash: | + SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1) + pip install dist/$SDIST --prefer-binary + displayName: 'Install from sdist (python 3.5: prefer binary)' + condition: eq(variables['python.version'], '3.5') - bash: | SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1) pip install dist/$SDIST displayName: 'Install from sdist' + condition: not(eq(variables['python.version'], '3.5')) - script: | pip install -r requirements.txt --prefer-binary diff --git a/pyproject.toml b/pyproject.toml index f991fe404..0d6687986 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,8 +6,7 @@ requires = [ "preshed>=3.0.2,<3.1.0", "murmurhash>=0.28.0,<1.1.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'", + "blis>=0.4.0,<0.8.0", "numpy>=1.15.0", ] build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index 91996b261..0ab9a7854 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,7 @@ cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.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" +blis>=0.4.0,<0.8.0 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 7c921f02c..ec0bddeab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,8 +47,7 @@ install_requires = cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.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" + blis>=0.4.0,<0.8.0 wasabi>=0.4.0,<1.1.0 srsly>=1.0.2,<1.1.0 catalogue>=0.0.7,<1.1.0