Hi,
I am packaging kupfer for fedora. I have already packaged python-keyring which is a dependency for kupfer.
http://rtnpro.fedorapeople.org/Packages/SRPMS/python-keyring-0.2-1.fc12.src....
kupfer SPEC used : http://rtnpro.fedorapeople.org/Packages/SPECS/kupfer.spec kupfer src : http://kaizer.se/publicfiles/kupfer/kupfer-v200.tar.gz kupfer uses the waf build system. While ./waf configure works from the source folder of kupfer ################################# [rtnpro@xps kupfer-v200]$ waf configure Check for program python : /usr/bin/python Checking for Python version >= 2.6.0 : ok 2.6.2 Check for program gcc or cc : /usr/lib/ccache/gcc Check for program cpp : /usr/bin/cpp Check for program ar : /usr/bin/ar Check for program ranlib : /usr/bin/ranlib Check for program msgfmt : /usr/bin/msgfmt Check for program intltool-merge : /usr/bin/intltool-merge Checking for header locale.h : ok Check for program xml2po : /usr/bin/xml2po Installing python modules into: /usr/local/share/kupfer Checking for Python module gio : ok Checking for Python module gtk : ok Checking for Python module xdg : ok Checking for Python module dbus : ok Checking for Python module keyring : ok Checking optional dependencies: Check for program dbus-send : /bin/dbus-send Check for program rst2man : not found Optional, allows: Generate and install man page Checking for Python module keybinder : not found Python module keybinder is recommended Please see README Checking for Python module wnck : ok Checking for Python module gnome : ok 'configure' finished successfully (0.808s)
But while I am doing rpmbuild, it says that Python gtk module not found
################################# [rtnpro@xps SPECS]$ rpmbuild -ba kupfer.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.AtQBIg + umask 022 + cd /home/rtnpro/rpmbuild/BUILD + LANG=C + export LANG + unset DISPLAY + cd /home/rtnpro/rpmbuild/BUILD + rm -rf kupfer-v200 + /usr/bin/gzip -dc /home/rtnpro/rpmbuild/SOURCES/kupfer-v200.tar.gz + /bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd kupfer-v200 + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.sxcUp9 + umask 022 + cd /home/rtnpro/rpmbuild/BUILD + cd kupfer-v200 + LANG=C + export LANG + unset DISPLAY + CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' + LDFLAGS=-lm + waf configure --prefix=/usr Check for program python : /usr/bin/python Checking for Python version >= 2.6.0 : ok 2.6.2 Check for program gcc or cc : /usr/lib/ccache/gcc Check for program cpp : /usr/bin/cpp Check for program ar : /usr/bin/ar Check for program ranlib : /usr/bin/ranlib Check for program msgfmt : /usr/bin/msgfmt Check for program intltool-merge : /usr/bin/intltool-merge Checking for header locale.h : ok Check for program xml2po : /usr/bin/xml2po Installing python modules into: /usr/share/kupfer Checking for Python module gio : ok Checking for Python module gtk : not found /home/rtnpro/rpmbuild/BUILD/kupfer-v200/wscript:143: error: Could not find the python module 'gtk' error: Bad exit status from /var/tmp/rpm-tmp.sxcUp9 (%build)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.sxcUp9 (%build)
I am not able to figure out why this is happening. Please help.
Thanks, Regards, rtnpro
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
Chen Lei
2010/5/26 Chen Lei supercyper1@gmail.com:
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
Chen Lei
s/not needed/needed/
On Wed, May 26, 2010 at 2:05 PM, Chen Lei supercyper1@gmail.com wrote:
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
That does not answer the current topic. Also, the checking is done by the waf script, not by the rpm packaging method. The question is : Why waf is not able to detect the gtk python module during rpmbuild? pygtk and concerned gtk packages are installed.
Thanks, rtnpro
2010/5/26 Ratnadeep Debnath rtnpro@gmail.com:
On Wed, May 26, 2010 at 2:05 PM, Chen Lei supercyper1@gmail.com wrote:
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
That does not answer the current topic. Also, the checking is done by the waf script, not by the rpm packaging method. The question is : Why waf is not able to detect the gtk python module during rpmbuild? pygtk and concerned gtk packages are installed.
Thanks, rtnpro --
I don't know why. But It's pointless for a python program to check python modules dependencies during rpmbuild, you can simply add them as Requires.
python_modules = """ gio gtk xdg dbus keyring """ Chen Lei
Le mercredi 26 mai 2010 13:46:20, Ratnadeep Debnath a écrit :
On Wed, May 26, 2010 at 2:05 PM, Chen Lei supercyper1@gmail.com wrote:
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
That does not answer the current topic. Also, the checking is done by the waf script, not by the rpm packaging method. The question is : Why waf is not able to detect the gtk python module during rpmbuild? pygtk and concerned gtk packages are installed.
You probably need "Buildrequires gtk2-devel pygtk2-devel" instead of "Buildrequires gtk2 pygtk2"
Regards, Alain
Ratnadeep Debnath wrote, at 05/26/2010 08:46 PM +9:00:
On Wed, May 26, 2010 at 2:05 PM, Chen Leisupercyper1@gmail.com wrote:
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
That does not answer the current topic. Also, the checking is done by the waf script, not by the rpm packaging method. The question is : Why waf is not able to detect the gtk python module during rpmbuild? pygtk and concerned gtk packages are installed.
Thanks, rtnpro
With Fedora's pygtk2, "import gtk" fails if DISPLAY environment is not set, and DISPLAY environment is always unset during rpmbuild process. You see; ------------------------------------------------------------ Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.sxcUp9 + umask 022 + cd /home/rtnpro/rpmbuild/BUILD + cd kupfer-v200 + LANG=C + export LANG + unset DISPLAY <==== ------------------------------------------------------------
Note that why I said "Fedora's pygtk2" is that with Fedora's pygtk2 the following patch is applied: http://cvs.fedoraproject.org/viewvc/rpms/pygtk2/devel/pygtk-nodisplay-except...
Regards, Mamoru
On Wed, May 26, 2010 at 8:43 AM, Mamoru Tasaka mtasaka@ioa.s.u-tokyo.ac.jp wrote:
Ratnadeep Debnath wrote, at 05/26/2010 08:46 PM +9:00:
On Wed, May 26, 2010 at 2:05 PM, Chen Leisupercyper1@gmail.com wrote:
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-lm" waf configure --prefix=%{_prefix} -> waf configure --prefix=%{_prefix} --no-runtime-deps
All python modules are not needed in runtime, don't check them. Also, the package is noarch, optflags is not needed.
That does not answer the current topic. Also, the checking is done by the waf script, not by the rpm packaging method. The question is : Why waf is not able to detect the gtk python module during rpmbuild? pygtk and concerned gtk packages are installed.
Thanks, rtnpro
With Fedora's pygtk2, "import gtk" fails if DISPLAY environment is not set, and DISPLAY environment is always unset during rpmbuild process. You see;
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.sxcUp9
- umask 022
- cd /home/rtnpro/rpmbuild/BUILD
- cd kupfer-v200
- LANG=C
- export LANG
- unset DISPLAY <====
Note that why I said "Fedora's pygtk2" is that with Fedora's pygtk2 the following patch is applied: http://cvs.fedoraproject.org/viewvc/rpms/pygtk2/devel/pygtk-nodisplay-except...
Regards, Mamoru -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
I've actually done a bit of work packaging this, and submitted a patch for this problem upstream. It's two releases old, but it you can get the idea from the patch, which I've added it in this email.
--- kupfer-pandoras-box-1.1.orig/wscript 2010-02-08 06:26:24.000000000 -0500 +++ kupfer-pandoras-box-1.1/wscript 2010-03-13 01:05:42.924787364 -0500 @@ -103,14 +103,10 @@ if not Options.options.check_deps: return
- python_modules = """ - gio - gtk - xdg - dbus - """ - for module in python_modules.split(): - conf.check_python_module(module) + conf.check_python_module("gtk") + conf.check_python_module("gio") + conf.check_python_module("xdg") + conf.check_python_module("dbus")
Utils.pprint("NORMAL", "Checking optional dependencies:")
Since you're doing this now, could you separate out kupfer-provider into a second binary package, as I'm working with a package that requires it, but not kupfer, so it'd be helpful to be able to install them separately.
Best,
Patrick Dignan
devel@lists.stg.fedoraproject.org