Projects
Eulaceura:Mainline
yum-metadata-parser
_service:obs_scm:UPSTREAM-py-3-split.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:UPSTREAM-py-3-split.patch of Package yum-metadata-parser
commit 8472bc2706377c93752b2f0b8429b0d18639b65c Author: Martin Kletzander <mkletzan@redhat.com> 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 <mkletzan@redhat.com> 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',
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2