1 Star 0 Fork 16

yezengruan/libvirt-python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Avoid-truncating-python-version-number-when-running-.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
From 991ecb5de8c8603747a294efa980ec45e4f589d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Thu, 12 Nov 2020 13:34:14 +0000
Subject: [PATCH] Avoid truncating python version number when running sanity
test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The current code assumes the version number string will be only three
characters long, which fails with "3.10".
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
setup.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 5336551..e564fd8 100755
--- a/setup.py
+++ b/setup.py
@@ -283,7 +283,9 @@ class my_test(Command):
if self.plat_name is None:
self.plat_name = get_platform()
- plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
+ plat_specifier = ".%s-%d.%d" % (self.plat_name,
+ sys.version_info[0],
+ sys.version_info[1])
if hasattr(sys, 'gettotalrefcount'):
plat_specifier += '-pydebug'
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yezengruan/libvirt-python.git
git@gitee.com:yezengruan/libvirt-python.git
yezengruan
libvirt-python
libvirt-python
master

搜索帮助