Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Packaging (http://www.linux-archive.org/fedora-packaging/)
-   -   ensuring a specific version of python (http://www.linux-archive.org/fedora-packaging/562595-ensuring-specific-version-python.html)

Martin Krizek 08-10-2011 02:18 PM

ensuring a specific version of python
 
Is there a proper, 'Packaging Guidelines friendly' way to ensure a specific version of python?

Is following fine?

Requires: python >= 2.6
BuildRequires: python2-devel >= 2.6

Thanks,
Martin
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Rex Dieter 08-10-2011 02:24 PM

ensuring a specific version of python
 
On 08/10/2011 09:18 AM, Martin Krizek wrote:
> Is there a proper, 'Packaging Guidelines friendly' way to ensure a specific version of python?
>
> Is following fine?
>
> Requires: python>= 2.6
> BuildRequires: python2-devel>= 2.6

Depends on the context and what you mean exactly by "Specific version of
python". however,

BuildRequires: python2-devel >= 2.6
will indeed ensure that python3 isn't used, for example.

python runtime deps are generally automatic, with
Requires: python(abi) = ...
being added by rpmbuild. do you have any cases where this isn't the case?

-- rex
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Martin Krizek 08-10-2011 02:49 PM

ensuring a specific version of python
 
> > Is there a proper, 'Packaging Guidelines friendly' way to ensure a
> > specific version of python?
> >
> > Is following fine?
> >
> > Requires: python>= 2.6
> > BuildRequires: python2-devel>= 2.6
>
> Depends on the context and what you mean exactly by "Specific version
> of
> python". however,
>
> BuildRequires: python2-devel >= 2.6
> will indeed ensure that python3 isn't used, for example.

I mean python >= 2.6 and < 3.

Thanks,
Martin
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

James Laska 08-10-2011 02:59 PM

ensuring a specific version of python
 
On Wed, 2011-08-10 at 09:24 -0500, Rex Dieter wrote:
> On 08/10/2011 09:18 AM, Martin Krizek wrote:
> > Is there a proper, 'Packaging Guidelines friendly' way to ensure a specific version of python?
> >
> > Is following fine?
> >
> > Requires: python>= 2.6
> > BuildRequires: python2-devel>= 2.6
>
> Depends on the context and what you mean exactly by "Specific version of
> python".

Just adding a bit more context to Martin's post. Specifically in this
case, the code being packaged no longer runs on python 2.4 (RHEL5). So
we were looking for a way packaging method to ensure this wouldn't land
on any RHEL5 systems, where it's not expected to work.

> however,
>
> BuildRequires: python2-devel >= 2.6
> will indeed ensure that python3 isn't used, for example.
>
> python runtime deps are generally automatic, with
> Requires: python(abi) = ...
> being added by rpmbuild. do you have any cases where this isn't the case?

Thanks,
James
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Tom Callaway 08-10-2011 03:01 PM

ensuring a specific version of python
 
On 08/10/2011 10:59 AM, James Laska wrote:
> On Wed, 2011-08-10 at 09:24 -0500, Rex Dieter wrote:
>> On 08/10/2011 09:18 AM, Martin Krizek wrote:
>>> Is there a proper, 'Packaging Guidelines friendly' way to ensure a specific version of python?
>>>
>>> Is following fine?
>>>
>>> Requires: python>= 2.6
>>> BuildRequires: python2-devel>= 2.6
>>
>> Depends on the context and what you mean exactly by "Specific version of
>> python".
>
> Just adding a bit more context to Martin's post. Specifically in this
> case, the code being packaged no longer runs on python 2.4 (RHEL5). So
> we were looking for a way packaging method to ensure this wouldn't land
> on any RHEL5 systems, where it's not expected to work.

I think this will work:

Requires: python(abi) > 2.4

It won't prevent the package from being built for RHEL5. but it sure
won't install. :)

~tom

==
Fedora Project
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Rex Dieter 08-10-2011 03:01 PM

ensuring a specific version of python
 
On 08/10/2011 09:59 AM, James Laska wrote:
> BuildRequires: python2-devel>= 2.6

This ^^ should work then.

-- rex
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Toshio Kuratomi 08-10-2011 03:05 PM

ensuring a specific version of python
 
On Wed, Aug 10, 2011 at 10:59:30AM -0400, James Laska wrote:
> On Wed, 2011-08-10 at 09:24 -0500, Rex Dieter wrote:
> > On 08/10/2011 09:18 AM, Martin Krizek wrote:
> > > Is there a proper, 'Packaging Guidelines friendly' way to ensure a specific version of python?
> > >
> > > Is following fine?
> > >
> > > Requires: python>= 2.6
> > > BuildRequires: python2-devel>= 2.6
> >
> > Depends on the context and what you mean exactly by "Specific version of
> > python".
>
> Just adding a bit more context to Martin's post. Specifically in this
> case, the code being packaged no longer runs on python 2.4 (RHEL5). So
> we were looking for a way packaging method to ensure this wouldn't land
> on any RHEL5 systems, where it's not expected to work.
>
Rex's answer about the above working but python(abi) being added
automatically for Requires: is right on the button.

Just one note to add: if this is an application rather than a module there is
a python26 package in EPEL5 so it's conceivable that someone could add
enough python26 modules that this was possible. If it's a module, the
module would need to be renamed python26-MODULE anyway, so that's not a big
deal.

-Toshio
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

James Laska 08-10-2011 04:42 PM

ensuring a specific version of python
 
On Wed, 2011-08-10 at 11:01 -0400, Tom Callaway wrote:
> On 08/10/2011 10:59 AM, James Laska wrote:
> > On Wed, 2011-08-10 at 09:24 -0500, Rex Dieter wrote:
> >> On 08/10/2011 09:18 AM, Martin Krizek wrote:
> >>> Is there a proper, 'Packaging Guidelines friendly' way to ensure a specific version of python?
> >>>
> >>> Is following fine?
> >>>
> >>> Requires: python>= 2.6
> >>> BuildRequires: python2-devel>= 2.6
> >>
> >> Depends on the context and what you mean exactly by "Specific version of
> >> python".
> >
> > Just adding a bit more context to Martin's post. Specifically in this
> > case, the code being packaged no longer runs on python 2.4 (RHEL5). So
> > we were looking for a way packaging method to ensure this wouldn't land
> > on any RHEL5 systems, where it's not expected to work.
>
> I think this will work:
>
> Requires: python(abi) > 2.4
>
> It won't prevent the package from being built for RHEL5. but it sure
> won't install. :)

Ah, I completely forgot about the "python(abi)" format. This should do
the trick.

Thanks,
James
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging


All times are GMT. The time now is 11:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.