Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
Alistair Bush wrote: While you guys are on this subject, I thought I would put in the experience I just had. http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/java-config/java-config-2.1.2.ebuild?rev=1.1view=markup As you will note in the ebuild above I inherit distutils and then declare PYTHON_MODNAME=java_config_2 and have my 2 functions as so pkg_postrm() { distutils_python_version distutils_pkg_postrm } pkg_postinst() { distutils_pkg_postinst ... ... } I just had a quick look at it and this looks really great, I'll take a better look at it to make sure it does what we need. Thanks for this great tip :) Cheers, Rémi -- [EMAIL PROTECTED] mailing list
[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
* Donnie Berkholz [EMAIL PROTECTED]: On 13:25 Fri 12 Oct , Remi Cardona (remi) wrote: 1.1 dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1content-type=text/plain pkg_postinst() { python_version python_mod_optimize ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 } pkg_postrm() { python_version python_mod_cleanup ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 } python_mod_optimize() and python_mod_cleanup() already tag ROOT on, python_mod_optimize() does not. so for ROOT != / this is broken. But does python_mod_optimize do anything useful with ROOT !=/ and cross-compilation? What if python versions differ? -- .: Torsten Veller | :. -- [EMAIL PROTECTED] mailing list
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
On 10:44 Sat 13 Oct , Torsten Veller wrote: * Donnie Berkholz [EMAIL PROTECTED]: python_mod_optimize() and python_mod_cleanup() already tag ROOT on, python_mod_optimize() does not. Mine does: python_mod_optimize() { local myroot # strip trailing slash myroot=${ROOT%/} ... ebegin Byte compiling python modules for python-${PYVER} .. python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${c$ python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py $ eend $? } so for ROOT != / this is broken. But does python_mod_optimize do anything useful with ROOT !=/ and cross-compilation? What if python versions differ? That's a good question, and it looks like python_version() could use a fix for ROOT != / on same-arch systems. On cross-compiled, it'll probably be more work and I'm not sure how to deal with it. Thanks, Donnie -- [EMAIL PROTECTED] mailing list
[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
* Donnie Berkholz [EMAIL PROTECTED]: On 10:44 Sat 13 Oct , Torsten Veller wrote: * Donnie Berkholz [EMAIL PROTECTED]: python_mod_optimize() and python_mod_cleanup() already tag ROOT on, python_mod_optimize() does not. Mine does: python_mod_optimize() { local myroot # strip trailing slash myroot=${ROOT%/} ... ebegin Byte compiling python modules for python-${PYVER} .. python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${compileopts} $@ python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${compileopts} $@ eend $? } No. The arguments of python_mod_optimize are just passed to the ROOTed compileall.py. -- .: Torsten Veller | :. -- [EMAIL PROTECTED] mailing list
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
Donnie Berkholz wrote: python_mod_optimize() { local myroot # strip trailing slash myroot=${ROOT%/} ... ebegin Byte compiling python modules for python-${PYVER} .. python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${c$ python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py $ eend $? } Could the python eclass have a function (or whatever as I'm no bash guru) that returns this : ${ROOT}/usr/$(get_libdir)/python${PYVER}/ We use it over and over in all our ebuilds, and it's error-prone as my last few commits have shown. Cheers, Rémi -- [EMAIL PROTECTED] mailing list
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
On 11:11 Sat 13 Oct , Torsten Veller wrote: * Donnie Berkholz [EMAIL PROTECTED]: On 10:44 Sat 13 Oct , Torsten Veller wrote: * Donnie Berkholz [EMAIL PROTECTED]: python_mod_optimize() and python_mod_cleanup() already tag ROOT on, python_mod_optimize() does not. Mine does: python_mod_optimize() { local myroot # strip trailing slash myroot=${ROOT%/} ... ebegin Byte compiling python modules for python-${PYVER} .. python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${compileopts} $@ python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${compileopts} $@ eend $? } No. The arguments of python_mod_optimize are just passed to the ROOTed compileall.py. It took me about five minutes to figure out what you meant: this means that the filenames do not get passed with ROOT prepended to them, so compileall.py in ROOT compiles the files outside of ROOT. Thanks, Donnie -- [EMAIL PROTECTED] mailing list
[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
Rémi Cardona wrote: Donnie Berkholz wrote: python_mod_optimize() { local myroot # strip trailing slash myroot=${ROOT%/} ... ebegin Byte compiling python modules for python-${PYVER} .. python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py ${c$ python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/compileall.py $ eend $? } Could the python eclass have a function (or whatever as I'm no bash guru) that returns this : ${ROOT}/usr/$(get_libdir)/python${PYVER}/ We use it over and over in all our ebuilds, and it's error-prone as my last few commits have shown. Why not just leave the path off altogether then? That should default to ${ROOT}/usr/$(get_libdir)/python[0-9].[0-9]* IIRC. -- fonts / wxWindows / gcc-porting / treecleaners EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 (0xF9A40662) -- [EMAIL PROTECTED] mailing list
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
Ryan Hill wrote: Why not just leave the path off altogether then? That should default to ${ROOT}/usr/$(get_libdir)/python[0-9].[0-9]* IIRC. We (gnome herd, possibly others) still need to append /site-packages/gtk-2.0 to that path for most of our operations. So if we could write : python_mod_optimize $(python_lib_dir)site-packages/gtk-2.0 or even : python_mod_optimize $(python_site_packges)gtk-2.0 that would be fantastic :) Could that function benefit other ebuilds than ours? Cheers, Rémi -- [EMAIL PROTECTED] mailing list
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
On 13:25 Fri 12 Oct , Remi Cardona (remi) wrote: 1.1 dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1content-type=text/plain pkg_postinst() { python_version python_mod_optimize ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 } pkg_postrm() { python_version python_mod_cleanup ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 } While you guys are on this subject, I thought I would put in the experience I just had. http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/java-config/java-config-2.1.2.ebuild?rev=1.1view=markup As you will note in the ebuild above I inherit distutils and then declare PYTHON_MODNAME=java_config_2 and have my 2 functions as so pkg_postrm() { distutils_python_version distutils_pkg_postrm } pkg_postinst() { distutils_pkg_postinst ... ... } Firstly it is interesting to note that you must call *python_version before distutils_pkg_postrm while distutils_pkg_postinst handles this itself. Is this a good solution? Would it also be a good solution in your case? PYTHON_MODNAME from my understanding what i've investigated will accept a list of modules if you need it to. Anyway, hopefully this helps. Alistair. ps. My python experience has not left the realm of java-config and I have only done 2 releases, 1 1/2 of which I completely screwed up. I am no expert and have no idea whether the above is correct, valid or otherwise safe for human consumption. Don't complain!! -- [EMAIL PROTECTED] mailing list
[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
On 13:25 Fri 12 Oct , Remi Cardona (remi) wrote: 1.1 dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1content-type=text/plain pkg_postinst() { python_version python_mod_optimize ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 } pkg_postrm() { python_version python_mod_cleanup ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 } python_mod_optimize() and python_mod_cleanup() already tag ROOT on, so for ROOT != / this is broken. Thanks, Donnie -- [EMAIL PROTECTED] mailing list