Closed tumagonx closed 10 years ago
I haven't used it under Windows, but I'll give it a try. Thanks for the report.
(pgi-docgen currently needs pgi trunk, but this problem doesn't look like it's caused by that)
yes, I use pgi trunk. btw if you found gir path error in windows, I use: os.path.join(distutils.sysconfig.get_python_lib(),'gnome','share','gir-1.0') to locate it
Fixed in pgi trunk.
There is now a "build.bat" helper in pgi-docgen and it should get the right gir path.
build.bat Gtk-3.0
I haven't tested the actual sphinx run since 'pip' fails somehow under 'wine'... so please file a new report if that doesn't work and I'll give it another go.
I try to run it under windows (python 2.7.3):
<^> python27 pgi-docgen.py -f target "Gtk-3.0" Create docs: Namespace=Gtk, Version=3.0 Parsing GIR: Gtk-3.0 Parsing GIR: Gdk-3.0 Parsing GIR: cairo-1.0 Parsing GIR: Pango-1.0 Parsing GIR: GObject-2.0 Traceback (most recent call last): File "pgi-docgen.py", line 81, in
gen.write()
File "d:\Sources\pgi-docgen\pgidocgen\main.py", line 51, in write
gen.write()
File "d:\Sources\pgi-docgen\pgidocgen\api.py", line 48, in write
gen.write()
File "d:\Sources\pgi-docgen\pgidocgen\module.py", line 64, in write
repo = Repository(namespace, version)
File "d:\Sources\pgi-docgen\pgidocgen\repo.py", line 285, in init
sub_ns = Namespace(*key)
File "d:\Sources\pgi-docgen\pgidocgen\namespace.py", line 31, in init
self._types[key] = self._parse_types()
File "d:\Sources\pgi-docgen\pgidocgen\namespace.py", line 151, in _parse_types
for key in dir(GObject):
File "c:\python27\lib\site-packages\pgi\module.py", line 64, in dir
obj = getattr(self, name)
File "c:\python27\lib\site-packages\pgi\module.py", line 84, in getattr
attr = cls(info)
File "c:\python27\lib\site-packages\pgi\function.py", line 16, in FunctionAttribute
func = generate_function(info, throws=throws)
File "c:\python27\lib\site-packages\pgi\codegen\funcgen.py", line 227, in generate_function
return_type, method, throws)
File "c:\python27\lib\site-packages\pgi\codegen\funcgen.py", line 111, in _generate_function
arg.setup()
File "c:\python27\lib\site-packages\pgi\codegen\arguments.py", line 239, in setup
self.py_type = import_attribute(iface.namespace, iface.name)
File "c:\python27\lib\site-packages\pgi\util.py", line 200, in import_attribute
return getattr(mod, name)
File "c:\python27\lib\site-packages\pgi\module.py", line 84, in getattr
attr = cls(info)
File "c:\python27\lib\site-packages\pgi\enum.py", line 160, in FlagsAttribute
obj = cls(num)
File "c:\python27\lib\site-packages\pgi\enum.py", line 112, in new
return int.new(cls, value)
OverflowError: Python int too large to convert to C long
<^>
Any ideas?