Skip to content

Commit 048faa6

Browse files
Andy Groverstratakis
authored andcommitted
python3: Use print function
Maintaining py2 compatibility, use print() as a function. Signed-off-by: Andy Grover <agrover@redhat.com>
1 parent 9afa683 commit 048faa6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/python2
22

3+
from __future__ import print_function
4+
35
from distutils.core import setup, Extension
46
import commands
57
import sys
@@ -16,22 +18,22 @@ def _str2list(pkgstr, onlystr):
1618

1719
(res, cflags) = commands.getstatusoutput('pkg-config --cflags-only-other %s' % pkg)
1820
if res != 0:
19-
print 'Failed to query pkg-config --cflags-only-other %s' % pkg
21+
print('Failed to query pkg-config --cflags-only-other %s' % pkg)
2022
sys.exit(1)
2123

2224
(res, includes) = commands.getstatusoutput('pkg-config --cflags-only-I %s' % pkg)
2325
if res != 0:
24-
print 'Failed to query pkg-config --cflags-only-I %s' % pkg
26+
print('Failed to query pkg-config --cflags-only-I %s' % pkg)
2527
sys.exit(1)
2628

2729
(res, libs) = commands.getstatusoutput('pkg-config --libs-only-l %s' % pkg)
2830
if res != 0:
29-
print 'Failed to query pkg-config --libs-only-l %s' % pkg
31+
print('Failed to query pkg-config --libs-only-l %s' % pkg)
3032
sys.exit(1)
3133

3234
(res, libdirs) = commands.getstatusoutput('pkg-config --libs-only-L %s' % pkg)
3335
if res != 0:
34-
print 'Failed to query pkg-config --libs-only-L %s' % pkg
36+
print('Failed to query pkg-config --libs-only-L %s' % pkg)
3537
sys.exit(1)
3638

3739

0 commit comments

Comments
 (0)