2010-10-23

Upgrade to python3.1.2 in my Arch box, phew!

When I did
yaourt -Syu --aur
yesterday, I found that a lot of packages with new version available. Wow, what happed?  I checked those packages, most of them were python related.  I saw python3.1.2 there in the upgrade list. Archlinux will go with python3?! Did some google search, found the blog entry.  Yep, arch is a real bleeding edge distribution.

However I am not sure what is gonna happen if I replace python with python2 and install python3 as default python.  All python scripts with #!/usr/bin/python may have problem. also, those applications using old python libraries would not run smoothly either. It was late, I just added python python2 to IgnorePkg, and did the upgrade.

Today I rethink about it. If  Arch maintainer had done a lot of rebuild work and decided to make the transition, it is worth trying to upgrade! At least all packages in [core] should not have problem (hopefully). For the packages in aur, I can rebuild again by myself. So I removed python and python2 from IgnorePkg, executed -Syu.

After the upgrade, I did followings.

- link /usr/bin/python to /usr/bin/python2.
Most python scripts were still developed with python2.x.  This will make them still working without changing those scripts' shebang.

- rebuild and reinstall packages in AUR
Some changes need to be made in PKGBUILD files during installation, particularly for those marked as 'out-dated' but no newer version available yet packages. for example, tpfand and tpfan-admin. (Thinkpad fan control) are looking for /usr/lib/python2.6/... libraries in building phase. Just pointing to /usr/lib/python2.7/... will get them rebuild and work.

- Oops, vi/vim/gvim 7.2 doesn't work any longer! 
since I am not yet used to working with vim 7.3. I put vim-runtime, gvim into IgnorePkg. but vim7.2 needs libpython2.6.so.1.0., which doesn't exist anymore. I can download vim source code and rebuild. But I did it in a dirty/lazy way, well, I like dirty. ;)  I think there might be other applications need libpython2.6 as well, so I made libpython2.6.so.1.0 link to the python2.7 library.  then vim is back! 


So far so good, although I haven't got time to test all my applications.

probably the transition of Arch will push some teams to make python3 compatible releases, e.g. pygtk, pyqt, django...

No comments:

Post a Comment