FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 06-16-2008, 06:30 PM
Toshio Kuratomi
 
Default Python Virtual Provides

I've added Python Virtual Provides to the list of draft guidelines.

https://fedoraproject.org/wiki/PackagingDrafts/Python

There are two parts:
1) introduce virtual provides for python eggs. Copying from the way we
do rubygems, this would be:


Provides: pythonegg(SQLAlchemy) = %{version}
Requires: pythonegg(SQLAlchemy) >= 0.3.11

2) introduce virtualprovides for normal python modules:

Provides: python(sqlalchemy) = %{version}
Requires: python(sqlalchemy)

The motivation for this is that David Malcolm (dmalcolm) wrote a proof
of concept script to show how easy it would be to extract egg dependency
information as part of the rpm build process.


Since this will be a far reaching change, should it be discussed on
fedora-devel-list first or whether we want to do both parts?


-Toshio

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 06:38 PM
Jeremy Katz
 
Default Python Virtual Provides

On Mon, 2008-06-16 at 14:30 -0400, Toshio Kuratomi wrote:
> I've added Python Virtual Provides to the list of draft guidelines.
> https://fedoraproject.org/wiki/PackagingDrafts/Python
[snip]
> The motivation for this is that David Malcolm (dmalcolm) wrote a proof
> of concept script to show how easy it would be to extract egg dependency
> information as part of the rpm build process.

To help maintain the sanity of everyone building packages, can't we just
auto-generate these? I know there's the old patch floating around
somewhere for python deps that we should be using but haven't yet
instituted. And extending that to work with eggs also seems to make
sense. And then we avoid everyone having to add stuff to their spec
files

Jeremy

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 07:56 PM
David Malcolm
 
Default Python Virtual Provides

On Mon, 2008-06-16 at 14:30 -0400, Toshio Kuratomi wrote:
> I've added Python Virtual Provides to the list of draft guidelines.
>
> https://fedoraproject.org/wiki/PackagingDrafts/Python
>
> There are two parts:
> 1) introduce virtual provides for python eggs. Copying from the way we
> do rubygems, this would be:
>
> Provides: pythonegg(SQLAlchemy) = %{version}
> Requires: pythonegg(SQLAlchemy) >= 0.3.11
>
> 2) introduce virtualprovides for normal python modules:
>
> Provides: python(sqlalchemy) = %{version}
> Requires: python(sqlalchemy)
>
> The motivation for this is that David Malcolm (dmalcolm) wrote a proof
> of concept script to show how easy it would be to extract egg dependency
> information as part of the rpm build process.

I ran into various inconsistencies between the versions listed in the
egg requires.txt file and the rpm specfile, and thought that the latter
ought to be autogenerated from the former.

First pass at a script attached to bug 451228, and I posted this to
fedora-python-devel-list:
https://www.redhat.com/archives/fedora-python-devel-list/2008-June/msg00002.html

Obvious mistake I made was to try to store the mapping from python
modules to package names, instead, the script ought to generate some
kind of virtual provides as in Toshio's suggestion above. Should be
simple to update the script

>
> Since this will be a far reaching change, should it be discussed on
> fedora-devel-list first or whether we want to do both parts?
>

Could we simply put the script in a place where it's available to the
maintainer, so they can opt-in and have it generate the deps?


Hope this helps
Dave

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 08:31 PM
David Malcolm
 
Default Python Virtual Provides

On Mon, 2008-06-16 at 15:56 -0400, David Malcolm wrote:
> On Mon, 2008-06-16 at 14:30 -0400, Toshio Kuratomi wrote:
> > I've added Python Virtual Provides to the list of draft guidelines.
> >
> > https://fedoraproject.org/wiki/PackagingDrafts/Python
> >
> > There are two parts:
> > 1) introduce virtual provides for python eggs. Copying from the way we
> > do rubygems, this would be:
> >
> > Provides: pythonegg(SQLAlchemy) = %{version}
> > Requires: pythonegg(SQLAlchemy) >= 0.3.11
> >
> > 2) introduce virtualprovides for normal python modules:
> >
> > Provides: python(sqlalchemy) = %{version}
> > Requires: python(sqlalchemy)
> >
> > The motivation for this is that David Malcolm (dmalcolm) wrote a proof
> > of concept script to show how easy it would be to extract egg dependency
> > information as part of the rpm build process.
>
> I ran into various inconsistencies between the versions listed in the
> egg requires.txt file and the rpm specfile, and thought that the latter
> ought to be autogenerated from the former.
>
> First pass at a script attached to bug 451228, and I posted this to
> fedora-python-devel-list:
> https://www.redhat.com/archives/fedora-python-devel-list/2008-June/msg00002.html
>
> Obvious mistake I made was to try to store the mapping from python
> modules to package names, instead, the script ought to generate some
> kind of virtual provides as in Toshio's suggestion above. Should be
> simple to update the script

Implemented, attached to bug 451228. This generates the following for
the TurboGears egg (telling it to use the optional SQLAlchemy stuff):

# Autogenerated metadata from "requires.py
/usr/lib/python2.4/site-packages/TurboGears-1.0.4.4-py2.4.egg-info SQLAlchemy"
Provides: pythonegg(TurboGears) = 1.0.4.4
Requires: pythonegg(CherryPy) >= 2.3.0
Requires: pythonegg(CherryPy) < 3.0.0alpha
Requires: pythonegg(DecoratorTools) >= 1.4
Requires: pythonegg(FormEncode) >= 0.7.1
Requires: pythonegg(PasteScript) >= 1.6.2
Requires: pythonegg(RuleDispatch) >= 0.5a0.dev-r2303
Requires: pythonegg(setuptools) >= 0.6c2
Requires: pythonegg(simplejson) >= 1.3
Requires: pythonegg(TurboCheetah) >= 1.0
Requires: pythonegg(TurboJson) >= 1.1.2
Requires: pythonegg(TurboKid) >= 1.0.4
Requires: pythonegg(SQLAlchemy) >= 0.3.10

Is the dash in the RuleDispatch version likely to cause problems?


>
> >
> > Since this will be a far reaching change, should it be discussed on
> > fedora-devel-list first or whether we want to do both parts?
> >
>
> Could we simply put the script in a place where it's available to the
> maintainer, so they can opt-in and have it generate the deps?
>
>
> Hope this helps
> Dave
>
> --
> Fedora-packaging mailing list
> Fedora-packaging@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-packaging

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 08:39 PM
"Jesse Keating"
 
Default Python Virtual Provides

On Mon, Jun 16, 2008 at 4:31 PM, David Malcolm <dmalcolm@redhat.com> wrote:

On Mon, 2008-06-16 at 15:56 -0400, David Malcolm wrote:

> On Mon, 2008-06-16 at 14:30 -0400, Toshio Kuratomi wrote:

> > I've added Python Virtual Provides to the list of draft guidelines.

> >

> > https://fedoraproject.org/wiki/PackagingDrafts/Python

> >

> > There are two parts:

> > 1) introduce virtual provides for python eggs. *Copying from the way we

> > do rubygems, this would be:

> >

> > Provides: pythonegg(SQLAlchemy) = %{version}

> > Requires: pythonegg(SQLAlchemy) >= 0.3.11

> >

> > 2) introduce virtualprovides for normal python modules:

> >

> > Provides: python(sqlalchemy) = %{version}

> > Requires: python(sqlalchemy)

> >

> > The motivation for this is that David Malcolm (dmalcolm) wrote a proof

> > of concept script to show how easy it would be to extract egg dependency

> > information as part of the rpm build process.

>

> I ran into various inconsistencies between the versions listed in the

> egg requires.txt file and the rpm specfile, and thought that the latter

> ought to be autogenerated from the former.

>

> First pass at a script attached to bug 451228, and I posted this to

> fedora-python-devel-list:

> https://www.redhat.com/archives/fedora-python-devel-list/2008-June/msg00002.html

>

> Obvious mistake I made was to try to store the mapping from python

> modules to package names, instead, the script ought to generate some

> kind of virtual provides as in Toshio's suggestion above. *Should be

> simple to update the script



Implemented, attached to bug 451228. *This generates the following for

the TurboGears egg (telling it to use the optional SQLAlchemy stuff):



# Autogenerated metadata from "requires.py

/usr/lib/python2.4/site-packages/TurboGears-1.0.4.4-py2.4.egg-info SQLAlchemy"

Provides: pythonegg(TurboGears) = 1.0.4.4

Requires: pythonegg(CherryPy) >= 2.3.0

Requires: pythonegg(CherryPy) < 3.0.0alpha

Requires: pythonegg(DecoratorTools) >= 1.4

Requires: pythonegg(FormEncode) >= 0.7.1

Requires: pythonegg(PasteScript) >= 1.6.2

Requires: pythonegg(RuleDispatch) >= 0.5a0.dev-r2303

Requires: pythonegg(setuptools) >= 0.6c2

Requires: pythonegg(simplejson) >= 1.3

Requires: pythonegg(TurboCheetah) >= 1.0

Requires: pythonegg(TurboJson) >= 1.1.2

Requires: pythonegg(TurboKid) >= 1.0.4

Requires: pythonegg(SQLAlchemy) >= 0.3.10



Is the dash in the RuleDispatch version likely to cause problems?



It shouldn't, provided the package which this lives in has a matching provides.

--
Jes


--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 08:39 PM
Toshio Kuratomi
 
Default Python Virtual Provides

Jeremy Katz wrote:

On Mon, 2008-06-16 at 14:30 -0400, Toshio Kuratomi wrote:

I've added Python Virtual Provides to the list of draft guidelines.
https://fedoraproject.org/wiki/PackagingDrafts/Python

[snip]
The motivation for this is that David Malcolm (dmalcolm) wrote a proof
of concept script to show how easy it would be to extract egg dependency
information as part of the rpm build process.


To help maintain the sanity of everyone building packages, can't we just
auto-generate these? I know there's the old patch floating around
somewhere for python deps that we should be using but haven't yet
instituted. And extending that to work with eggs also seems to make
sense. And then we avoid everyone having to add stuff to their spec
files

Err, that's why I said the motivation for this was that Dave Malcolm
wrote a script to do that for eggs :-)


-Toshio

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 08:41 PM
Jason L Tibbitts III
 
Default Python Virtual Provides

>>>>> "DM" == David Malcolm <dmalcolm@redhat.com> writes:

DM> Requires: pythonegg(RuleDispatch) >= 0.5a0.dev-r2303

DM> Is the dash in the RuleDispatch version likely to cause problems?

Not so much the dash as the fact that there is a huge chance that with
such incredibly poor versioning practices we're likely to see things
fail to sort properly in the future, leading to versions which go
backwards rpm-wise.

- J<

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 09:11 PM
Toshio Kuratomi
 
Default Python Virtual Provides

Jason L Tibbitts III wrote:

"DM" == David Malcolm <dmalcolm@redhat.com> writes:


DM> Requires: pythonegg(RuleDispatch) >= 0.5a0.dev-r2303

DM> Is the dash in the RuleDispatch version likely to cause problems?

Not so much the dash as the fact that there is a huge chance that with
such incredibly poor versioning practices we're likely to see things
fail to sort properly in the future, leading to versions which go
backwards rpm-wise.

Well, the package will already have that problem. This is the prettiest
I could make cleaning up the version::


%define nonnumeric_relstring a0.dev-r2303
Name: python-ruledispatch
Version: 0.5
Release: 0.1.%{nonnumeric_relstring}
Provides: pythonegg(RuleDispatch) = %{version}%{nonnumeric_relstring}

Since the script Dave provided makes constructs the Provides line for
us, using the script with these kinds of versions doesn't really make
our lives harder.


-Toshio

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 10:27 PM
Jason L Tibbitts III
 
Default Python Virtual Provides

>>>>> "TK" == Toshio Kuratomi <a.badger@gmail.com> writes:

TK> Well, the package will already have that problem.

Perhaps, but then a human is involved to do things like rationalize
the version or bump epoch when required. If a script is pulling this
info out of the egg file then it won't have the benefit of such
oversight.

I guess I'm assuming that this works like it does for Perl, where the
packager needs to specify build dependencies but essentially doesn't
have to specify any kind of runtime dependency.

- J<

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 06-16-2008, 10:37 PM
Jeremy Katz
 
Default Python Virtual Provides

On Mon, 2008-06-16 at 16:39 -0400, Toshio Kuratomi wrote:
> Jeremy Katz wrote:
> > On Mon, 2008-06-16 at 14:30 -0400, Toshio Kuratomi wrote:
> >> I've added Python Virtual Provides to the list of draft guidelines.
> >> https://fedoraproject.org/wiki/PackagingDrafts/Python
> > [snip]
> >> The motivation for this is that David Malcolm (dmalcolm) wrote a proof
> >> of concept script to show how easy it would be to extract egg dependency
> >> information as part of the rpm build process.
> >
> > To help maintain the sanity of everyone building packages, can't we just
> > auto-generate these? I know there's the old patch floating around
> > somewhere for python deps that we should be using but haven't yet
> > instituted. And extending that to work with eggs also seems to make
> > sense. And then we avoid everyone having to add stuff to their spec
> > files
> >
> Err, that's why I said the motivation for this was that Dave Malcolm
> wrote a script to do that for eggs :-)

If it's being done automatically, it's not really packaging policy --
it's just part of things working

Jeremy

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 

Thread Tools




All times are GMT. The time now is 11:28 PM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org