1 parent 230a71f commit 478eb06Copy full SHA for 478eb06
2 files changed
CHANGES/+py-version-parsing.bugfix
@@ -0,0 +1 @@
1
+Fixed a bug where the `python_version` field was not parsed correctly when Pulp workers had hyphens in their name.
pulp_python/app/utils.py
@@ -2,6 +2,7 @@
2
import json
3
import logging
4
import re
5
+import os
6
import shutil
7
import tempfile
8
import zipfile
@@ -206,7 +207,7 @@ def get_project_metadata_from_file(filename):
206
207
else:
208
pyver = ""
209
regex = DIST_REGEXES[extensions[pkg_type_index]]
- if bdist_name := regex.match(filename):
210
+ if bdist_name := regex.match(os.path.basename(filename)):
211
pyver = bdist_name.group("pyver") or ""
212
metadata.python_version = pyver
213
return metadata
0 commit comments