[opensuse-packaging] python 2.6 and python3 in openSUSE 11.1 and beyond
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hello everyone, both Python 2.6 and Python 3.0 final releases are scheduled on Sep 04 [1], and they are both going into openSUSE 11.1 During this week i'm going to submit Python 2.6 to BETA (and probably mirror it to BuildService as well), and prepare a Python 3.0 package in BuildService, called "python3". Then i will be away for two weeks, and when i return, i'll start moving things to STABLE/Factory Gentle introduction - --- Python 2.6 is planned to be the last release of 2.x series. It should be mostly backwards compatible to 2.5, and also forward compatible to 3.0. Python 3.0, dubbed Py3k, will be massively *backwards incompatible*, and most of existing python code will not work in it. To ease the transition, there are two things: - - "2to3" converter script [2], which can translate existing 2.x compatible code to 3.0. The script is part of Python 2.6 release. - - Python 2.6's __future__ imports and Py3k warnings mode, which, simply put, turn 2.6 interpreter into 3.0-compatible transition device. Quoting PEP-361 ([1]):
Python 2.6 is not only the next advancement in the Python 2 series, it is also a transitional release, helping developers begin to prepare their code for Python 3.0. As such, many features are being backported from Python 3.0 to 2.6. Thus, it makes sense to release both versions in at the same time. The precedence for this was set with the Python 1.6 and 2.0 release.
Python 2.x series is slowly going to be deprecated in favor of 3.x series - but it seems now that it's a matter of years, not months. Inclusion proposal - --- 1. Python 2.6: Nothing much to say here, that should be a simple version increase. No major changes like 2.5's Py_ssize_t mayhem are planned. /usr/bin/python will be a symlink to /usr/bin/python2.6, and in addition /usr/bin/python2 will also be a symlink to python2.6. 2. Python 3.0: This is basically a "new product" which is going to be installed alongside and not colliding with regular 2.x python. Its binary will be /usr/bin/python3.0, and a symlink /usr/bin/python3. No packages depending on python 2.x should be harmed by having py3k present. Also, there probably won't be any packages depending on py3k yet. regards, m. [1] http://www.python.org/dev/peps/pep-0361/ [2] http://svn.python.org/view/sandbox/trunk/2to3/ - -- (if you have any comments, please CC me in the reply, otherwise my replies will break threads. that is a bug in my way of using the mailinglist, which is not yet fixed) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkhilvoACgkQjBrWA+AvBr9TOwCfVZuYUlMYHn4Zkg0rarka/5O7 Z40An0Peh/qXFldNFxkJurqYP3UU5xoC =deZV -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wednesday 25 June 2008 16:05:30 Jan Matějek wrote:
hello everyone,
both Python 2.6 and Python 3.0 final releases are scheduled on Sep 04 [1], and they are both going into openSUSE 11.1
Awesome. I was actually just today thinking about creating and playing with a python3 package. I'll just wait for yours instead.
No packages depending on python 2.x should be harmed by having py3k present. Also, there probably won't be any packages depending on py3k yet.
I would, of course, like to package a number of modules against it for my own use. I have a few of questions, though: What about the module package naming convention? Should they be of the form 'python3-modulename'? Will the python3 package include rpm macros, such as '%py3_sitedir'? Will there be a 'devel:languages:python3' project, or should Python 3 packages be placed in 'devel:languages:python'? If the latter, should new python3-* packages be created, or should the existing packages be modified to generate both if %suse_version > 1100? -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thursday 26 June 2008 17:37:41 James Oakley wrote: ...
Will there be a 'devel:languages:python3' project, or should Python 3 packages be placed in 'devel:languages:python'? If the latter, should new python3-* packages be created, or should the existing packages be modified to generate both if %suse_version > 1100?
There is no reason to create a new project as long they can be installed side by side.. -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James Oakley napsal(a):
On Wednesday 25 June 2008 16:05:30 Jan Matějek wrote:
hello everyone,
both Python 2.6 and Python 3.0 final releases are scheduled on Sep 04 [1], and they are both going into openSUSE 11.1
Awesome. I was actually just today thinking about creating and playing with a python3 package. I'll just wait for yours instead.
No packages depending on python 2.x should be harmed by having py3k present. Also, there probably won't be any packages depending on py3k yet.
I would, of course, like to package a number of modules against it for my own use. I have a few of questions, though:
What about the module package naming convention? Should they be of the form 'python3-modulename'?
Yes. Unless somebody has a better idea, ofcourse. But i can't think of anything else that would make sense.
Will the python3 package include rpm macros, such as '%py3_sitedir'?
I didn't look into this yet. Probably not now, but we'll certainly add them later.
Will there be a 'devel:languages:python3' project, or should Python 3 packages be placed in 'devel:languages:python'? If the latter, should new python3-*
I'm placing python3 into devel:languages:python
packages be created, or should the existing packages be modified to generate both if %suse_version > 1100?
I don't think that it would make any sense. For one, if the rumors are true, then python2.x packages will need to be rewritten (automatically, but rewritten nevertheless) to work in python3. And for two, even if you managed to make one source work on both pythons, there's still the issue of dependency on python/python3, package name (python- vs. python3-) and all the little thingies. You would most likely end up with two unrelated specs for one package... and at that point you are better off with separate packages. regards m. - -- (if you have any comments, please CC me in the reply, otherwise my replies will break threads. that is a bug in my way of using the mailinglist, which is not yet fixed) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkhjvuMACgkQjBrWA+AvBr+juwCfaS9kJJnf56hIIWh0yBGgdoLv klkAn2Bs92Zu9J6+Q/zj3o4wsysyJDKq =Ktvw -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thursday 26 June 2008 13:08:03 Jan Matějek wrote:
Will the python3 package include rpm macros, such as '%py3_sitedir'?
I didn't look into this yet. Probably not now, but we'll certainly add them later.
Unfortunately, the existing ones refer to 'python' instead of %{__python}, so it's not a simple matter of sticking a '%define __python /usr/bin/python3' in the spec. This leaves either creating a package macro file, redefining the macros in the rpm package, or defining the following in python3-* specs: %py_ver %(python3 -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) %py_prefix %(python3 -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) Personally, I'd prefer the '%define __python /usr/bin/python3' method, but that would require a change to rpm.
Will there be a 'devel:languages:python3' project, or should Python 3 packages be placed in 'devel:languages:python'? If the latter, should new python3-*
I'm placing python3 into devel:languages:python
Excellent. I can't wait to try it.
packages be created, or should the existing packages be modified to generate both if %suse_version > 1100?
I don't think that it would make any sense. For one, if the rumors are true, then python2.x packages will need to be rewritten (automatically, but rewritten nevertheless) to work in python3.
I was under the impression that any code that was migrated to 3.x would run fine in 2.6, just not necessarily in 2.5 or below.
And for two, even if you managed to make one source work on both pythons, there's still the issue of dependency on python/python3, package name (python- vs. python3-) and all the little thingies. You would most likely end up with two unrelated specs for one package... and at that point you are better off with separate packages.
I wasn't proposing that binary packages should work for both. The bytecode is certainly different. I'm just wondering about cases where the upstream source is common. I guess linking python3-modulename to python-modulename would probably be best. -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thursday 26 June 2008 13:08:03 Jan Matějek wrote:
I'm placing python3 into devel:languages:python
It looks like you also put python-2.6 there. Unfortunately, this caused all of the modules to be built against, and thus require, Python 2.6. This makes it impossible to use these modules on any released version of openSUSE unless python is upgraded, which means removing everything in the core product that requires 2.5. -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James Oakley napsal(a):
On Thursday 26 June 2008 13:08:03 Jan Matějek wrote:
I'm placing python3 into devel:languages:python
It looks like you also put python-2.6 there. Unfortunately, this caused all of the modules to be built against, and thus require, Python 2.6. This makes it impossible to use these modules on any released version of openSUSE unless python is upgraded, which means removing everything in the core product that requires 2.5.
Hmm, i see. I didn't realize that this would happen. I'll get back to you once i solve this. m. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkhk79UACgkQjBrWA+AvBr+G3ACbBepNdHSP24r8xJic9h8xDft9 WU8AoIUO8Mkh4aAgFu7Sfz3XZ/iH4Mf1 =dxBo -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James Oakley napsal(a):
On Thursday 26 June 2008 13:08:03 Jan Matějek wrote:
I'm placing python3 into devel:languages:python
It looks like you also put python-2.6 there. Unfortunately, this caused all of the modules to be built against, and thus require, Python 2.6. This makes it impossible to use these modules on any released version of openSUSE unless python is upgraded, which means removing everything in the core product that requires 2.5.
Right. Taken care of, with kind help from the OBS folks (which i'm supposed to be too :/ ). Both python 2.6 and python3 are now (hopefully) building in devel:languages:python:Factory m. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkhk/K0ACgkQjBrWA+AvBr/yEACfZcHvigmsnxwDyLU1NpsIw/Dw hvQAni20nPmDnNCAxZB2vLZb9b/PeP0h =n2zr -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Friday 27 June 2008 11:43:57 Jan Matějek wrote:
Right. Taken care of, with kind help from the OBS folks (which i'm supposed to be too :/ ).
Both python 2.6 and python3 are now (hopefully) building in devel:languages:python:Factory
Excellent. What about python3 modules for 11 and below? Should python3 be linked to from devel:languages:python since it won't conflict? -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James Oakley napsal(a):
On Friday 27 June 2008 11:43:57 Jan Matějek wrote:
Right. Taken care of, with kind help from the OBS folks (which i'm supposed to be too :/ ).
Both python 2.6 and python3 are now (hopefully) building in devel:languages:python:Factory
Excellent.
What about python3 modules for 11 and below? Should python3 be linked to from devel:languages:python since it won't conflict?
Um ... to be honest, i don't have the slightest idea. You see, it is not - -supposed- to conflict, but i only worked on the package itself for a day or so, and now i'm leaving for two weeks' vacation. And i'm a bit afraid what might ensue if i mess with dev:lang:py any more ;e) But basically, yes. Some people from BS suggested to restructure the projects so that dev:lang:py holds the language itself and dev:lang:py:extensions or something like that has all the modules and applications - which build against Factory repository, and against dev:lang:py repository. So that is probably something i'll be going after. regards m. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkhlAv8ACgkQjBrWA+AvBr8BNQCgsLEKxbGjP5xYPaemSj6pKuTK gTcAn2fnIWXfU3VQl9UNnHzfwdO0J0d1 =5eju -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Friday 27 June 2008 12:10:55 Jan Matějek wrote:
What about python3 modules for 11 and below? Should python3 be linked to from devel:languages:python since it won't conflict?
Um ... to be honest, i don't have the slightest idea. You see, it is not -supposed- to conflict, but i only worked on the package itself for a day or so, and now i'm leaving for two weeks' vacation. And i'm a bit afraid what might ensue if i mess with dev:lang:py any more ;e)
As long as the package is called 'python3' it will be fine.
But basically, yes. Some people from BS suggested to restructure the projects so that dev:lang:py holds the language itself and dev:lang:py:extensions or something like that has all the modules and applications - which build against Factory repository, and against dev:lang:py repository. So that is probably something i'll be going after.
That sounds good. However, I would like to play with the package right away and get some modules built. I could link it to devel:languages:python or my home directory and fix any issues I come across, if you're ok with that. -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James Oakley napsal(a):
On Friday 27 June 2008 12:10:55 Jan Matějek wrote:
What about python3 modules for 11 and below? Should python3 be linked to from devel:languages:python since it won't conflict? Um ... to be honest, i don't have the slightest idea. You see, it is not -supposed- to conflict, but i only worked on the package itself for a day or so, and now i'm leaving for two weeks' vacation. And i'm a bit afraid what might ensue if i mess with dev:lang:py any more ;e)
As long as the package is called 'python3' it will be fine.
But basically, yes. Some people from BS suggested to restructure the projects so that dev:lang:py holds the language itself and dev:lang:py:extensions or something like that has all the modules and applications - which build against Factory repository, and against dev:lang:py repository. So that is probably something i'll be going after.
That sounds good.
However, I would like to play with the package right away and get some modules built. I could link it to devel:languages:python or my home directory and fix any issues I come across, if you're ok with that.
Go ahead. I added you to the :Factory project, too, but please write down everything you do in there ;e) regards, m. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEUEARECAAYFAkhlIXgACgkQjBrWA+AvBr8hbwCeJCFwi3TtEHPsSz0RDO6VTbH4 zUcAliTzJP7IFkx4QS9uo5uFw1TQeHw= =MIUY -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Friday 27 June 2008 14:20:57 Jan Matějek wrote:
However, I would like to play with the package right away and get some modules built. I could link it to devel:languages:python or my home directory and fix any issues I come across, if you're ok with that.
Go ahead. I added you to the :Factory project, too, but please write down everything you do in there ;e)
Sure. I'll just keep my changes as a patch in the linked package. Thanks, -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wed, 25 Jun 2008, Jan Mat?jek wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
hello everyone,
both Python 2.6 and Python 3.0 final releases are scheduled on Sep 04 [1], and they are both going into openSUSE 11.1
During this week i'm going to submit Python 2.6 to BETA (and probably mirror it to BuildService as well), and prepare a Python 3.0 package in BuildService, called "python3". Then i will be away for two weeks, and when i return, i'll start moving things to STABLE/Factory
Is it possible to have the python3 package split from the start into a python3-base package that only contains a minimal python runtime? The goal would be to not require any further packages apart from what is already available in the base system (so _not_ sqlite, x11, etc.)? Bonus points if you can split the .spec file so the python3-base package also builds without BuildRequires to such stuff. This would allow the use of python in the core of openSUSE without increasing the minimal installed size and the re-build time. Ya, and of course we want that for python2 as well ... ;) Thanks, Richard. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Richard Guenther napsal(a):
On Wed, 25 Jun 2008, Jan Mat?jek wrote:
Is it possible to have the python3 package split from the start into a python3-base package that only contains a minimal python runtime? The goal would be to not require any further packages apart from what is already available in the base system (so _not_ sqlite, x11, etc.)?
Yes, that is possible. I will not do it now, but will put it on my todo list :e) Is the goal to have smallest possible python-base, like the guys at Mandriva (i think), or the smallest number of additional dependencies? I have nothing against splitting off dependencies, but i lean strongly towards keeping python "big", i.e. keep the standard library as intact as possible. Otherwise it will be tough to choose what stays and what goes.
Bonus points if you can split the .spec file so the python3-base package also builds without BuildRequires to such stuff.
I'm afraid that will be harder, unless you're ready to build python many times over just for the deps. But i'll see what i can do.
This would allow the use of python in the core of openSUSE without increasing the minimal installed size and the re-build time.
Ya, and of course we want that for python2 as well ...
;)
Sure thing, pal ;e) I was going to play with dependencies and subpackages and stuff anyway. But i can't guarantee any results.
Thanks, Richard.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkhjxQgACgkQjBrWA+AvBr9jmgCfXM5B5L6OQG7jLRUSRy7t2f6a 6goAnjVBeWuFf//QftYYkqT/pU1ICfFM =Wb8O -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, On Thu, 26 Jun 2008, Jan Mate(jek wrote:
Bonus points if you can split the .spec file so the python3-base package also builds without BuildRequires to such stuff.
I'm afraid that will be harder, unless you're ready to build python many times over just for the deps. But i'll see what i can do.
Two .spec files are necessary for this, one only building base, the other everything else (and sometimes it's easier to also build base in the second one, and merely just don't package the resulting files, that's how we do it for gcc and libgcj, where both these .spec files are generated from the same input). It's harder to do, but worth the trouble when your package is one of the very early build-dependencies. Ciao, Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thursday 26 June 2008, Jan Mate(jek wrote:
Yes, that is possible. I will not do it now, but will put it on my todo list :e)
could you please put reworking the %py_requries as well for python3? (bnc:346490). A great chance to finally get that right (causes a lot of grief for my as I have to keep custom patches in rpmlint to workaround that bug). Thanks, Dirk --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (7)
-
Adrian Schröter
-
Dirk Mueller
-
James Oakley
-
Jan Mate(jek
-
Jan Matějek
-
Michael Matz
-
Richard Guenther