Biting the bullet?

Suvayu Ali fatkasuvayu+linux at gmail.com
Fri May 22 12:26:38 UTC 2015


On Fri, May 22, 2015 at 12:13:53AM -0400, Kevin Cummings wrote:
> On 05/21/2015 05:44 PM, Ranjan Maitra wrote:
> 
> > *** Error compiling '/home/maitra/rpmbuild/BUILDROOT/pdf-stapler-0.3.0-1.fc22.x86_64/usr/lib/python3.4/site-packages/staplelib/stapler.py'...

You are building with python 3.  Maybe the default python on F22 has
changed from python 2 to 3.  If that is the case, you should explicitly
require python 2.  The alternative would be to write a patch introducing
future (see below).

> >   File "/usr/lib/python3.4/site-packages/staplelib/stapler.py", line 79
> >     print "Mode: %s" % mode
> >                    ^
> > SyntaxError: Missing parentheses in call to 'print'
> 
> > WHat is wrong?
> 
> print is a function in python.  Its arguments must appear inside ()'s,
> just like the error messages tell you.
> 
> ie  not:
> 
> 	print input['name']
> 
> but instead:
> 
> 	print(input['name'])

To make sure the same source works with both python 2 and 3, you will
need to use future.  See this SO answer to understand how to do this for
print: http://stackoverflow.com/a/7075121

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


More information about the users mailing list