patch newly occuring test failure where the base_dir does not contain the subdirectory.

This commit is contained in:
Matt Davis
2022-03-27 19:18:42 -04:00
parent 626ce2519e
commit 2669b4ce06
+9 -2
View File
@@ -13,7 +13,7 @@ import sys
from collections.abc import Iterable, Mapping
from functools import lru_cache, partial
from pathlib import Path
from urllib.parse import urlparse, urlunparse
from urllib.parse import urlparse, urlunparse, parse_qs
from weakref import finalize
import pipenv.vendor.attr as attr
@@ -1230,8 +1230,15 @@ build-backend = "{1}"
)
)
need_delete = True
parsed = urlparse(str(self.ireq.link))
subdir = parse_qs(parsed.fragment).get('subdirectory', [])
if subdir:
directory = f"{self.base_dir}/{subdir[0]}"
else:
directory = self.base_dir
result = build_pep517(
self.base_dir,
directory,
self.extra_kwargs["build_dir"],
config_settings=self.pep517_config,
dist_type="wheel",