mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-04 11:53:09 +03:00
Move imports instead of disabling requirements check
This commit is contained in:
parent
fa04172830
commit
b7c7fdfd3d
|
@ -330,11 +330,6 @@ def _check_requirements(requirements: List[str]) -> Tuple[bool, bool]:
|
||||||
RETURNS (Tuple[bool, bool]): Whether (1) any packages couldn't be imported, (2) any packages with version conflicts
|
RETURNS (Tuple[bool, bool]): Whether (1) any packages couldn't be imported, (2) any packages with version conflicts
|
||||||
exist.
|
exist.
|
||||||
"""
|
"""
|
||||||
msg.warn("Requirements checks are being skipped.")
|
|
||||||
return False, False
|
|
||||||
|
|
||||||
|
|
||||||
def _check_requirements_pkg_resources(requirements: List[str]) -> Tuple[bool, bool]:
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
failed_pkgs_msgs: List[str] = []
|
failed_pkgs_msgs: List[str] = []
|
||||||
|
|
|
@ -2,7 +2,6 @@ import os
|
||||||
import math
|
import math
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from typing import Tuple, List, Dict, Any
|
from typing import Tuple, List, Dict, Any
|
||||||
import pkg_resources
|
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
@ -1159,6 +1158,7 @@ def test_cli_find_threshold(capsys):
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_project_check_requirements(reqs, output):
|
def test_project_check_requirements(reqs, output):
|
||||||
|
import pkg_resources
|
||||||
# excessive guard against unlikely package name
|
# excessive guard against unlikely package name
|
||||||
try:
|
try:
|
||||||
pkg_resources.require("spacyunknowndoesnotexist12345")
|
pkg_resources.require("spacyunknowndoesnotexist12345")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user