Skip to content

Commit

Permalink
Use basename to get package name (#583)
Browse files Browse the repository at this point in the history
Fixes #582
  • Loading branch information
ocelotl authored Jul 14, 2021
1 parent 2ee2cf3 commit bf6fd08
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 @@ -11,6 +11,7 @@
from datetime import datetime
from inspect import cleandoc
from itertools import chain
from os.path import basename
from pathlib import Path, PurePath

DEFAULT_ALLSEP = " "
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 bf6fd08

Please sign in to comment.