From 6bc7ee8c32633a88d39cdb2ddc32ecccb042673e Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Tue, 13 Jul 2021 22:28:50 -0600 Subject: [PATCH] Use basename to get package name Fixes #582 --- scripts/eachdist.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/eachdist.py b/scripts/eachdist.py index 92644573a3..eed31eb62d 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -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 = " " @@ -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(