Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def test_extract_matching_platforms() -> None:
extract_matching_platforms(incorrect_platform)


def testsplit_path_and_extras() -> None:
def test_split_path_and_extras() -> None:
# parse_with_extras
s = "any/path[something, another]"
path, extras = split_path_and_extras(s)
Expand Down
6 changes: 5 additions & 1 deletion unidep/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,11 @@ def _pip_install_local(
relative_prefix = ".\\" if os.name == "nt" else "./"
folder = f"{relative_prefix}{folder}" # noqa: PLW2901

if editable:
if (
editable
and not str(folder).endswith(".whl")
and not str(folder).endswith(".zip")
):
pip_command.extend(["-e", str(folder)])
else:
pip_command.append(str(folder))
Expand Down
5 changes: 4 additions & 1 deletion unidep/_setuptools_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ def get_python_dependencies(
for paths in local_dependencies.values():
for path in paths:
name = _package_name_from_path(path)
dependencies.append(f"{name} @ file://{path.as_posix()}")
# TODO: Consider doing this properly using pathname2url # noqa: FIX002
# https://github.com/basnijholt/unidep/pull/214#issuecomment-2568663364
uri = path.as_posix().replace(" ", "%20")
dependencies.append(f"{name} @ file://{uri}")

return Dependencies(dependencies=dependencies, extras=extras)

Expand Down
Loading