Re: glib-mkenums in glib 2



On 29 Dec 2012, at 21:12, John Emmas wrote:


On 29 Dec 2012, at 16:41, John Ralls wrote:


That's because gio/gdbus-2.0/codegen/config.py doesn't exist, but config.py.in does -- another file that needs to have its @variables@ substituted -- in this case @datarootdir@, @prefix@, and @VERSION@.

This one *is* done by configure, which treats it like a Makefile.in; those are all AC_SUBST values. That prolly doesn't make any sense to you, don't worry about it. @prefix@ is the root of the directory tree where glib is getting installed: /usr/local by default on a Unix/Linux box. @datarootdir@ is where various data files (man pages, translation files, etc.) go, normally prefix/share on a Unix/Linux box. @VERSION@ is the Glib version, currently 2.35.4.

So you need to figure out how to fill in those values and create config.py from MSVS.


Many thanks for your help, John.  It's getting later here now but I'll give that some further thought tomorrow.


Hi John,

This morning I tried manually replacing @VARIABLE_NAME@ with sensible values and I created the missing config.py file (note that I didn't modify config.py.in - I just copied it, replacing those particular values).  However, when I run my python command I still get the same error message:-

Traceback (most recent call last):
  File "F:/+GTK-SOURCES/gnu-win32/src/glib/gio/gdbus-2.0/codegen/gdbus-codegen.in", line 39, in <module>
    from codegen import codegen_main
  File "F:\+GTK-SOURCES\gnu-win32\src\glib\gio\gdbus-2.0\codegen\codegen.py", line 26, in <module>
    from . import config
ValueError: Attempted relative import in non-package

Note that these lines seem to be the ones causing the error:-

from  <whatever>  import  <something>

Python doesn't seem to know what to do when it encounters that instruction.

John


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