From 7f3eea94514f988cc9e8a099d985dc83161dffe6 Mon Sep 17 00:00:00 2001 From: caodongxia <315816521@qq.com> Date: Sun, 23 Apr 2023 15:27:00 +0800 Subject: [PATCH] Fix the python3 version cannot be found when pyproject.toml is used for building --- python-rpm-generators.spec | 5 ++++- pythondistdeps.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index 3981677..f29da37 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -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 - 9-4 +- Fix the python3 version cannot be found when pyproject.toml is used for building + * Thu Oct 27 2022 zhangruifang - 9-3 - Rebuild for next release diff --git a/pythondistdeps.py b/pythondistdeps.py index 1d3535b..eb91ac9 100644 --- a/pythondistdeps.py +++ b/pythondistdeps.py @@ -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\d+\.\d)/", path_item) + res = re.search(r"/python(?P\d+\.\d+)/", path_item) if res: dist.py_version = res.group('pyver') else: -- Gitee