mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2025-09-18 03:13:25 +00:00
Fix error when package under test depends directly on unsafe dependencies
Fixes #65
This commit is contained in:
@@ -166,6 +166,11 @@ def find_project_deps(
|
||||
:param extras: Sequence of extra names to include the dependencies of
|
||||
"""
|
||||
|
||||
if any(dep.name in constants.UNSAFE_PACKAGES for dep in poetry.package.requires):
|
||||
raise exceptions.RequiresUnsafeDepError(
|
||||
f"Project package requires one or more unsafe dependencies ({', '.join(constants.UNSAFE_PACKAGES)}) which cannot be installed with Poetry"
|
||||
)
|
||||
|
||||
base_deps: List[PoetryPackage] = [
|
||||
packages[item.name]
|
||||
for item in poetry.package.requires
|
||||
|
Reference in New Issue
Block a user