SHA256
1
0
forked from pool/python-tox
python-tox/optional_devpi_process.patch

33 lines
1.0 KiB
Diff
Raw Normal View History

Index: tox-4.11.1/src/tox/pytest.py
===================================================================
--- tox-4.11.1.orig/src/tox/pytest.py
+++ tox-4.11.1/src/tox/pytest.py
@@ -16,7 +16,10 @@ from typing import TYPE_CHECKING, Any, C
import pytest
from _pytest.fixtures import SubRequest
-from devpi_process import IndexServer
+try:
+ from devpi_process import IndexServer
+except ImportError:
+ IndexServer = None
from virtualenv.info import fs_supports_symlink
import tox.run
Index: tox-4.11.1/tests/test_provision.py
===================================================================
--- tox-4.11.1.orig/tests/test_provision.py
+++ tox-4.11.1/tests/test_provision.py
@@ -16,7 +16,10 @@ from filelock import FileLock
from packaging.requirements import Requirement
if TYPE_CHECKING:
- from devpi_process import Index, IndexServer
+ try:
+ from devpi_process import Index, IndexServer
+ except ImportError:
+ Index, IndexServer = None, None
from tox.pytest import MonkeyPatch, TempPathFactory, ToxProjectCreator