Use basename to get package name (#583)

Fixes #582
This commit is contained in:
Diego Hurtado
2021-07-14 09:02:20 -06:00
committed by GitHub
parent 2ee2cf3cb5
commit bf6fd0894f

View File

@ -11,6 +11,7 @@ from configparser import ConfigParser
from datetime import datetime
from inspect import cleandoc
from itertools import chain
from os.path import basename
from pathlib import Path, PurePath
DEFAULT_ALLSEP = " "
@ -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(