diff --git a/.travis.yml b/.travis.yml index 627fd9ebf..3ab0e900f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,16 +4,17 @@ language: python matrix: include: +# --------------------- XPLAT builds ------------------------ - python: 2.7 - env: + env: &xplat-env - BUILD_OPTS=--xplat - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe - addons: + addons: &xplat-addons apt: sources: - sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main key_url: https://packages.microsoft.com/keys/microsoft.asc - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main + - sourceline: deb http://download.mono-project.com/repo/debian trusty/snapshots/5.2.0.224 main key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF packages: - mono-devel @@ -22,124 +23,52 @@ matrix: - dotnet-runtime-2.0.0 - dotnet-sdk-2.0.0 - python: 3.3 - env: - - BUILD_OPTS=--xplat - - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe - addons: - apt: - sources: - - sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main - key_url: https://packages.microsoft.com/keys/microsoft.asc - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main - key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF - packages: - - mono-devel - - ca-certificates-mono - - dotnet-hostfxr-2.0.0 - - dotnet-runtime-2.0.0 - - dotnet-sdk-2.0.0 + env: *xplat-env + addons: *xplat-addons + - python: 3.4 - env: - - BUILD_OPTS=--xplat - - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe - addons: - apt: - sources: - - sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main - key_url: https://packages.microsoft.com/keys/microsoft.asc - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main - key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF - packages: - - mono-devel - - ca-certificates-mono - - dotnet-hostfxr-2.0.0 - - dotnet-runtime-2.0.0 - - dotnet-sdk-2.0.0 + env: *xplat-env + addons: *xplat-addons + - python: 3.5 - env: - - BUILD_OPTS=--xplat - - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe - addons: - apt: - sources: - - sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main - key_url: https://packages.microsoft.com/keys/microsoft.asc - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main - key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF - packages: - - mono-devel - - ca-certificates-mono - - dotnet-hostfxr-2.0.0 - - dotnet-runtime-2.0.0 - - dotnet-sdk-2.0.0 + env: *xplat-env + addons: *xplat-addons + - python: 3.6 - env: - - BUILD_OPTS=--xplat - - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe - addons: - apt: - sources: - - sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main - key_url: https://packages.microsoft.com/keys/microsoft.asc - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main - key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF - packages: - - mono-devel - - ca-certificates-mono - - dotnet-hostfxr-2.0.0 - - dotnet-runtime-2.0.0 - - dotnet-sdk-2.0.0 + env: *xplat-env + addons: *xplat-addons - python: "3.7-dev" - env: - - BUILD_OPTS=--xplat - - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe - addons: - apt: - sources: - - sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main - key_url: https://packages.microsoft.com/keys/microsoft.asc - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main - key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF - packages: - - mono-devel - - ca-certificates-mono - - dotnet-hostfxr-2.0.0 - - dotnet-runtime-2.0.0 - - dotnet-sdk-2.0.0 + env: *xplat-env + addons: *xplat-addons +# --------------------- Classic builds ------------------------ - python: 2.7 - env: + env: &classic-env - BUILD_OPTS= - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + - python: 3.3 - env: - - BUILD_OPTS= - - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + env: *classic-env + - python: 3.4 - env: - - BUILD_OPTS= - - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + env: *classic-env + - python: 3.5 - env: - - BUILD_OPTS= - - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + env: *classic-env + - python: 3.6 - env: - - BUILD_OPTS= - - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + env: *classic-env + - python: "3.7-dev" - env: - - BUILD_OPTS= - - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + env: *classic-env + allow_failures: - python: "3.7-dev" - env: - - BUILD_OPTS= - - NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe + env: *xplat-env + - python: "3.7-dev" - env: - - BUILD_OPTS=--xplat - - NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe + env: *classic-env + env: global: - LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so @@ -150,7 +79,7 @@ env: addons: apt: sources: - - sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main + - sourceline: deb http://download.mono-project.com/repo/debian trusty/snapshots/5.2.0.224 main key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF packages: - mono-devel diff --git a/appveyor.yml b/appveyor.yml index 1953d85d5..8178f173f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,9 +42,6 @@ init: install: - pip install --upgrade -r requirements.txt --quiet - - choco install vswhere -y - - cmd: curl -O https://download.microsoft.com/download/5/6/B/56BFEF92-9045-4414-970C-AB31E0FC07EC/dotnet-runtime-2.0.0-win-x86.exe - - cmd: dotnet-runtime-2.0.0-win-x86.exe /install /quiet /norestart /log install.log # Install OpenCover. Can't put on `packages.config`, not Mono compatible - .\tools\nuget\nuget.exe install OpenCover -OutputDirectory packages -Verbosity quiet diff --git a/setup.py b/setup.py index 24557c137..0fa4cda48 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,12 @@ kits_suffix = os.path.join("bin", ARCH) WIN_SDK_KEYS = ( + RegKey(sdk_name="Windows Kit 10.0", key=kits_root, + value_name="KitsRoot10", suffix=os.path.join("bin", "10.0.16299.0", ARCH)), + + RegKey(sdk_name="Windows Kit 10.0", key=kits_root, + value_name="KitsRoot10", suffix=os.path.join("bin", "10.0.15063.0", ARCH)), + RegKey(sdk_name="Windows Kit 10.0", key=kits_root, value_name="KitsRoot10", suffix=kits_suffix), @@ -324,6 +330,20 @@ def _install_packages(self): def _find_msbuild_tool(self, tool="msbuild.exe", use_windows_sdk=False): """Return full path to one of the Microsoft build tools""" + + # trying to search path with help of vswhere when MSBuild 15.0 and higher installed. + if tool=="msbuild.exe" and use_windows_sdk==False: + try: + basePathes = subprocess.check_output( + ["tools\\vswhere\\vswhere.exe", "-latest", + "-version", "[15.0, 16.0)", + "-requires", "Microsoft.Component.MSBuild", + "-property", "InstallationPath"]).splitlines() + if len(basePathes): + return os.path.join(basePathes[0].decode(sys.stdout.encoding or "utf-8"), "MSBuild", "15.0", "Bin", "MSBuild.exe") + except: + pass # keep trying to search by old method. + # Search in PATH first path = spawn.find_executable(tool) if path: @@ -370,7 +390,7 @@ def _find_msbuild_tool_15(self): """Return full path to one of the Microsoft build tools""" try: basePathes = subprocess.check_output( - ["vswhere", "-latest", + ["tools\\vswhere\\vswhere.exe", "-latest", "-version", "[15.0, 16.0)", "-requires", "Microsoft.Component.MSBuild", "-property", "InstallationPath"]).splitlines() diff --git a/src/clrmodule/clrmodule.15.csproj b/src/clrmodule/clrmodule.15.csproj index e97c6fe1b..2585ffdd2 100644 --- a/src/clrmodule/clrmodule.15.csproj +++ b/src/clrmodule/clrmodule.15.csproj @@ -38,45 +38,38 @@ x64 + + false + full + + + true + pdbonly + + - true $(DefineConstants);PYTHON2;TRACE;DEBUG - full $(DefineConstants);PYTHON2 - true - pdbonly - true $(DefineConstants);PYTHON2;TRACE;DEBUG - full $(DefineConstants);PYTHON2 - true - pdbonly - true $(DefineConstants);PYTHON3;TRACE;DEBUG - full $(DefineConstants);PYTHON3 - true - pdbonly - true $(DefineConstants);PYTHON3;TRACE;DEBUG - full $(DefineConstants);PYTHON3 - true - pdbonly diff --git a/src/console/Console.15.csproj b/src/console/Console.15.csproj index ed9d3d8f9..ec5008036 100644 --- a/src/console/Console.15.csproj +++ b/src/console/Console.15.csproj @@ -38,46 +38,33 @@ x64 - - true - $(DefineConstants);DEBUG;TRACE + + + false full - - $(DefineConstants) + true pdbonly - + true - $(DefineConstants);DEBUG;TRACE + false full - - $(DefineConstants) - true - pdbonly - - + true - $(DefineConstants);DEBUG;TRACE - full - - - $(DefineConstants) true - pdbonly + portable - - true + + $(DefineConstants);DEBUG;TRACE - full - + $(DefineConstants) - true - pdbonly + $(PythonManifest) diff --git a/src/embed_tests/Python.EmbeddingTest.15.csproj b/src/embed_tests/Python.EmbeddingTest.15.csproj index a30e8b3d9..436d2457c 100644 --- a/src/embed_tests/Python.EmbeddingTest.15.csproj +++ b/src/embed_tests/Python.EmbeddingTest.15.csproj @@ -38,45 +38,31 @@ x64 - - true - $(DefineConstants);DEBUG;TRACE + + + false full - - $(DefineConstants); + true pdbonly - + true - $(DefineConstants);DEBUG;TRACE + false full - - $(DefineConstants); - true - pdbonly - - + true - $(DefineConstants);DEBUG;TRACE - full - - - $(DefineConstants); true - pdbonly + portable - - true + + $(DefineConstants);DEBUG;TRACE - full - - $(DefineConstants); - true - pdbonly + + $(DefineConstants) diff --git a/src/runtime/Python.Runtime.15.csproj b/src/runtime/Python.Runtime.15.csproj index 1ca767ca4..18770cc51 100644 --- a/src/runtime/Python.Runtime.15.csproj +++ b/src/runtime/Python.Runtime.15.csproj @@ -32,51 +32,50 @@ $(DefineConstants);NETSTANDARD $(DefineConstants);TRACE;DEBUG $(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\ + $(PYTHONNET_INTEROP_FILE) + + + false + full + + + true + pdbonly + + + true + false + full + + + true + true + portable $(DefineConstants);PYTHON2;PYTHON27;UCS4 - true - pdbonly $(DefineConstants);PYTHON3;PYTHON36;UCS4 - true - pdbonly - true $(DefineConstants);PYTHON2;PYTHON27;UCS4;TRACE;DEBUG - false - full - true $(DefineConstants);PYTHON3;PYTHON36;UCS4;TRACE;DEBUG - false - full $(DefineConstants);PYTHON2;PYTHON27;UCS2 - true - pdbonly $(DefineConstants);PYTHON3;PYTHON36;UCS2 - true - pdbonly - true $(DefineConstants);PYTHON2;PYTHON27;UCS2;TRACE;DEBUG - false - full - true $(DefineConstants);PYTHON3;PYTHON36;UCS2;TRACE;DEBUG - false - full diff --git a/src/testing/Python.Test.15.csproj b/src/testing/Python.Test.15.csproj index a46cafb9d..da20ed2ef 100644 --- a/src/testing/Python.Test.15.csproj +++ b/src/testing/Python.Test.15.csproj @@ -32,46 +32,33 @@ x64 - - true - $(DefineConstants);DEBUG;TRACE + + + false full - - $(DefineConstants) + true pdbonly - + true - $(DefineConstants);DEBUG;TRACE + false full - - $(DefineConstants) - true - pdbonly - - + true - $(DefineConstants);DEBUG;TRACE - full - - - $(DefineConstants) true - pdbonly + portable - - true + + $(DefineConstants);DEBUG;TRACE - full - + $(DefineConstants) - true - pdbonly + diff --git a/tools/vswhere/vswhere.exe b/tools/vswhere/vswhere.exe new file mode 100644 index 000000000..3eb2df009 Binary files /dev/null and b/tools/vswhere/vswhere.exe differ