Fix #2654 spacy language model installation

pull/2727/head
Reinier van der Leer 2023-04-20 23:53:06 +02:00
parent 14d3ecaae7
commit c145d95312
No known key found for this signature in database
GPG Key ID: 64035FE419545762
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)