Skip to content

Commit

Permalink
Use basename to get package name
Browse files Browse the repository at this point in the history
Fixes #582
  • Loading branch information
ocelotl committed Jul 14, 2021
1 parent 2ee2cf3 commit 5f5eea1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/eachdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from inspect import cleandoc
from itertools import chain
from pathlib import Path, PurePath
from os.path import basename

DEFAULT_ALLSEP = " "
DEFAULT_ALLFMT = "{rel}"
Expand Down Expand Up @@ -631,9 +632,7 @@ def update_dependencies(targets, version, packages):
if str(pkg) == "all":
continue
print(pkg)
package_name = str(pkg).split("/", maxsplit=1)[-1]
# Windows uses backslashes
package_name = str(pkg).split("\\", maxsplit=1)[-1]
package_name = basename(pkg)
print(package_name)

update_files(
Expand Down

0 comments on commit 5f5eea1

Please sign in to comment.