Author: DavidCzech Date: 2009-01-04 00:40:57 -0500 (Sun, 04 Jan 2009) New Revision: 1418
Modified: trunk/concordance/setup.py trunk/concordance/src/Core.c Log: Adjustments for building on windows Modified: trunk/concordance/setup.py =================================================================== --- trunk/concordance/setup.py 2009-01-04 05:03:50 UTC (rev 1417) +++ trunk/concordance/setup.py 2009-01-04 05:40:57 UTC (rev 1418) @@ -30,6 +30,10 @@ if sys.version_info[0] != 3 : raise RuntimeError('Python 3.0 is required for this package.') +libraries = ['glib-2.0', 'gthread-2.0'] +if sys.platform == 'win32' : + libraries.append('ws2_32') + setup( name = 'Concordance', version = __version__.split()[0], @@ -51,9 +55,8 @@ include_dirs = ['/usr/include/glib-2.0', '/usr/lib/glib-2.0/include', ], - libraries = ['glib-2.0', - 'gthread-2.0', - ], + libraries=libraries + , )], classifiers = [ 'Development Status :: 1 - Planning', Modified: trunk/concordance/src/Core.c =================================================================== --- trunk/concordance/src/Core.c 2009-01-04 05:03:50 UTC (rev 1417) +++ trunk/concordance/src/Core.c 2009-01-04 05:40:57 UTC (rev 1418) @@ -21,9 +21,18 @@ #include "Python.h" #include "glib.h" + +#ifdef MS_WINDOWS + +#include <ws2tcpip.h> + +#else + #include <sys/socket.h> #include <netdb.h> +#endif + #include "Core.h" static gpointer conCore_loop (gpointer); @@ -337,7 +346,7 @@ 0, /*tp_call*/ 0, /*tp_str*/ PyObject_GenericGetAttr, /*tp_getattro*/ - PyObject_GenericSetAttr, /*tp_setattro*/ + (setattrofunc)PyObject_GenericSetAttr, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | /*tp_flags*/ Py_TPFLAGS_BASETYPE, _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn