Re: Regarding gdbus-codegen

Hmmm, that's strange, works here.
- in "gdbus-codegen", we have :
from codegen import codegen_main
- and in "/lib/gdbus-2.0/codegen/" we have :
from . import config
where "" is in the same directory.
Using Windows (not MSYS) Python 2.5, and GTK+3.6.4 from :
Running :
python gdbus-codegen
Tarnyko John Emmas writes:
Thanks guys. My memory is hazy now but from what I can recall, any lines like this were always problematic;- from . import some_module No matter what I did, I couldn't get (Windows) Python to understand what "from ." meant. If the module to be imported was in a subfolder - e.g. from the_subfolder import some_module that worked fine - but "from ." wouldn't work at all for me. John

On 17/07/2013 16:15, Tarnyko wrote:
Hi Fan,
Thanks for sharing. FYI, MinGW makefiles from latest master generate and install "gdbus-codegen" correctly. You may want to take inspiration from them if you plan to add gdbus-codegen generation for MSVC (don't know this toolchain enough to do it myself).
I just suggested a little path change  :
Fan Chun-wei writes:
Hi John,
(list people: I understand this is a rather old topic that was brought
up few months ago:) ).
I was poking around with the Python scripts for gdbus-codegen lately,
and I thought it might be good to let you know a few things about its
use on Windows, especially under Visual Studio builds of GLib
It appears that one wouldn't have to change anything in those Python
scripts (at least from the release stable/unstable tarballs) so that
they can be ran on Windows.
What I found is that for it to work "installed" on Windows (suppose your
GLib "installation" is in c:\foo):
-From $(srcroot)\gio\gdbus-2.0\codegen, copy the file
as-is to c:\foo\bin, and renaming it as gdbus-codegen. (This files has
support for Windows regarding path issues without needing to process the
file with autotools)
-Copy all the .py files in $(srcroot)\gio\gdbus-2.0\codegen to
c:\foo\lib\gdbus-2.0\codegen as is.
So this will basically work when you have the following layout
gdbus-codegen (renamed from
Hope this may be of help. Unfortunately I can't run the
gdbus-test-codegen test program as it uses items from GIO-UNIX, but it
does seem to me that generating the test sources in-tree (with
UNINSTALLED_GLIB_SRCDIR set) and using the script in the layout I just
mentioned (without UNINSTALLED_GLIB_SRCDIR set, obviously) produce
identical results.
With blessings.
gtk-devel-list mailing list
gtk-devel-list gnome org
gtk-devel-list mailing list
gtk-devel-list gnome org

gtk-devel-list mailing list
gtk-devel-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]