summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pavement.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pavement.py b/pavement.py
index d588e5ae..6d5d519f 100644
--- a/pavement.py
+++ b/pavement.py
@@ -74,13 +74,14 @@ def move_licenses(vendor):
def _find_license_dest(license_file, vendor):
basename = license_file.basename()
- pkg = license_file.dirname().replace(".dist-info", "")
+ pkg = license_file.dirname().basename().replace(".dist-info", "")
parts = pkg.split("-")
acc = []
for part in parts:
+ # Find actual name from normalized name + version
acc.append(part)
for option in ("_".join(acc), "-".join(acc), ".".join(acc)):
- candidate = Path(option)
+ candidate = vendor / option
if candidate.isdir():
return candidate / basename
if Path(f"{candidate}.py").isfile():