Skip to content

Commit

Permalink
Fix two more missed ~str(...).
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
jsirois committed Mar 2, 2021
1 parent 9122583 commit ae4e916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/python/pants/backend/python/goals/setup_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ async def generate_chroot(request: SetupPyChrootRequest) -> SetupPyChroot:
for key, binary_entry_point in zip(key_to_binary_spec.keys(), binary_entry_points):
entry_points = setup_kwargs.setdefault("entry_points", {})
console_scripts = entry_points.setdefault("console_scripts", [])
console_scripts.append(f"{key}={binary_entry_point.val}")
if binary_entry_point.val is not None:
console_scripts.append(f"{key}={binary_entry_point.val.spec}")

# Generate the setup script.
setup_py_content = SETUP_BOILERPLATE.format(
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/target_types_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async def resolve_pex_entry_point(request: ResolvePexEntryPointRequest) -> Resol
# we need to check if they used a file glob (`*` or `**`) that resolved to >1 file.
if len(entry_point_paths.files) != 1:
raise InvalidFieldException(
f"Multiple files matched for the `{ep_alias}` {repr(ep_val)} for the target "
f"Multiple files matched for the `{ep_alias}` {ep_val.spec!r} for the target "
f"{address}, but only one file expected. Are you using a glob, rather than a file "
f"name?\n\nAll matching files: {list(entry_point_paths.files)}."
)
Expand Down

0 comments on commit ae4e916

Please sign in to comment.