1 parent 1fbdc84 commit 1761361Copy full SHA for 1761361
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
@@ -1,4 +1,5 @@
import json
2
+import os
3
import re
4
import shutil
5
import tempfile
@@ -182,7 +183,7 @@ def get_project_metadata_from_file(filename):
182
183
else:
184
pyver = ""
185
regex = DIST_REGEXES[extensions[pkg_type_index]]
- if bdist_name := regex.match(filename):
186
+ if bdist_name := regex.match(os.path.basename(filename)):
187
pyver = bdist_name.group("pyver") or ""
188
metadata.python_version = pyver
189
return metadata
0 commit comments