Bug 335550 - python scripting support correctly detected, but cannot find corresponding button/action at runtime
Summary: python scripting support correctly detected, but cannot find corresponding bu...
Status: RESOLVED FIXED
Alias: None
Product: kig
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: David E. Narvaez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-29 17:23 UTC by Maurizio Paolini
Modified: 2014-06-08 16:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.13.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maurizio Paolini 2014-05-29 17:23:23 UTC
While building latest git sources cmake asserts that python scripting would be included, however at runtime the python scripting button cannot be found anywhere, not even in the "configure toolbar" dialog.
kig seems capable of loading saved files with python scripting correctly, but I could find no way to create a new python script.

Reproducible: Always

Steps to Reproduce:
1. download git sources and install what is needed to have python scripting support
2. cmake (correctly detects boost-python library)
3. make and make install
4. run kig, look for the "python script" button under "Objects->Other"
Actual Results:  
Cannot find it

Expected Results:  
Should be there

Platform: fedora 20, kernel 3.14.4-200.fc20.i686+PAE
kde version 4.12.5-2 installed
Comment 1 David E. Narvaez 2014-06-07 20:33:26 UTC
Can you post your CMake output?
Comment 2 Maurizio Paolini 2014-06-07 21:25:36 UTC
$ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=debugfull
-- Found Qt-Version 4.8.6 (using /usr/bin/qmake-qt4)
-- Found X11: /usr/lib/libX11.so
-- Found KDE 4.12 include dir: /usr/include/kde4
-- Found KDE 4.12 library dir: /usr/lib/kde4/devel
-- Found the KDE4 kconfig_compiler4 preprocessor: /usr/bin/kconfig_compiler4
-- Found automoc4: /usr/bin/automoc4

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * Boost.Python - Kig can optionally use Boost.Python for Python scripting

-----------------------------------------------------------------------------
-- Congratulations! All external packages have been found.
-----------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /home/paolini/Git/kig
$
Comment 3 David E. Narvaez 2014-06-08 04:57:54 UTC
Git commit 7339bc50e6ced3955d6265ef22a1474bcc6adb19 by David E. Narvaez.
Committed on 08/06/2014 at 04:50.
Pushed by narvaez into branch 'KDE/4.13'.

Restoring the KIG_ENABLE_PYTHON_SCRIPTING Definition

This was missing from the new CMake code to detect Boost + Python
support

M  +3    -0    CMakeLists.txt

http://commits.kde.org/kig/7339bc50e6ced3955d6265ef22a1474bcc6adb19
Comment 4 Maurizio Paolini 2014-06-08 09:24:04 UTC
Wonderful! Now python scripting is actually included!
However there is still a problem:  I get an error when trying to use
some mathematical functions (I tried sin and exp).  the error I get is

NameError: global name 'exp' is not defined
 File "<string>", line 8 in calc
Traceback ...

the script is:

  x = arg1.value()
  return DoubleObject (exp (x))     <-- this is line 8

whith arg1 being a numerical string.

Perhaps this has something to do with comment 9 in the bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1101626
Comment 5 David E. Narvaez 2014-06-08 12:53:17 UTC
Thanks for testing and reporting, please file a new bug about this.