Skip to content

Commit

Permalink
Use basename to get file name (open-telemetry#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl authored Jul 14, 2021
1 parent eed804e commit fdf4b3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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 @@ -628,11 +629,10 @@ def update_version_files(targets, version, packages):
def update_dependencies(targets, version, packages):
print("updating dependencies")
for pkg in packages:
package_name = pkg.split("/")[-1]
update_files(
targets,
"setup.cfg",
r"({}.*)==(.*)".format(package_name),
r"({}.*)==(.*)".format(basename(pkg)),
r"\1== " + version,
)

Expand Down

0 comments on commit fdf4b3e

Please sign in to comment.