You are not logged in.

#1 2011-03-15 02:45:04

jwhendy
Member
Registered: 2010-04-01
Posts: 621

[SOLVED] Is python vs. python2 print syntax causing failures to build?

I've been trying to build pidgin so I can include webcam (aud/vid) support as well as support for the sametime protocol. I've tried pidgin-git, pidgin-mtn and most recently pidgin-gnome and haven't been able to install any of them.

I've been pursuing pidgin-gnome the most since pidgin-git is way out of date and pidgin-mtn just won't budge for me.

What I'm running into are continual failings due to print statements in one particular file: src/pkgname/libpurple/dbus-analyze-functions.py. In my extremely novice knowledge of python, I know that between 2 and 3, the print syntax changed a bit. I have the tutorial Dive into Python on my computer and it's in the python2 syntax so I recall that even when trying do the cursory "Hello World" I had to fiddle with the syntax. Specifically, I believe python 3+ requires anything after 'print' to be in parentheses.

What this means is that every time that dbus-analyze-functions.py file fails, I track down the error and put it's print argument in parentheses. Then it fails at the next one.



What is the protocol for things like this? The PKGBUILD has python in the depends... so are we just too far ahead in Arch and therefore don't have compatability with some of these applications? Not sure how to build pidgin via any of the aur packages at this point.

Thanks for suggestions. Most likely, I'm missing something silly after all!

Edit: great suggestion from ngoonee below -- I was relying on AUR for something I could have gotten from ABS all along. ABS had the correct precautions for handling python vs. python2 (saw clearly in the PKGBUILD the line '--with-python=/usr/bin/python2'.

Last edited by jwhendy (2011-03-15 16:47:40)

Offline

#2 2011-03-15 03:11:21

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Is python vs. python2 print syntax causing failures to build?

Alright, my solution was to ditch python and simply replace python with python2 in the PKGBUILD. It's now building. Thankfully I didn't have much dependent on python or it wouldn't have been so easy to remove. Surely there is a better way, though, right? Why does this cause so many issues and why are PKGBUILDs requiring python when python clearly won't compile?

Offline

#3 2011-03-15 04:12:48

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,360

Re: [SOLVED] Is python vs. python2 print syntax causing failures to build?

The maintainer obviously isn't looking after the package anymore. Its the Arch USER repository, after all.

You'd probably have been better served rebuilding pidgin from abs. Grab the PKGBUILD and you'll see what's been done to fix it for python2 compatibility.

Why aren't you using http://aur.archlinux.org/packages.php?ID=44209 anyway?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2011-03-15 13:20:22

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Is python vs. python2 print syntax causing failures to build?

@ngoonee: Hmmm. I should look into ABS. I was thinking that "stock" packages were only available as binary and thus I've only either a) installed binaries via pacman or b) built some version from AUR when the repos didn't have them or when I needed special features.

Because the WIKI doesn't say a lick about libpurple-meanwhile. It says to compile from source, removing '--disable-meanwhile' and installing the meanwhile package. Fill me in if there's a better way and I'll make sure the wiki gets updated to say the same.

Last edited by jwhendy (2011-03-15 13:20:39)

Offline

#5 2011-03-15 16:44:50

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Is python vs. python2 print syntax causing failures to build?

Alright -- went the ABS route and that was great. Pidgin is compiled with video support and removing --disable-meanwhile as well as installing the meanwhile package has allowed me to add my Sametime account as well. Not sure what libpurple-meanwhile does, then. The wiki appears to be correct.

Thanks for the ABS tip.

Offline

Board footer

Powered by FluxBB