Author: Michal Vyskocil <[email protected]>
Branch:
Changeset: r3194:b72192c28e05
Date: 2017-05-25 10:02 +0200
http://bitbucket.org/cffi/cffi/changeset/b72192c28e05/
Log: code not compatible with python3
use bytes instead of strings
diff --git a/cffi/pkgconfig.py b/cffi/pkgconfig.py
--- a/cffi/pkgconfig.py
+++ b/cffi/pkgconfig.py
@@ -38,7 +38,7 @@
# drop starting -I -L -l from cflags
def dropILl (string):
def _dropILl (string):
- if string.startswith ("-I") or string.startswith ("-L") or
string.startswith ("-l"):
+ if string.startswith (b"-I") or string.startswith (b"-L") or
string.startswith (b"-l"):
return string [2:]
return [_dropILl (x) for x in string.split ()]
diff --git a/testing/cffi1/test_pkgconfig.py b/testing/cffi1/test_pkgconfig.py
--- a/testing/cffi1/test_pkgconfig.py
+++ b/testing/cffi1/test_pkgconfig.py
@@ -26,5 +26,5 @@
except subprocess.CalledProcessError as e:
py.test.skip ("No python%s pkg-config file installed" % version)
- assert any ("python" in lib for lib in kwargs ["libraries"]) == True
- assert any ("python" in dir for dir in kwargs ["include_dirs"]) == True
+ assert any (b"python" in lib for lib in kwargs ["libraries"]) == True
+ assert any (b"python" in dir for dir in kwargs ["include_dirs"]) == True
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit