From c145d953127346d9c9dfb3a3534f48be0369f13b Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Thu, 20 Apr 2023 23:53:06 +0200 Subject: [PATCH] Fix #2654 spacy language model installation --- requirements.txt | 2 +- scripts/check_requirements.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d233f5e43..d5a1c63b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ jsonschema tweepy click spacy>=3.0.0,<4.0.0 -en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.0/en_core_web_sm-3.4.0-py3-none-any.whl +en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl ##Dev coverage diff --git a/scripts/check_requirements.py b/scripts/check_requirements.py index e4eab024a..3323697b5 100644 --- a/scripts/check_requirements.py +++ b/scripts/check_requirements.py @@ -1,3 +1,4 @@ +import re import sys import pkg_resources @@ -16,7 +17,7 @@ def main(): for package in required_packages: if not package: # Skip empty lines continue - package_name = package.strip().split("==")[0] + package_name = re.split("[<>=@ ]+", package.strip())[0] if package_name.lower() not in installed_packages: missing_packages.append(package_name)