[atk] MSVC Builds: Use PythonDir instead of PythonPath



commit 62769abbe997022db2cb6539dd2fef08acefe243
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jul 13 17:31:07 2017 +0800

    MSVC Builds: Use PythonDir instead of PythonPath
    
    If someone is building using MSBuild, we want to make sure that we do
    not use an envvar that would also determine where the Python modules are
    loaded.
    
    Also, allow different Python paths depending on the Visual Studio
    version that is being used for Visual Studio 201x builds, to better suit
    the version of  Visual Studio that is used to build the official
    releases of Python, which means the default is as follows:
    
    -Visual Studio 2010, 2012, 2013: Python 3.4.x, which is built with 2010
    -Visual Studio 2015 and 2017: Python 3.6.x, which is built with 2015.

 win32/vs10/README.txt                  |    2 +-
 win32/vs10/atk-gen-src.props           |    8 ++++----
 win32/vs10/atk-install.propsin         |    4 ++--
 win32/vs10/atk-version-paths.props.in  |   16 ++++++++++------
 win32/vs9/README.txt                   |    2 +-
 win32/vs9/atk-gen-src.vsprops          |   10 +++++-----
 win32/vs9/atk-install.vspropsin        |    4 ++--
 win32/vs9/atk-version-paths.vsprops.in |    8 ++++----
 8 files changed, 29 insertions(+), 25 deletions(-)
---
diff --git a/win32/vs10/README.txt b/win32/vs10/README.txt
index b394757..f9fe013 100644
--- a/win32/vs10/README.txt
+++ b/win32/vs10/README.txt
@@ -19,7 +19,7 @@ and ZLib.
 You will also need a Python 2.7.x or 3.x installation, as Python will be
 used to run glib-genmarshal, which was converted into a Python script from
 a compiled C program, in addition to generating the atk.pc pkg-config
-file for the build.  See PythonPath (32-bit builds) or PythonPathX64 (x64
+file for the build.  See PythonDir (32-bit builds) or PythonDirX64 (x64
 builds) in atk-version-paths.props to see that they point to the correct paths.
 
 
diff --git a/win32/vs10/atk-gen-src.props b/win32/vs10/atk-gen-src.props
index 8ed0cee..d4287cb 100644
--- a/win32/vs10/atk-gen-src.props
+++ b/win32/vs10/atk-gen-src.props
@@ -7,17 +7,17 @@
     <GenConfigH>if not exist ..\..\config.h copy ..\..\config.h.win32 ..\..\config.h</GenConfigH>
     <GenMarshalSrc>
 cd ..\..\atk
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPath)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header --output=atkmarshal.h
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPath)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list
 if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body --output=atkmarshal.c
 cd $(SolutionDir)
     </GenMarshalSrc>
     <GenMarshalSrcX64>
 cd ..\..\atk
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPathX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header --output=atkmarshal.h
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPathX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list
 if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body --output=atkmarshal.c
 cd $(SolutionDir)
     </GenMarshalSrcX64>
diff --git a/win32/vs10/atk-install.propsin b/win32/vs10/atk-install.propsin
index 81c2dc5..6f71d14 100644
--- a/win32/vs10/atk-install.propsin
+++ b/win32/vs10/atk-install.propsin
@@ -21,8 +21,8 @@ mkdir $(CopyDir)\include\atk-$(ApiVersion)\atk
 mkdir $(CopyDir)\lib\pkgconfig
 copy ..\atk.pc $(CopyDir)\lib\pkgconfig
     </AtkDoInstall>
-    <AtkGenPC>$(PythonPath)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)</AtkGenPC>
-    <AtkGenPCX64>$(PythonPathX64)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)</AtkGenPCX64>
+    <AtkGenPC>$(PythonDir)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)</AtkGenPC>
+    <AtkGenPCX64>$(PythonDirX64)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)</AtkGenPCX64>
     <AtkPCFiles>..\atk.pc</AtkPCFiles>
   </PropertyGroup>
   <ItemGroup>
diff --git a/win32/vs10/atk-version-paths.props.in b/win32/vs10/atk-version-paths.props.in
index 6cdbefa..1347ad2 100644
--- a/win32/vs10/atk-version-paths.props.in
+++ b/win32/vs10/atk-version-paths.props.in
@@ -14,8 +14,12 @@
     <AtkSeparateVSDllSuffix>-1-vs$(VSVer)</AtkSeparateVSDllSuffix>
     <AtkDllPrefix>$(AtkSeparateVSDllPrefix)</AtkDllPrefix>
     <AtkDllSuffix>$(AtkSeparateVSDllSuffix)</AtkDllSuffix>
-    <PythonPath>c:\python34</PythonPath>
-    <PythonPathX64>$(PythonPath).x64</PythonPathX64>
+    <PythonDir Condition="'$(VisualStudioVersion)' == '10.0'">c:\\python34</PythonDir>
+    <PythonDir Condition="'$(VisualStudioVersion)' == '11.0'">c:\\python34</PythonDir>
+    <PythonDir Condition="'$(VisualStudioVersion)' == '12.0'">c:\\python34</PythonDir>
+    <PythonDir Condition="'$(VisualStudioVersion)' == '14.0'">c:\\python36</PythonDir>
+    <PythonDir Condition="'$(VisualStudioVersion)' == '15.0'">c:\\python36</PythonDir>
+    <PythonDirX64>$(PythonDir).x64</PythonDirX64>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>atkversionpathsprops</_PropertySheetDisplayName>
@@ -57,11 +61,11 @@
     <BuildMacro Include="AtkDllSuffix">
       <Value>$(AtkDllSuffix)</Value>
     </BuildMacro>
-    <BuildMacro Include="PythonPath">
-      <Value>$(PythonPath)</Value>
+    <BuildMacro Include="PythonDir">
+      <Value>$(PythonDir)</Value>
     </BuildMacro>
-    <BuildMacro Include="PythonPathX64">
-      <Value>$(PythonPathX64)</Value>
+    <BuildMacro Include="PythonDirX64">
+      <Value>$(PythonDirX64)</Value>
     </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/win32/vs9/README.txt b/win32/vs9/README.txt
index 1798877..6f2cfec 100644
--- a/win32/vs9/README.txt
+++ b/win32/vs9/README.txt
@@ -19,7 +19,7 @@ and ZLib.
 You will also need a Python 2.7.x or 3.x installation, as Python will be
 used to run glib-genmarshal, which was converted into a Python script from
 a compiled C program, in addition to generating the atk.pc pkg-config
-file for the build.  See PythonPath (32-bit builds) or PythonPathX64 (x64
+file for the build.  See PythonDir (32-bit builds) or PythonDirX64 (x64
 builds) in atk-version-paths.vsprops to see that they point to the correct paths.
 
 a) look for all of the dependencies (except GLib*) under
diff --git a/win32/vs9/atk-gen-src.vsprops b/win32/vs9/atk-gen-src.vsprops
index 727811e..aef02e4 100644
--- a/win32/vs9/atk-gen-src.vsprops
+++ b/win32/vs9/atk-gen-src.vsprops
@@ -9,13 +9,13 @@
                Name="GenConfigH"
                Value="if not exist ..\..\config.h copy ..\..\config.h.win32 ..\..\config.h"
        />
-       <UserMacro
+       <UserMacroh
                Name="GenMarshalSrc"
                Value="
 cd ..\..\atk&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPath)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list&#x0D;&#x0A;
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list&#x0D;&#x0A;
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header &gt; atkmarshal.h&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPath)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list&#x0D;&#x0A;
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list&#x0D;&#x0A;
 if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body &gt; atkmarshal.c&#x0D;&#x0A;
 cd $(SolutionDir)&#x0D;&#x0A;
                      "
@@ -24,9 +24,9 @@ cd $(SolutionDir)&#x0D;&#x0A;
                 Name="GenMarshalSrcX64"
                 Value="
 cd ..\..\atk&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPathX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list&#x0D;&#x0A;
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list&#x0D;&#x0A;
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header &gt; atkmarshal.h&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonPathX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list&#x0D;&#x0A;
+if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list&#x0D;&#x0A;
 if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body &gt; atkmarshal.c&#x0D;&#x0A;
 cd $(SolutionDir)&#x0D;&#x0A;
                       "
diff --git a/win32/vs9/atk-install.vspropsin b/win32/vs9/atk-install.vspropsin
index 880dad5..dcb22d4 100644
--- a/win32/vs9/atk-install.vspropsin
+++ b/win32/vs9/atk-install.vspropsin
@@ -25,10 +25,10 @@ copy ..\atk.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
        />
        <UserMacro
                Name="AtkGenPC"
-               Value="$(PythonPath)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)"
+               Value="$(PythonDir)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)"
        />
        <UserMacro
                Name="AtkGenPCX64"
-               Value="$(PythonPathX64)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)"
+               Value="$(PythonDirX64)\python.exe ..\atkpc.py --prefix=$(CopyDir) 
--version=$(AtkMajorVersion).$(AtkMinorVersion).$(AtkMicroVersion)"
        />
 </VisualStudioPropertySheet>
diff --git a/win32/vs9/atk-version-paths.vsprops.in b/win32/vs9/atk-version-paths.vsprops.in
index e916d53..401bd24 100644
--- a/win32/vs9/atk-version-paths.vsprops.in
+++ b/win32/vs9/atk-version-paths.vsprops.in
@@ -59,11 +59,11 @@
                Value="$(AtkSeparateVSDllSuffix)"
        />
        <UserMacro
-               Name="PythonPath"
-               Value="c:\python27"
+               Name="PythonDir"
+               Value="c:\\python27"
        />
        <UserMacro
-               Name="PythonPathX64"
-               Value="$(PythonPath).x64"
+               Name="PythonDirX64"
+               Value="$(PythonDir).x64"
        />
 </VisualStudioPropertySheet>


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