We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d4b610 commit 232271aCopy full SHA for 232271a
upload_wheels.py
@@ -25,17 +25,21 @@
25
26
wheels_subdirs = os.listdir(WHEELS_DIR)
27
28
+
29
+def normalize(name):
30
+ return re.sub(r"[-_.]+", "-", name).lower()
31
32
33
for subdir in wheels_subdirs:
34
wheel_files = os.listdir(f"{WHEELS_DIR}{os.sep}{subdir}")
35
36
for wheel in wheel_files:
- pattern = re.compile(r"(\w*)-(\d+)")
37
+ pattern = re.compile(r"^(.+?)-(\d+)")
38
match = pattern.search(wheel)
39
if match:
40
wheel_name = match.group(1)
41
- wheel_name = wheel_name.lower()
- wheel_name = wheel_name.replace("_", "-")
42
+ wheel_name = normalize(wheel_name)
43
44
BUCKET.upload_file(f"{WHEELS_DIR}{os.sep}{subdir}{os.sep}{wheel}", f"pypi/{wheel_name}/{wheel}")
45
print(f"Uploaded {wheel}")
0 commit comments