[aur-general] Naming convention for Python 2 and 3 apps
Hi everybody, I know that the naming convention for python libraries is python(2)-*, but do we have a convention for python applications installed for different python versions? The package in question is flake8, which can be installed for both Python 2 and 3. Allen Li
Hi Allen, I think the convention is to make two packages for software that support both Python 2 and 3. For example, in the extra repo, there's python-cairo and python2-cairo python-cchardet and python2-cchardet python-memcached and python2-memcached etc. Xiao-Long Chen
Date: Tue, 27 Nov 2012 11:37:39 -0500 From: cyberdupo56@gmail.com To: aur-general@archlinux.org Subject: [aur-general] Naming convention for Python 2 and 3 apps
Hi everybody,
I know that the naming convention for python libraries is python(2)-*, but do we have a convention for python applications installed for different python versions?
The package in question is flake8, which can be installed for both Python 2 and 3.
Allen Li
On Tue, Nov 27, 2012 at 2:48 PM, 小龙 陈 <chillermillerlong@hotmail.com> wrote:
Hi Allen,
I think the convention is to make two packages for software that support both Python 2 and 3. For example, in the extra repo, there's
python-cairo and python2-cairo python-cchardet and python2-cchardet python-memcached and python2-memcached etc.
Well, both of them are python libraries, which cannot support both python2 and python3 in the same binary package (OK, you can, by including both python2 and python3 modules but that's not the point....) According to a previous email on the same list[1], you probably still need to create two packages for pyton2 and python3 if you want to support both of them (and probably rename the binary to avoid conflict.) [1] http://www.mail-archive.com/aur-general@archlinux.org/msg19241.html
Xiao-Long Chen
Date: Tue, 27 Nov 2012 11:37:39 -0500 From: cyberdupo56@gmail.com To: aur-general@archlinux.org Subject: [aur-general] Naming convention for Python 2 and 3 apps
Hi everybody,
I know that the naming convention for python libraries is python(2)-*, but do we have a convention for python applications installed for different python versions?
The package in question is flake8, which can be installed for both Python 2 and 3.
Allen Li
On Tue, Nov 27, 2012 at 07:43:07PM -0500, Yichao Yu wrote:
On Tue, Nov 27, 2012 at 2:48 PM, 小龙 陈 <chillermillerlong@hotmail.com> wrote:
Hi Allen,
I think the convention is to make two packages for software that support both Python 2 and 3. For example, in the extra repo, there's
python-cairo and python2-cairo python-cchardet and python2-cchardet python-memcached and python2-memcached etc.
Well, both of them are python libraries, which cannot support both python2 and python3 in the same binary package (OK, you can, by including both python2 and python3 modules but that's not the point....)
According to a previous email on the same list[1], you probably still need to create two packages for pyton2 and python3 if you want to support both of them (and probably rename the binary to avoid conflict.)
[1] http://www.mail-archive.com/aur-general@archlinux.org/msg19241.html
Well, the problem is flake8 is a python app, not a library. Maybe I'm worrying about nothing, but should the python-*, python2-* naming convention also be used in this case?
Le 2012-11-28 01:53, Allen Li a écrit :
On Tue, Nov 27, 2012 at 07:43:07PM -0500, Yichao Yu wrote:
Hi Allen,
I think the convention is to make two packages for software that support both Python 2 and 3. For example, in the extra repo, there's
python-cairo and python2-cairo python-cchardet and python2-cchardet python-memcached and python2-memcached etc. Well, both of them are python libraries, which cannot support both
On Tue, Nov 27, 2012 at 2:48 PM, 小龙 陈 <chillermillerlong@hotmail.com> wrote: python2 and python3 in the same binary package (OK, you can, by including both python2 and python3 modules but that's not the point....)
According to a previous email on the same list[1], you probably still need to create two packages for pyton2 and python3 if you want to support both of them (and probably rename the binary to avoid conflict.)
[1] http://www.mail-archive.com/aur-general@archlinux.org/msg19241.html Well, the problem is flake8 is a python app, not a library. Maybe I'm worrying about nothing, but should the python-*, python2-* naming convention also be used in this case? If it is an application and does not provide a module that could be included in another application, then I suggest to depend on python3 only and keep the name "flake8".
Stéphane
On Wed, Nov 28, 2012 at 07:07:27AM -0500, Stéphane Gaudreault wrote:
If it is an application and does not provide a module that could be included in another application, then I suggest to depend on python3 only and keep the name "flake8".
Stéphane
That sounds reasonable enough, but I think we'll still need separate versions here. flake8 is a code checker, and it seems to run into trouble between Python 2 and 3 code since it runs the code when checking it. Backward incompatibility is troublesome. *-python is no good since it looks like it's used for Python APIs and hooks.
On 2012-11-28 21:36 -0500 Allen Li wrote:
On Wed, Nov 28, 2012 at 07:07:27AM -0500, Stéphane Gaudreault wrote:
If it is an application and does not provide a module that could be included in another application, then I suggest to depend on python3 only and keep the name "flake8".
Stéphane
That sounds reasonable enough, but I think we'll still need separate versions here. flake8 is a code checker, and it seems to run into trouble between Python 2 and 3 code since it runs the code when checking it. Backward incompatibility is troublesome.
*-python is no good since it looks like it's used for Python APIs and hooks.
Use "flake8" (Python 3) and "python2-flake8". If you cannot rename the installed files in python2-flake8 to avoid conflicts, add a "conflict=(python8)" to the PKGBUILD. In general the "python*-" prefix is reserved for library packages, but its real purpose (imo) is simply to indicate that a package is closely tied to some version of Python. While we're on the subject, can someone please explain to me again why we use "python-" and not "python3-" for Python 3 libraries? Regards, Xyne
Xyne wrote:
Use "flake8" (Python 3) and "python2-flake8". If you cannot rename the installed files in python2-flake8 to avoid conflicts, add a "conflict=(python8)" to the PKGBUILD.
Sorry, I'm tired. I meant "conflicts=(flake8)". Unless Guido starts hiring Firefox devs, we won't see python8 for a while.
OK, I'm back for a moment, so, as a maintainer of flake8 package, I guess I should write something here (and hope gmail won't mess the nesting. I still don't know how it works here...). Coming to think about it, there IS a library in flake8. I mean, most people will just run the exec and be fine, but if you really need, you can import things from flake8 package and run it from inside the interpreter (which is what the exec does, anyway). That said, I think the closest follow up for us are python(2)-pip packages from [extra]. So, while I was a bit against it, I now think the best thing we can do is to pick up the python(2)-* convention. That still leaves one issue, though. To allow the packages to coexist, we should rename python2 exec to "flake82". Maybe it's just me, but it looks weird. And besides that, I don't know how other apps (e.g. syntax checking plugins for editors) using flake8 will behave. Syntastic has a way to change the exec used for checking, but I don't know about the others. Xyne wrote:
While we're on the subject, can someone please explain to me again why we use "python-" and not "python3-" for Python 3 libraries?
This way, if py4 ever comes out, this will make us a new bunch of mess and a whole lot of work to do again. Isn't that great? -- Karol "Kenji Takahashi" Woźniak <http://kenji.sx>
It seems that none cares after all, huh? But I still do want to do it as right as it can possibly be, mostly because I now need flake8 for both python 2 and 3. So if nobody complains, I'll go with my initial thought (see my previous post here) sometime near the end of the week. On 29 November 2012 07:09, Karol Woźniak <wozniakk@gmail.com> wrote:
OK, I'm back for a moment, so, as a maintainer of flake8 package, I guess I should write something here (and hope gmail won't mess the nesting. I still don't know how it works here...).
Coming to think about it, there IS a library in flake8. I mean, most people will just run the exec and be fine, but if you really need, you can import things from flake8 package and run it from inside the interpreter (which is what the exec does, anyway). That said, I think the closest follow up for us are python(2)-pip packages from [extra]. So, while I was a bit against it, I now think the best thing we can do is to pick up the python(2)-* convention.
That still leaves one issue, though. To allow the packages to coexist, we should rename python2 exec to "flake82". Maybe it's just me, but it looks weird. And besides that, I don't know how other apps (e.g. syntax checking plugins for editors) using flake8 will behave. Syntastic has a way to change the exec used for checking, but I don't know about the others.
Xyne wrote:
While we're on the subject, can someone please explain to me again why we use "python-" and not "python3-" for Python 3 libraries?
This way, if py4 ever comes out, this will make us a new bunch of mess and a whole lot of work to do again. Isn't that great?
-- Karol "Kenji Takahashi" Woźniak <http://kenji.sx>
-- Pozdrawiam, Karol Woźniak
On Tue, Dec 11, 2012 at 12:52:12AM +0100, Karol Woźniak wrote:
It seems that none cares after all, huh? But I still do want to do it as right as it can possibly be, mostly because I now need flake8 for both python 2 and 3. So if nobody complains, I'll go with my initial thought (see my previous post here) sometime near the end of the week.
I think flake8, python2-flake8 for the package names and flake8, flake82 for the executables is fine. flake82 looks a little unwieldy, but I don't think there's anything fundamentally wrong with that name. Maybe include a note in the .install or somewhere so that users know that it has been renamed. Someone else has picked up flake8-python3 since I orphaned it, so you may need to get him/her to drop it again. Allen
Hi, 2012/12/11 Karol Woźniak <wozniakk@gmail.com>
It seems that none cares after all, huh?
We not only care but we also encourage the people to do it right. When we see a package which do not follow the convention we ask the owner to change it asap. Still you might notice that some applications specially in community or extra still do not follow the convention. It was agree a long time ago, more than a year certainly, that those packages with bad naming scheme will be left untouched and not changed if they did not have a python2 counterpart. It was decided that they will be rename wen updates come just because it was an insane amount of job for the TUs..
That still leaves one issue, though. To allow the packages to coexist, we
should rename python2 exec to "flake82". Maybe it's just me, but it looks weird.
It looks weird true though acceptable. You could also call it different flake8-python2 if you really want to make yourself clear.
"python-" and not "python3-" for Python 3 libraries?
This issue was discussed a long time ago. I have to agree that I voted for the python3 naming scheme at that time, but we it was decided the opposite and I accepted. So should you. The idea was that any person willing to use a package compatible with the default version of arch should not remember which is the default python version of arch. Moreover, we wanted to push the development of python3 modules which I have the feeling we have achieved. Nowadays, most of the modules I use in python have the python 3 counterpart. Bu naming python3 as python we wanted to express our support for the transition. I hope I bought some light on the issue, and if you want more info please look in the mails archive of arch-general you will find long discussions about that, Hector
OK, It's done. I decided to follow Hector's advice on the exec name, so py2 version is now called "flake8-python2". If anybody wants it different, he can do a symlink/alias. Let me know, if there are any problems. -- Karol "Kenji Takahashi" Woźniak <kenji.sx>
On Thu, Nov 29, 2012 at 04:58:28AM +0000, Xyne wrote:
Use "flake8" (Python 3) and "python2-flake8". If you cannot rename the installed files in python2-flake8 to avoid conflicts, add a "conflict=(python8)" to the PKGBUILD.
In general the "python*-" prefix is reserved for library packages, but its real purpose (imo) is simply to indicate that a package is closely tied to some version of Python.
While we're on the subject, can someone please explain to me again why we use "python-" and not "python3-" for Python 3 libraries?
Regards, Xyne
Thanks, that makes sense. I believe it's because Python 3 is now considered the "default" python installation, while Python 2 is a specific version. It's the same reason Python 3 is python and Python 2 is python2 in the repo. Although there are quite a few Python 2 packages both in the official repos and on the AUR that use "python-*", I suppose no one can be buggered to fix it. Allen
participants (7)
-
Allen Li
-
Hector Martinez-Seara
-
Karol Woźniak
-
Stéphane Gaudreault
-
Xyne
-
Yichao Yu
-
小龙 陈