FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EPEL Development

 
 
LinkBack Thread Tools
 
Old 09-13-2011, 03:33 AM
Toshio Kuratomi
 
Default Python packages with python26 subpackages

I was working on a python-pygments/python26-pygments bug today and found
that the byte compilation of the packages was... wrong. Changing various
setings to do with the automatic byte compilation of python modules to byte
code, I could either get everything compiled with python-2.6 or everything
compiled with python-2.4; I could not get the python26 subpackage compiled
with python-2.6 and the python 2.4 portion compiled with python-2.4.

What other packages are there in EPEL that are using the subpackage approach
to build both for python-2.4 and python26? Could maintainers take a moment
to check whether the byte code in both the main python-* and the python26-*
packages are correctly byte compiled? (I checked by running Fedora-14's
rpmlint on the packages. It can detect incorrect byte code compilation for
python modules (those in /use/lib/pythonX.Y/site-packages)),

If you find that your package is not correctly byte compiled, can you
mention it here so that we know how many packages are affected? If your
package *is* correcttly byte compiled, can you mention it here, perhaps with
the spec file so that we can figure out if it's even possible to do this
correctly?

Thanks,
Toshio
_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 
Old 09-13-2011, 12:15 PM
Steve Traylen
 
Default Python packages with python26 subpackages

On Tuesday, September 13, 2011, Toshio Kuratomi <a.badger@gmail.com> wrote:
> I was working on a python-pygments/python26-pygments bug today and found
> that the byte compilation of the packages was... wrong. *Changing various

> setings to do with the automatic byte compilation of python modules to byte
> code, I could either get everything compiled with python-2.6 or everything
> compiled with python-2.4; I could not get the python26 subpackage compiled

> with python-2.6 and the python 2.4 portion compiled with python-2.4.
>

You have to do the byte compiling fairly manually in this case of py26 in the
same package.

I believe that Python_pbs is for instance correct but I can't verify myself at moment.


http://pkgs.fedoraproject.org/gitweb/?p=python-pbs.git;a=blob;f=python-pbs.spec;h=441b3d7e5befce2144b54436cedfdb60588e1ce 8;hb=f1573df43d2ea04000f9c42b76fb0b4e4c5bb072


Steve.


> What other packages are there in EPEL that are using the subpackage approach
> to build both for python-2.4 and python26? *Could maintainers take a moment
> to check whether the byte code in both the main python-* and the python26-*

> packages are correctly byte compiled? *(I checked by running Fedora-14's
> rpmlint on the packages. *It can detect incorrect byte code compilation for
> python modules (those in /use/lib/pythonX.Y/site-packages)),

>
> If you find that your package is not correctly byte compiled, can you
> mention it here so that we know how many packages are affected? *If your
> package *is* correcttly byte compiled, can you mention it here, perhaps with

> the spec file so that we can figure out if it's even possible to do this
> correctly?
>
> Thanks,
> Toshio
>

--
Steve Traylen


_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 
Old 09-13-2011, 12:50 PM
Jeffrey Ness
 
Default Python packages with python26 subpackages

Greetings*Toshio,
It is possible to byte compile both Python 2.4 and Python 2.6 packages within the same SPEC,*please have a look at bug:
https://bugzilla.redhat.com/show_bug.cgi?id=700567
The line that is important is "%global __os_install_post %__multiple_python_os_install_post"




---Jeffrey NessLinux System EngineerIT Operations*[Development]Rackspace Hosting*& IUS*Community


On Sep 13, 2011, at 7:15 AM, Steve Traylen wrote:

On Tuesday, September 13, 2011, Toshio Kuratomi <a.badger@gmail.com> wrote:
> I was working on a python-pygments/python26-pygments bug today and found
> that the byte compilation of the packages was... wrong. *Changing various

> setings to do with the automatic byte compilation of python modules to byte
> code, I could either get everything compiled with python-2.6 or everything
> compiled with python-2.4; I could not get the python26 subpackage compiled

> with python-2.6 and the python 2.4 portion compiled with python-2.4.
>

You have to do the byte compiling fairly manually in this case of py26 in the
same package.

I believe that Python_pbs is for instance correct but I can't verify myself at moment.


http://pkgs.fedoraproject.org/gitweb/?p=python-pbs.git;a=blob;f=python-pbs.spec;h=441b3d7e5befce2144b54436cedfdb60588e1ce 8;hb=f1573df43d2ea04000f9c42b76fb0b4e4c5bb072


Steve.


> What other packages are there in EPEL that are using the subpackage approach
> to build both for python-2.4 and python26? *Could maintainers take a moment
> to check whether the byte code in both the main python-* and the python26-*

> packages are correctly byte compiled? *(I checked by running Fedora-14's
> rpmlint on the packages. *It can detect incorrect byte code compilation for
> python modules (those in /use/lib/pythonX.Y/site-packages)),

>
> If you find that your package is not correctly byte compiled, can you
> mention it here so that we know how many packages are affected? *If your
> package *is* correcttly byte compiled, can you mention it here, perhaps with

> the spec file so that we can figure out if it's even possible to do this
> correctly?
>
> Thanks,
> Toshio
>

--
Steve Traylen


_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list

_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 
Old 09-13-2011, 03:43 PM
Toshio Kuratomi
 
Default Python packages with python26 subpackages

On Tue, Sep 13, 2011 at 02:15:35PM +0200, Steve Traylen wrote:
>
>
> On Tuesday, September 13, 2011, Toshio Kuratomi <a.badger@gmail.com> wrote:
> > I was working on a python-pygments/python26-pygments bug today and found
> > that the byte compilation of the packages was... wrong. Changing various
> > setings to do with the automatic byte compilation of python modules to byte
> > code, I could either get everything compiled with python-2.6 or everything
> > compiled with python-2.4; I could not get the python26 subpackage compiled
> > with python-2.6 and the python 2.4 portion compiled with python-2.4.
> >
>
> You have to do the byte compiling fairly manually in this case of py26 in the
> same package.
>
> I believe that Python_pbs is for instance correct but I can't verify myself at
> moment.
>
> http://pkgs.fedoraproject.org/gitweb/?p=python-pbs.git;a=blob;f=
> python-pbs.spec;h=441b3d7e5befce2144b54436cedfdb60588e1ce 8;hb=
> f1573df43d2ea04000f9c42b76fb0b4e4c5bb072
>
Thanks, this looks a lot like what's present in pygments currently (IIRC,
I believe you contributed that so it's no wonder they're similar :-).
However, I verified that the rpms in the epel repo for python-pbs are
correct whereas python-pygments is not so there must be some minor
difference between the two. python-pbs is currently failing to build in el5
(unable to find the pbs library).

I looked at Jeffrey Ness's fix in parallel to this and once I found it
worked and is simpler, I went with that. So I did not explore further.

-Toshio
_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 
Old 09-13-2011, 03:48 PM
Toshio Kuratomi
 
Default Python packages with python26 subpackages

On Tue, Sep 13, 2011 at 07:50:40AM -0500, Jeffrey Ness wrote:
> Greetings Toshio,
>
> It is possible to byte compile both Python 2.4 and Python 2.6 packages within
> the same SPEC,
> please have a look at bug:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=700567
>
> The line that is important is "%global __os_install_post
> %__multiple_python_os_install_post"
>
Excellent. That not only works, it simplifies considerably the logic in the
python-pygments package.

One side note when looking at the proposed elixir spec: it's not using
a separate source/build directory for the python26 build. So if there were
things that aren't bytecompiled (because the rpm byte compilation script is
run afterwards) and differ between the python-2.4 and python-2.6 builds
you'd get the wrong thing installed (I'm thinking compiled modules here but
there could be other things as well).

-Toshio "Who now updates the python26 page on the wiki with the recipe for
doing byte compilation"
_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 
Old 09-13-2011, 04:39 PM
Jeffrey Ness
 
Default Python packages with python26 subpackages

I did not think about splitting the BUILD_ROOT's per Python version,
but it seems easy enough to implement and add to the future documentation.

As for the elixir package this should of been closed out as a python-elixir package
already exists in EPEL, It was also brought up at a EPEL #fedora_meeting that dual
packaging is discouraged but never officially denounced.

I would suggest contacting BJ Dierkes regarding the wiki,
he was the individual responsible for implementing multiple_python_os_install_post in to Python26
and has the most familiarity with said feature.

Jeffrey

On Sep 13, 2011, at 10:48 AM, Toshio Kuratomi wrote:

> On Tue, Sep 13, 2011 at 07:50:40AM -0500, Jeffrey Ness wrote:
>> Greetings Toshio,
>>
>> It is possible to byte compile both Python 2.4 and Python 2.6 packages within
>> the same SPEC,
>> please have a look at bug:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=700567
>>
>> The line that is important is "%global __os_install_post
>> %__multiple_python_os_install_post"
>>
> Excellent. That not only works, it simplifies considerably the logic in the
> python-pygments package.
>
> One side note when looking at the proposed elixir spec: it's not using
> a separate source/build directory for the python26 build. So if there were
> things that aren't bytecompiled (because the rpm byte compilation script is
> run afterwards) and differ between the python-2.4 and python-2.6 builds
> you'd get the wrong thing installed (I'm thinking compiled modules here but
> there could be other things as well).
>
> -Toshio "Who now updates the python26 page on the wiki with the recipe for
> doing byte compilation"
> _______________________________________________
> epel-devel-list mailing list
> epel-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/epel-devel-list

---
Jeffrey Ness
Linux System Engineer
IT Operations [Development]
Rackspace Hosting & IUS Community


_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 

Thread Tools




All times are GMT. The time now is 03:29 PM.

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