Pycairo doesn't compile on win32/VisualStudio, some .c code is assuming C99 (arbitrary variable declaration) and the setup.py file needs some fixes.
I have created a patch against the latest release that fixes the issues.
This is a very poor bug report:
- it does not describe how to reproduce the bug
- it looks like it is describing 2 bugs in one bug report
- it mentions a patch, but no patch is attached
Have a look at these links for advice on how to file bug reports:
Created attachment 28338 [details] [review]
Move variable declarations to the top of the functions
That was a very poor comment:
1) It didn't have any positive feedback towards the reporter, that kind of answers are discouraging and bug reports are needed.
2) It didn't take into account that the bugzilla patch submission might have done silly things (I uploaded the patch twice with the confirmation page!)
Anyway, you are right, I didn't say how to reproduce it explicitely, I thought that mentioning that I can't compile on Windows using Visual Studio was enough.
You login into a Windows host, install Visual Studio, install cairo (for example, using the Gtk+ bundle) and try to run setup.py.
Alternatively, you can run GCC with C99 disabled, that would allow you to reproduce the most relevant issues.
Steve, any comments on the patch?
I've noticed that a new git repository has been setup which is good news.
Your compiler does not support the current C standard. I suggest opening a bug report for the compiler.
Not posssible, Microsoft already stated that they won't support all the C99 features.
Python modules for Windows are expected and recommended to be built with the same Visual Studio version than the standard Python distribution for Windows.
If you don't accept this patch a branch would need to be created to have any sort of regular Windows builds for pycairo (and therefore pygtk). So I ask you to reconsider this patch as it has a minimum impact on the code and basically gets in the way of pygtk having regular releases on Windows (which is my motivation for this to go in).
I'd love to use MinGW if it wasn't unsupported by Python modules on windows to be honest, but that's just not the case and I don't want pygtk to rely on an unsupported toolchain for official releases.
Steve, look at this pygtk thread where someone else has run into this problem:
Carlos Alberto makes a really good point, Cairo does not assume C99, and pycairo shouldn't go further than Cairo itself.
If you're too busy to take care of these things I volunteer myself to request commit access and take care of committing the pathces.
Steve, would be really appreciated to get this in, so Alberto can try to get pygtk working on windows and in this way I can get gedit python modules working finally on windows too.
I'd also be happy to be able to use a more recent pygtk (plus dependencies) for the Windows version of Glom.
If the C99 changes are too controversial, could at least the setup changes be applied to also allow a clean build using MingW?
Also, aren't the changes to avoid C99 syntax minor enough if the benefit is enabling the recommended way of building the bindings (python.org uses VS)?
AFAICT, the goal of being able to use a VS based toolchain is being able to eventually build msi installers for mass deployment.
on Sep 25, 2016 at 22:38:57.
(provided by the Example extension).