From bfc772f697449909f5d39f7946df44135369d4e7 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 31 Aug 2014 07:01:06 +0000 Subject: [PATCH] attempt to build the python bindings (TODO: symbol errors wrt to swap) --- build.bat | 6 +++++- mapnik.gyp | 40 +++++++++++++++++++++++++++++++++++++- src/expression_grammar.cpp | 1 - 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/build.bat b/build.bat index d514fe8b7..ddf012910 100644 --- a/build.bat +++ b/build.bat @@ -270,7 +270,7 @@ dumpbin /directives ..\mapnik-sdk\libs\*lib | grep LIBCMT ::msbuild /m:2 /t:mapnik /p:BuildInParellel=true .\build\mapnik.sln /p:Configuration=Release -msbuild /m:2 /p:BuildInParellel=true .\build\mapnik.sln /p:Configuration=Release +msbuild /m:%NUMBER_OF_PROCESSORS% /p:BuildInParellel=true .\build\mapnik.sln /p:Configuration=Release :: /t:rebuild :: /v:diag > build.log IF %ERRORLEVEL% NEQ 0 GOTO ERROR @@ -281,6 +281,10 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR xcopy /i /d /s /q .\build\Release\mapnik.dll ..\mapnik-sdk\libs\ /Y IF %ERRORLEVEL% NEQ 0 GOTO ERROR +:: move python binding into local testable location +xcopy /i /d /s /q .\build\Release\_mapnik.so bindings\python\mapnik\ /Y + + :: plugins xcopy /i /d /s /q .\build\Release\*input ..\mapnik-sdk\libs\mapnik\input\ /Y IF %ERRORLEVEL% NEQ 0 GOTO ERROR diff --git a/mapnik.gyp b/mapnik.gyp index 11fd6defe..28dc0af52 100644 --- a/mapnik.gyp +++ b/mapnik.gyp @@ -31,7 +31,12 @@ ], "conditions": [ ["OS=='win'", { - 'common_defines': ['LIBXML_STATIC','BOOST_LIB_TOOLSET="vc140"','BOOST_COMPILER="14.0"'], # static libxml: libxml2_a.lib + 'common_defines': [ + 'LIBXML_STATIC', # static libxml: libxml2_a.lib + 'BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES', + 'BOOST_LIB_TOOLSET="vc140"', + 'BOOST_COMPILER="14.0"' + ], 'common_libraries': [] }, { 'common_defines': ['SHAPE_MEMORY_MAPPED_FILE','U_CHARSET_IS_UTF8=1'], @@ -144,6 +149,39 @@ } } }, + { + "target_name": "_mapnik", + "type": "loadable_module", + "product_extension": "so", + "sources": [ ' #include #include