Re: Python naming guidelines clarification

2016-01-25 Thread Thomas Spura
Zbigniew Jędrzejewski-Szmek <zbys...@in.waw.pl> schrieb am Do., 21. Jan.
2016 um 16:50 Uhr:

> On Thu, Jan 21, 2016 at 02:36:00PM +0100, Jan Včelák wrote:
> > On Thu, Jan 21, 2016 at 2:12 PM, Robert Kuska <rku...@redhat.com> wrote:
> > >> And what is the best current practice if the library contains some
> > >> utilities. Should the utilities land in the python{2,3}-name package?
> > >> Should it land in both?
> > >>
> > >> To give you an example, the ripe.atlas.sagan ships a utility
> > >> parse_abuf. I'm currently removing it from the package as the upstream
> > >> is going to deprecate it with the next release. But theoretically,
> > >> should the utility be included in python2-ripe-atlas-sagan as
> > >> parse_abuf2 and in python3-ripe-atlas-sagan as parse_abuf? Or would it
> > >> be better for instance to create a package ripe-atlas-sagan which will
> > >> contain just the Python 3 version of the utility?
> > >
> > > As I suggested in my email before, package just one version running on
> > > Python3 (if supported) when utility provides same functionality
> whether run
> > > with Python3 or Python2.
> > >
> > > There are special cases when you have to provide bin files for both
> major
> > > versions of python, good example is python-pip (python3-pip installs
> python3
> > > modules, python2-pip installs python2 modules).
> > >
> > > Here are conventions for naming executables and some mentions about
> > > Python2/Python3 executables conflicts:
> > > https://fedoraproject.org/wiki/Packaging:Python#Naming
> > >
> > > I believe that your confusion (you are not alone) is caused by
> misleading
> > > example specfile in python packaging guidelines and lack of verbosity
> > > about such cases, I already tried to argue about changing it
> > > https://fedorahosted.org/fpc/ticket/558#comment:6
> > >
> > > Lets assume python project named `example` which ships executable
> `example`:
> > >
> > > 1. `example` is pure application, supports Python3 -
> > > I package it as `example` with executable `example` running on
> Python3, all
> > > backend libraries will be also packaged under `example` rpm as they
> are not meant
> > > to be used as libraries in other projects
> > >
> > > 2. `example` is application and it also ships libraries which may be
> used in
> > > other projects -
> > > I package it as `example` which will ship executable `example` running
> on Python3,
> > > I will build it for both Python2 and Python3 and package its libraries
> under
> > > python2-example and python3-example, (hence `example` will require
> `python3-example`)
> > >
> > > 3. `example` is application with different behaviour for both major
> python versions -
> > > I package `example` as `python-example` with `python2-example` and
> `python3-example`
> > > subpackages carrying both backends libraries and executables,
> unversioned executable
> > > `example` will be packaged under `python2-example` (hence running on
> python2).
>
> Yes, this is a very nice description. It would be great this become
> part of the guidelines, because this is an issue that comes up quite
> often. Current guidelines talk about case 3. prominently, but it
> actually quite rare, and most packages are either case 1. or 2.
>

Hopefully, cases 1 and 2 can be discussed in general, as it also applies to
other packages than just python:
https://fedoraproject.org/wiki/User:Tibbs/AppsVsLibs


> > > - Original Message -
> > >> From: "Jan Včelák" <jvce...@fedoraproject.org>
> > >> To: "Development discussions related to Fedora" <
> devel@lists.fedoraproject.org>
> > >> Sent: Thursday, January 21, 2016 12:40:47 PM
> > >> Subject: Re: Python naming guidelines clarification
> > >>
> > >> On Wed, Jan 20, 2016 at 11:54 PM, Zbigniew Jędrzejewski-Szmek wrote:
> > >> > Yes, the guidelines apply to the source rpm name too. Those
> > >> > srpms should be called python-*, because they contain python
> libries.
>
> Here I assumed that your package is case 2. It looks like this
> from the description. If those modules can be used externally,
> than case 2. applies, if they cannot, then case 1. applies.
>
> Zbyszek
> --
> devel mailing list
> devel@lists.fedoraproject.org
> http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Python naming guidelines clarification

2016-01-21 Thread Jan Včelák
Thank you, Robert. It makes perfect sense. I'll fix my packages.

Cheers,

Jan

On Thu, Jan 21, 2016 at 2:12 PM, Robert Kuska <rku...@redhat.com> wrote:
>
>
> - Original Message -
>> From: "Jan Včelák" <jvce...@fedoraproject.org>
>> To: "Development discussions related to Fedora" 
>> <devel@lists.fedoraproject.org>
>> Sent: Thursday, January 21, 2016 12:40:47 PM
>> Subject: Re: Python naming guidelines clarification
>>
>> On Wed, Jan 20, 2016 at 11:54 PM, Zbigniew Jędrzejewski-Szmek wrote:
>> > Yes, the guidelines apply to the source rpm name too. Those
>> > srpms should be called python-*, because they contain python libries.
>>
>> OK. Thank you.
>>
>> And what is the best current practice if the library contains some
>> utilities. Should the utilities land in the python{2,3}-name package?
>> Should it land in both?
>>
>> To give you an example, the ripe.atlas.sagan ships a utility
>> parse_abuf. I'm currently removing it from the package as the upstream
>> is going to deprecate it with the next release. But theoretically,
>> should the utility be included in python2-ripe-atlas-sagan as
>> parse_abuf2 and in python3-ripe-atlas-sagan as parse_abuf? Or would it
>> be better for instance to create a package ripe-atlas-sagan which will
>> contain just the Python 3 version of the utility?
>>
>
> As I suggested in my email before, package just one version running on
> Python3 (if supported) when utility provides same functionality whether run
> with Python3 or Python2.
>
> There are special cases when you have to provide bin files for both major
> versions of python, good example is python-pip (python3-pip installs python3
> modules, python2-pip installs python2 modules).
>
> Here are conventions for naming executables and some mentions about
> Python2/Python3 executables conflicts:
> https://fedoraproject.org/wiki/Packaging:Python#Naming
>
> I believe that your confusion (you are not alone) is caused by misleading
> example specfile in python packaging guidelines and lack of verbosity
> about such cases, I already tried to argue about changing it
> https://fedorahosted.org/fpc/ticket/558#comment:6
>
>
>
> Lets assume python project named `example` which ships executable `example`:
>
> 1. `example` is pure application, supports Python3 -
> I package it as `example` with executable `example` running on Python3, all
> backend libraries will be also packaged under `example` rpm as they are not 
> meant
> to be used as libraries in other projects
>
> 2. `example` is application and it also ships libraries which may be used in
> other projects -
> I package it as `example` which will ship executable `example` running on 
> Python3,
> I will build it for both Python2 and Python3 and package its libraries under
> python2-example and python3-example, (hence `example` will require 
> `python3-example`)
>
> 3. `example` is application with different behaviour for both major python 
> versions -
> I package `example` as `python-example` with `python2-example` and 
> `python3-example`
> subpackages carrying both backends libraries and executables, unversioned 
> executable
> `example` will be packaged under `python2-example` (hence running on python2).
>
> I hope it makes sense :)
>
>> Jan
>> --
>> devel mailing list
>> devel@lists.fedoraproject.org
>> http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org
>
>
> --
> Robert Kuska
> {rkuska}
> --
> devel mailing list
> devel@lists.fedoraproject.org
> http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Python naming guidelines clarification

2016-01-21 Thread Robert Kuska


- Original Message -
> From: "Jan Včelák" <jvce...@fedoraproject.org>
> To: "Development discussions related to Fedora" 
> <devel@lists.fedoraproject.org>
> Sent: Thursday, January 21, 2016 12:40:47 PM
> Subject: Re: Python naming guidelines clarification
> 
> On Wed, Jan 20, 2016 at 11:54 PM, Zbigniew Jędrzejewski-Szmek wrote:
> > Yes, the guidelines apply to the source rpm name too. Those
> > srpms should be called python-*, because they contain python libries.
> 
> OK. Thank you.
> 
> And what is the best current practice if the library contains some
> utilities. Should the utilities land in the python{2,3}-name package?
> Should it land in both?
> 
> To give you an example, the ripe.atlas.sagan ships a utility
> parse_abuf. I'm currently removing it from the package as the upstream
> is going to deprecate it with the next release. But theoretically,
> should the utility be included in python2-ripe-atlas-sagan as
> parse_abuf2 and in python3-ripe-atlas-sagan as parse_abuf? Or would it
> be better for instance to create a package ripe-atlas-sagan which will
> contain just the Python 3 version of the utility?
> 

As I suggested in my email before, package just one version running on
Python3 (if supported) when utility provides same functionality whether run
with Python3 or Python2.

There are special cases when you have to provide bin files for both major
versions of python, good example is python-pip (python3-pip installs python3 
modules, python2-pip installs python2 modules).

Here are conventions for naming executables and some mentions about 
Python2/Python3 executables conflicts:
https://fedoraproject.org/wiki/Packaging:Python#Naming

I believe that your confusion (you are not alone) is caused by misleading
example specfile in python packaging guidelines and lack of verbosity
about such cases, I already tried to argue about changing it 
https://fedorahosted.org/fpc/ticket/558#comment:6



Lets assume python project named `example` which ships executable `example`:

1. `example` is pure application, supports Python3 -
I package it as `example` with executable `example` running on Python3, all
backend libraries will be also packaged under `example` rpm as they are not 
meant
to be used as libraries in other projects

2. `example` is application and it also ships libraries which may be used in
other projects -
I package it as `example` which will ship executable `example` running on 
Python3, 
I will build it for both Python2 and Python3 and package its libraries under
python2-example and python3-example, (hence `example` will require 
`python3-example`)

3. `example` is application with different behaviour for both major python 
versions -
I package `example` as `python-example` with `python2-example` and 
`python3-example`
subpackages carrying both backends libraries and executables, unversioned 
executable
`example` will be packaged under `python2-example` (hence running on python2).

I hope it makes sense :)

> Jan
> --
> devel mailing list
> devel@lists.fedoraproject.org
> http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


--
Robert Kuska
{rkuska}
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Python naming guidelines clarification

2016-01-21 Thread Jan Včelák
On Wed, Jan 20, 2016 at 11:54 PM, Zbigniew Jędrzejewski-Szmek wrote:
> Yes, the guidelines apply to the source rpm name too. Those
> srpms should be called python-*, because they contain python libries.

OK. Thank you.

And what is the best current practice if the library contains some
utilities. Should the utilities land in the python{2,3}-name package?
Should it land in both?

To give you an example, the ripe.atlas.sagan ships a utility
parse_abuf. I'm currently removing it from the package as the upstream
is going to deprecate it with the next release. But theoretically,
should the utility be included in python2-ripe-atlas-sagan as
parse_abuf2 and in python3-ripe-atlas-sagan as parse_abuf? Or would it
be better for instance to create a package ripe-atlas-sagan which will
contain just the Python 3 version of the utility?

Jan
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Python naming guidelines clarification

2016-01-21 Thread Jan Včelák
On Thu, Jan 21, 2016 at 9:09 AM, Robert Kuska wrote:
> I don't see an use case for python2 subpackage, or am I missing something?

This is a good catch. I'll verify this with upstream. But most
probably, you are right. Thank you.

Jan
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Python naming guidelines clarification

2016-01-21 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 21, 2016 at 02:36:00PM +0100, Jan Včelák wrote:
> On Thu, Jan 21, 2016 at 2:12 PM, Robert Kuska <rku...@redhat.com> wrote:
> >> And what is the best current practice if the library contains some
> >> utilities. Should the utilities land in the python{2,3}-name package?
> >> Should it land in both?
> >>
> >> To give you an example, the ripe.atlas.sagan ships a utility
> >> parse_abuf. I'm currently removing it from the package as the upstream
> >> is going to deprecate it with the next release. But theoretically,
> >> should the utility be included in python2-ripe-atlas-sagan as
> >> parse_abuf2 and in python3-ripe-atlas-sagan as parse_abuf? Or would it
> >> be better for instance to create a package ripe-atlas-sagan which will
> >> contain just the Python 3 version of the utility?
> >
> > As I suggested in my email before, package just one version running on
> > Python3 (if supported) when utility provides same functionality whether run
> > with Python3 or Python2.
> >
> > There are special cases when you have to provide bin files for both major
> > versions of python, good example is python-pip (python3-pip installs python3
> > modules, python2-pip installs python2 modules).
> >
> > Here are conventions for naming executables and some mentions about
> > Python2/Python3 executables conflicts:
> > https://fedoraproject.org/wiki/Packaging:Python#Naming
> >
> > I believe that your confusion (you are not alone) is caused by misleading
> > example specfile in python packaging guidelines and lack of verbosity
> > about such cases, I already tried to argue about changing it
> > https://fedorahosted.org/fpc/ticket/558#comment:6
> >
> > Lets assume python project named `example` which ships executable `example`:
> >
> > 1. `example` is pure application, supports Python3 -
> > I package it as `example` with executable `example` running on Python3, all
> > backend libraries will be also packaged under `example` rpm as they are not 
> > meant
> > to be used as libraries in other projects
> >
> > 2. `example` is application and it also ships libraries which may be used in
> > other projects -
> > I package it as `example` which will ship executable `example` running on 
> > Python3,
> > I will build it for both Python2 and Python3 and package its libraries under
> > python2-example and python3-example, (hence `example` will require 
> > `python3-example`)
> >
> > 3. `example` is application with different behaviour for both major python 
> > versions -
> > I package `example` as `python-example` with `python2-example` and 
> > `python3-example`
> > subpackages carrying both backends libraries and executables, unversioned 
> > executable
> > `example` will be packaged under `python2-example` (hence running on 
> > python2).

Yes, this is a very nice description. It would be great this become
part of the guidelines, because this is an issue that comes up quite
often. Current guidelines talk about case 3. prominently, but it
actually quite rare, and most packages are either case 1. or 2.

> > - Original Message -
> >> From: "Jan Včelák" <jvce...@fedoraproject.org>
> >> To: "Development discussions related to Fedora" 
> >> <devel@lists.fedoraproject.org>
> >> Sent: Thursday, January 21, 2016 12:40:47 PM
> >> Subject: Re: Python naming guidelines clarification
> >>
> >> On Wed, Jan 20, 2016 at 11:54 PM, Zbigniew Jędrzejewski-Szmek wrote:
> >> > Yes, the guidelines apply to the source rpm name too. Those
> >> > srpms should be called python-*, because they contain python libries.

Here I assumed that your package is case 2. It looks like this
from the description. If those modules can be used externally,
than case 2. applies, if they cannot, then case 1. applies.

Zbyszek
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Python naming guidelines clarification

2016-01-20 Thread Jan Včelák
Hello.

I've got several Python packages on review. But I'm not sure if the
naming policy applies to the spec file the same way as it applies on
the resulting packages.

socketIO-client RHBZ #1300092
ripe-atlas-sagan RHBZ #1300217
ripe-atlas-cousteau RHBZ #1300219
ripe-atlas-tools RHBZ #1300222

For each package, the build creates python2-name and python3-name
subpackage containing the Python modules. But the main package is
created only in the case of ripe-atlas-tools, which contains
executable utilities. The other packages don't contain any utilities.

Should be the spec file prefixed with python-? Does this apply both to
packages containing primarily the utilities? Or is there a better and
consistent naming scheme for this case?

Thank you,

Jan
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Python naming guidelines clarification

2016-01-20 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Jan 20, 2016 at 09:44:50PM +0100, Jan Včelák wrote:
> Hello.
> 
> I've got several Python packages on review. But I'm not sure if the
> naming policy applies to the spec file the same way as it applies on
> the resulting packages.
> 
> socketIO-client RHBZ #1300092
> ripe-atlas-sagan RHBZ #1300217
> ripe-atlas-cousteau RHBZ #1300219
Yes, the guidelines apply to the source rpm name too. Those
srpms should be called python-*, because they contain python libries.

> ripe-atlas-tools RHBZ #130022
This one contains an application (too), so the current srpm name is fine.

Zbyszek
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org