1 Star 0 Fork 4

bzg_repo/yum-metadata-parser

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
UPSTREAM-py-3-split.patch 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
jinjin 提交于 2020-02-17 21:55 . init
commit 8472bc2706377c93752b2f0b8429b0d18639b65c
Author: Martin Kletzander <[email protected]>
Date: Fri Apr 5 15:12:15 2013 +0200
setup: make build work on python 3
In python 3, the string module doesn't have 'split' function anymore
and users are encouraged to use '.split()' on the string itself. Also
'map()' is lazy and returns an iterable map object, but setup expects
only a list, so it has to be wrapped in 'list()'. All of this works
with python2 as well.
Signed-off-by: Martin Kletzander <[email protected]>
diff --git a/setup.py b/setup.py
index d0d0429..a42a9b7 100644
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,16 @@
-import os, string
+import os
from distutils.core import setup, Extension
pc = os.popen("pkg-config --cflags-only-I glib-2.0 libxml-2.0 sqlite3", "r")
-includes = map(lambda x:x[2:], string.split(pc.readline()))
+includes = list(map(lambda x:x[2:], pc.readline().split()))
pc.close()
pc = os.popen("pkg-config --libs-only-l glib-2.0 libxml-2.0 sqlite3", "r")
-libs = map(lambda x:x[2:], string.split(pc.readline()))
+libs = list(map(lambda x:x[2:], pc.readline().split()))
pc.close()
pc = os.popen("pkg-config --libs-only-L glib-2.0 libxml-2.0 sqlite3", "r")
-libdirs = map(lambda x:x[2:], string.split(pc.readline()))
+libdirs = list(map(lambda x:x[2:], pc.readline().split()))
pc.close()
module = Extension('_sqlitecache',
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/baizg1107/yum-metadata-parser.git
[email protected]:baizg1107/yum-metadata-parser.git
baizg1107
yum-metadata-parser
yum-metadata-parser
master

搜索帮助