Commit 71754bcd by David Hotham Committed by GitHub

more information in case of error (#7784)

parent 7c9a5659
......@@ -623,7 +623,7 @@ def get_pep517_metadata(path: Path) -> PackageInfo:
info = PackageInfo.from_metadata(path)
except EnvCommandError as fbe:
raise PackageInfoError(
path, "Fallback egg_info generation failed.", fbe
path, e, "Fallback egg_info generation failed.", fbe
)
finally:
os.chdir(cwd)
......
......@@ -250,12 +250,8 @@ def test_info_setup_missing_mandatory_should_trigger_pep517(
setup_py.write_text(decode(setup))
spy = mocker.spy(VirtualEnv, "run")
try:
PackageInfo.from_directory(source_dir)
except PackageInfoError:
assert spy.call_count == 3
else:
assert spy.call_count == 1
_ = PackageInfo.from_directory(source_dir)
assert spy.call_count == 1
def test_info_prefer_poetry_config_over_egg_info():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment