!11 Fix the python3 version cannot be found when pyproject.toml is used for building

From: @caodongxia 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
This commit is contained in:
openeuler-ci-bot 2023-04-23 08:01:43 +00:00 committed by Gitee
commit e753a7c061
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Name: python-rpm-generators
Version: 9
Release: 3
Release: 4
Summary: Dependency generators for Python RPMs
License: GPLv2+
@ -44,6 +44,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondeps.sh pythondistdeps.py
%{_rpmconfigdir}/pythondistdeps.py
%changelog
* Sun Apr 23 2023 caodongxia <caodongxia@h-partners.com> - 9-4
- Fix the python3 version cannot be found when pyproject.toml is used for building
* Thu Oct 27 2022 zhangruifang <zhangruifang1@h-partners.com> - 9-3
- Rebuild for next release

View File

@ -116,7 +116,7 @@ for f in files:
# Try to parse the Python version from the path the metadata
# resides at (e.g. /usr/lib/pythonX.Y/site-packages/...)
import re
res = re.search(r"/python(?P<pyver>\d+\.\d)/", path_item)
res = re.search(r"/python(?P<pyver>\d+\.\d+)/", path_item)
if res:
dist.py_version = res.group('pyver')
else: