LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1626|回复: 26

Plan for python upgrade

[复制链接]
发表于 2008-10-3 22:00:52 | 显示全部楼层 |阅读模式
Hi everybody,

Python-2.6 is out and Python-3.0 is scheduled for release in a couple of
weeks.  People have been asking how I am going to handle the update so I
thought I'd post a summary here.

There are packages that need rebuilt not matter how I handle the
upgrade.  I know of 39 packages in [extra] which link to
libpython2.5.so.  Also 8 packages add their path to the python system
path and it is easier to rebuild them than hack some backwards
compatibility.

My current plan is that the python package will be python3.0 and add a
python2 package for python2.6.  This bring in a couple of issues.
Everything that (make)depends on python will need changed to python2 (48
packages).  More difficult is that package with "/usr/bin/python" or
"/usr/bin/env python" in their scripts need this fixed (addition 30
rebuilds and effects many of the above rebuilds).  Some of these
packages are nice and just require a rebuild and their scripts point in
the right place.  Others require a bit of sed magic.

This plan requires a total of 125(!) rebuilds but most of the are fairly
simple to transition to python2.  Of the 33 packages on my system, the
only package I have had trouble rebuilding so far is subversion as
autoreconf calls something that calls python but I have not looked into
it too hard or even checked if it as actually a problem...

The backup plan is to keep the python as the python-2 series and add a
python3 package.  This means less rebuilds at the moment but this will
make transitioning packages to python3 harder (requiring the sed magic
for scripts to point at python3 instead of python).  Also, I personally
think this is the less clean approach long term.  But, if people feel
strongly that this is the best route to go, I may be convinced (it is a
lot less work at my end).

Both the gnome and boost rebuilds need to be moved from [testing] before
I start this due to overlapping packages with the python rebuilds.

Cheers,
Allan

转载自archlinux新闻组
发表于 2008-10-3 22:04:27 | 显示全部楼层
不咋喜欢python的说
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-3 22:05:47 | 显示全部楼层
但是python在系统里面太重要了,太多gnome界面使用python写的了
回复 支持 反对

使用道具 举报

发表于 2008-10-3 22:32:56 | 显示全部楼层
没事不要升级
不过2.6其实是2.5到3.0的中间过度版本,基本上是增加一些功能,和2.5兼容性问题应该比较少
回复 支持 反对

使用道具 举报

发表于 2008-10-3 22:42:15 | 显示全部楼层
tnnd,这帮家伙一点稳定的概念都没有,还想着跳到3去,先不说庞大的community中的python相关包是否跟得上同步,众多相关程序克服3的兼容问题就会有很长的过渡期,更别说aur上的东东了,有空检查检查源里如此众多坏掉的包也比追新更有意思

我自己做得n多svn、git相关的东东都依赖python,一旦这么搞的话,就不能着急跟着更新了,否则真有的忙活了,看来跳到lfs的日期要提前的说
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-3 22:45:13 | 显示全部楼层
python的这次升级无异于glibc 2.8跳到3.0,基本上2/3的gui程序要重新编译,能不能通过还不一定呢

还好只是计划,这种非常基础的东西升级,起码要过个1年才敢干
回复 支持 反对

使用道具 举报

发表于 2008-10-4 00:03:56 | 显示全部楼层
很可惜arch上面东西都是最新的。什么出来新的都靠我们测试了感觉。。

python不是脚本编程嘛,应该问题不大把。顶多程序需要重新生成.pyc,绝对没有gcc那么夸张
回复 支持 反对

使用道具 举报

发表于 2008-10-4 09:54:10 | 显示全部楼层
Python3 普及还需要很长一段时间
回复 支持 反对

使用道具 举报

发表于 2008-10-4 11:06:31 | 显示全部楼层
Post by jarryson;1889964
很可惜arch上面东西都是最新的。什么出来新的都靠我们测试了感觉。。
python不是脚本编程嘛,应该问题不大把。顶多程序需要重新生成.pyc,绝对没有gcc那么夸张

Python已经成为对Linux系统而言至关重要的部件,许多人都没有意识到原来自己的Linux系统中竟然有如此多的软件依赖python。然而,Python3的改变是如此之大,使得几乎没有任何一个Python2脚本能够不修改的在Python3下面运行。——对于gcc的修改顶多是修改库,然而Python3不但修改了大量的库,还修改了大量的语法,这种修改实在太激进。

在将来的相当长的时间里,Python3和Python2并存估计是必然的。

如果把系统缺省的python修改为python3,其影响将是巨大的。
回复 支持 反对

使用道具 举报

发表于 2008-10-4 16:56:56 | 显示全部楼层
如果是大量改进,而且修改大量语法,那么确实是不行。因为我以为没有更改多少地方,至少语法没有改。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表