google-code-export / pywebkitgtk

Automatically exported from code.google.com/p/pywebkitgtk
Other
1 stars 0 forks source link

import webkit failed #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure --prefix=/usr && make && make install
2. import webkit fails with:
ImportError: No module named webkit

What is the expected output? What do you see instead?
that there is no output and that webkit module is imported

What version of the product are you using? On what operating system?
1.1.6 on linux with python 2.6.2

Please provide any additional information below.

why webkit.so is installed by default in 
/usr/lib/python2.6/sites_packages/webkit-1.0 ??? i think that's why it's 
not working...

why do not use ./setup.py and the tools from python to create the package ?
?

Original issue reported on code.google.com by solstice.dhiver@gmail.com on 28 Aug 2009 at 11:10

GoogleCodeExporter commented 9 years ago
I do encouter the same issue when I am trying to prepare the ubuntu 
packaging... 

Original comment by christop...@gmail.com on 28 Aug 2009 at 12:05

GoogleCodeExporter commented 9 years ago
I can reproduce the same problem, using python 2.6.2 on openSUSE 11.2. Any work
around this bug ?

Original comment by lmedi...@gmail.com on 28 Aug 2009 at 3:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Add the path webkit was installed to to your python path as a workaround.  One 
way
would be to place the following before importing webkit:

import sys
sys.path.insert(1, '/usr/local/lib/python2.6/dist-packages/webkit-1.0') # 
assumes
webkit was installed to /usr/local

Alternatively, place a .pth file in webkit-1.0's parent directory with the 
contents
"webkit-1.0":

# echo "webkit-1.0" > /usr/local/lib/python2.6/dist-packages/webkit.pth

Original comment by jason.ri...@gmail.com on 28 Aug 2009 at 10:02

GoogleCodeExporter commented 9 years ago
The workaround this bug i found was to copy webkit-1.0/webkit.so to gtk+2.0/ 
(python
site-packages lib dir)

Original comment by lmedi...@gmail.com on 31 Aug 2009 at 6:28

GoogleCodeExporter commented 9 years ago
same bug:
https://bugzilla.novell.com/show_bug.cgi?id=537837

why does webkit have its own subdirectory anyway? IMO it would be better to 
either
make a webkit/ subdir with __init__.py and _webkit.so, or place webkit.so under
gtk-2.0 (or perhaps into site-packages directly).

adding webkit.so's very own private entry into sys.path (either explicitly or 
by pth)
just doesn't feel right.

Original comment by matej...@gmail.com on 9 Sep 2009 at 6:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
gtk-2.0 suffers the same "bug" iirc.  I believe the only reason the issue 
doesn't pop
up with gtk is because gobject uses distutils (setup.py) which automatically 
creates
the pygtk.pth to include gtk-2.0.   I still could be wrong though... :)

Original comment by jason.ri...@gmail.com on 10 Sep 2009 at 11:20

GoogleCodeExporter commented 9 years ago
I guess we should just put it back in gtk-2.0 in the short term. Long term it 
needs to be somewhere as it's not 
really part of the Gtk project per se. 

Original comment by jmalo...@gmail.com on 10 Sep 2009 at 11:25

GoogleCodeExporter commented 9 years ago
Is this still a problem in 1.1.7? I've added a temp fix in 1.1.7 but I need 
confirmation if this works or not. If not, I'll roll-out 1.1.8 asap. 

Thanks.

Original comment by jmalo...@gmail.com on 3 Oct 2009 at 11:42

GoogleCodeExporter commented 9 years ago
Your fix works great for me. I'll include it on the UBuntu/Debian package. 
Thanks !

Original comment by christop...@gmail.com on 4 Oct 2009 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by jmalo...@gmail.com on 7 Aug 2010 at 9:09

GoogleCodeExporter commented 9 years ago
please tell version of python can it work on 2.2.7 and tell complete steps 
after downloading those files how to import gtk and webkit for using it

Original comment by vaishali...@gmail.com on 17 Apr 2014 at 1:22

GoogleCodeExporter commented 9 years ago
Pywebkit is available on Debian 6 , so should not need install from sources

Original comment by ser...@gmail.com on 29 Jun 2014 at 11:24