Skip to content

Commit e26498b

Browse files
authored
Merge branch 'master' into issue-475
2 parents c0c6092 + 19d854c commit e26498b

25 files changed

Lines changed: 219 additions & 353 deletions

.travis.yml

Lines changed: 33 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ language: python
44

55
matrix:
66
include:
7+
# --------------------- XPLAT builds ------------------------
78
- python: 2.7
8-
env:
9+
env: &xplat-env
910
- BUILD_OPTS=--xplat
1011
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
11-
addons:
12+
addons: &xplat-addons
1213
apt:
1314
sources:
1415
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
@@ -22,124 +23,52 @@ matrix:
2223
- dotnet-runtime-2.0.0
2324
- dotnet-sdk-2.0.0
2425
- python: 3.3
25-
env:
26-
- BUILD_OPTS=--xplat
27-
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
28-
addons:
29-
apt:
30-
sources:
31-
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
32-
key_url: https://packages.microsoft.com/keys/microsoft.asc
33-
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
34-
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
35-
packages:
36-
- mono-devel
37-
- ca-certificates-mono
38-
- dotnet-hostfxr-2.0.0
39-
- dotnet-runtime-2.0.0
40-
- dotnet-sdk-2.0.0
26+
env: *xplat-env
27+
addons: *xplat-addons
28+
4129
- python: 3.4
42-
env:
43-
- BUILD_OPTS=--xplat
44-
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
45-
addons:
46-
apt:
47-
sources:
48-
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
49-
key_url: https://packages.microsoft.com/keys/microsoft.asc
50-
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
51-
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
52-
packages:
53-
- mono-devel
54-
- ca-certificates-mono
55-
- dotnet-hostfxr-2.0.0
56-
- dotnet-runtime-2.0.0
57-
- dotnet-sdk-2.0.0
30+
env: *xplat-env
31+
addons: *xplat-addons
32+
5833
- python: 3.5
59-
env:
60-
- BUILD_OPTS=--xplat
61-
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
62-
addons:
63-
apt:
64-
sources:
65-
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
66-
key_url: https://packages.microsoft.com/keys/microsoft.asc
67-
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
68-
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
69-
packages:
70-
- mono-devel
71-
- ca-certificates-mono
72-
- dotnet-hostfxr-2.0.0
73-
- dotnet-runtime-2.0.0
74-
- dotnet-sdk-2.0.0
34+
env: *xplat-env
35+
addons: *xplat-addons
36+
7537
- python: 3.6
76-
env:
77-
- BUILD_OPTS=--xplat
78-
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
79-
addons:
80-
apt:
81-
sources:
82-
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
83-
key_url: https://packages.microsoft.com/keys/microsoft.asc
84-
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
85-
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
86-
packages:
87-
- mono-devel
88-
- ca-certificates-mono
89-
- dotnet-hostfxr-2.0.0
90-
- dotnet-runtime-2.0.0
91-
- dotnet-sdk-2.0.0
38+
env: *xplat-env
39+
addons: *xplat-addons
9240
- python: "3.7-dev"
93-
env:
94-
- BUILD_OPTS=--xplat
95-
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
96-
addons:
97-
apt:
98-
sources:
99-
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
100-
key_url: https://packages.microsoft.com/keys/microsoft.asc
101-
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
102-
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
103-
packages:
104-
- mono-devel
105-
- ca-certificates-mono
106-
- dotnet-hostfxr-2.0.0
107-
- dotnet-runtime-2.0.0
108-
- dotnet-sdk-2.0.0
41+
env: *xplat-env
42+
addons: *xplat-addons
10943

44+
# --------------------- Classic builds ------------------------
11045
- python: 2.7
111-
env:
46+
env: &classic-env
11247
- BUILD_OPTS=
11348
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
49+
11450
- python: 3.3
115-
env:
116-
- BUILD_OPTS=
117-
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
51+
env: *classic-env
52+
11853
- python: 3.4
119-
env:
120-
- BUILD_OPTS=
121-
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
54+
env: *classic-env
55+
12256
- python: 3.5
123-
env:
124-
- BUILD_OPTS=
125-
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
57+
env: *classic-env
58+
12659
- python: 3.6
127-
env:
128-
- BUILD_OPTS=
129-
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
60+
env: *classic-env
61+
13062
- python: "3.7-dev"
131-
env:
132-
- BUILD_OPTS=
133-
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
63+
env: *classic-env
64+
13465
allow_failures:
13566
- python: "3.7-dev"
136-
env:
137-
- BUILD_OPTS=
138-
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
67+
env: *xplat-env
68+
13969
- python: "3.7-dev"
140-
env:
141-
- BUILD_OPTS=--xplat
142-
- NUNIT_PATH=~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe
70+
env: *classic-env
71+
14372
env:
14473
global:
14574
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so

AUTHORS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
- Arvid JB ([@ArvidJB](https://github.com/ArvidJB))
1616
- Bradley Friedman ([@leith-bartrich](https://github.com/leith-bartrich))
17+
- Callum Noble ([@callumnoble](https://github.com/callumnoble))
1718
- Christian Heimes ([@tiran](https://github.com/tiran))
1819
- Christoph Gohlke ([@cgohlke](https://github.com/cgohlke))
1920
- Christopher Pow ([@christopherpow](https://github.com/christopherpow))
@@ -23,7 +24,8 @@
2324
- David Lechner ([@dlech](https://github.com/dlech))
2425
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
2526
- He-chien Tsai ([@t3476](https://github.com/t3476))
26-
- Jeff Reback ([@jreback](https://github.com/jreback))
27+
-   Ivan Cronyn ([@cronan](https://github.com/cronan))
28+
-   Jeff Reback ([@jreback](https://github.com/jreback))
2729
- Joe Frayne ([@jfrayne](https://github.com/jfrayne))
2830
- John Burnett ([@johnburnett](https://github.com/johnburnett))
2931
- Luke Stratman ([@lstratman](https://github.com/lstratman))

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
2929
- Fixed conversion of 'float' and 'double' values (#486)
3030
- Fixed 'clrmethod' for python 2 (#492)
3131
- Fixed double calling of constructor when deriving from .NET class (#495)
32+
- Fixed `clr.GetClrType` when iterating over `System` members (#607)
33+
- Fixed `LockRecursionException` when loading assemblies (#627)
34+
- Fixed errors breaking .NET Remoting on method invoke (#276)
3235

3336

3437
## [2.3.0][] - 2017-03-11

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ from System.Windows.Forms import Form
4444
a `using (Py.GIL()) {/* Your code here */}` block.
4545
- Import python modules using `dynamic mod = Py.Import("mod")`,
4646
then you can call functions as normal, eg `mod.func(args)`.
47-
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` or `mod.func(args, keywordargname=keywordargvalue)`
47+
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` or `mod.func(args, keywordargname: keywordargvalue)`
4848
to apply keyword arguments.
4949
- All python objects should be declared as `dynamic` type.
5050
- Mathematical operations involving python and literal/managed types must

appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ init:
4242

4343
install:
4444
- pip install --upgrade -r requirements.txt --quiet
45-
- choco install vswhere -y
46-
- cmd: curl -O https://download.microsoft.com/download/5/6/B/56BFEF92-9045-4414-970C-AB31E0FC07EC/dotnet-runtime-2.0.0-win-x86.exe
47-
- cmd: dotnet-runtime-2.0.0-win-x86.exe /install /quiet /norestart /log install.log
4845

4946
# Install OpenCover. Can't put on `packages.config`, not Mono compatible
5047
- .\tools\nuget\nuget.exe install OpenCover -OutputDirectory packages -Verbosity quiet

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Requirements for both Travis and AppVeyor
2-
pytest
2+
pytest==3.2.5
33
coverage
44

55
# Coverage upload

setup.py

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
kits_suffix = os.path.join("bin", ARCH)
4141

4242
WIN_SDK_KEYS = (
43+
RegKey(sdk_name="Windows Kit 10.0", key=kits_root,
44+
value_name="KitsRoot10", suffix=os.path.join("bin", "10.0.16299.0", ARCH)),
45+
46+
RegKey(sdk_name="Windows Kit 10.0", key=kits_root,
47+
value_name="KitsRoot10", suffix=os.path.join("bin", "10.0.15063.0", ARCH)),
48+
4349
RegKey(sdk_name="Windows Kit 10.0", key=kits_root,
4450
value_name="KitsRoot10", suffix=kits_suffix),
4551

@@ -259,7 +265,6 @@ def build_extension(self, ext):
259265
subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
260266
if DEVTOOLS == "MsDev15" or DEVTOOLS == "dotnet":
261267
subprocess.check_call(" ".join(cmd + ['"/t:Console_15:publish;Python_EmbeddingTest_15:publish"', "/p:TargetFramework=netcoreapp2.0"]), shell=use_shell)
262-
263268
if DEVTOOLS == "Mono" or DEVTOOLS == "dotnet":
264269
self._build_monoclr()
265270

@@ -275,7 +280,13 @@ def _get_manifest(self, build_dir):
275280
return manifest
276281

277282
def _build_monoclr(self):
278-
mono_libs = _check_output("pkg-config --libs mono-2", shell=True)
283+
try:
284+
mono_libs = _check_output("pkg-config --libs mono-2", shell=True)
285+
except:
286+
if DEVTOOLS == "dotnet":
287+
print("Skipping building monoclr module...")
288+
return
289+
raise
279290
mono_cflags = _check_output("pkg-config --cflags mono-2", shell=True)
280291
glib_libs = _check_output("pkg-config --libs glib-2.0", shell=True)
281292
glib_cflags = _check_output("pkg-config --cflags glib-2.0", shell=True)
@@ -324,6 +335,20 @@ def _install_packages(self):
324335

325336
def _find_msbuild_tool(self, tool="msbuild.exe", use_windows_sdk=False):
326337
"""Return full path to one of the Microsoft build tools"""
338+
339+
# trying to search path with help of vswhere when MSBuild 15.0 and higher installed.
340+
if tool=="msbuild.exe" and use_windows_sdk==False:
341+
try:
342+
basePathes = subprocess.check_output(
343+
["tools\\vswhere\\vswhere.exe", "-latest",
344+
"-version", "[15.0, 16.0)",
345+
"-requires", "Microsoft.Component.MSBuild",
346+
"-property", "InstallationPath"]).splitlines()
347+
if len(basePathes):
348+
return os.path.join(basePathes[0].decode(sys.stdout.encoding or "utf-8"), "MSBuild", "15.0", "Bin", "MSBuild.exe")
349+
except:
350+
pass # keep trying to search by old method.
351+
327352
# Search in PATH first
328353
path = spawn.find_executable(tool)
329354
if path:
@@ -370,7 +395,7 @@ def _find_msbuild_tool_15(self):
370395
"""Return full path to one of the Microsoft build tools"""
371396
try:
372397
basePathes = subprocess.check_output(
373-
["vswhere", "-latest",
398+
["tools\\vswhere\\vswhere.exe", "-latest",
374399
"-version", "[15.0, 16.0)",
375400
"-requires", "Microsoft.Component.MSBuild",
376401
"-property", "InstallationPath"]).splitlines()

src/clrmodule/clrmodule.15.csproj

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,45 +38,38 @@
3838
<PlatformTarget>x64</PlatformTarget>
3939
</PropertyGroup>
4040

41+
<PropertyGroup Condition="$(Configuration.Contains('Debug')) AND '$(TargetFramework)'=='net40'">
42+
<Optimize>false</Optimize>
43+
<DebugType>full</DebugType>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="$(Configuration.Contains('Release')) AND '$(TargetFramework)'=='net40'">
46+
<Optimize>true</Optimize>
47+
<DebugType>pdbonly</DebugType>
48+
</PropertyGroup>
49+
4150
<PropertyGroup Condition=" '$(Configuration)' == 'DebugMono'">
42-
<DebugSymbols>true</DebugSymbols>
4351
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;TRACE;DEBUG</DefineConstants>
44-
<DebugType>full</DebugType>
4552
</PropertyGroup>
4653
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMono'">
4754
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2</DefineConstants>
48-
<Optimize>true</Optimize>
49-
<DebugType>pdbonly</DebugType>
5055
</PropertyGroup>
5156
<PropertyGroup Condition=" '$(Configuration)' == 'DebugWin'">
52-
<DebugSymbols>true</DebugSymbols>
5357
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;TRACE;DEBUG</DefineConstants>
54-
<DebugType>full</DebugType>
5558
</PropertyGroup>
5659
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWin'">
5760
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2</DefineConstants>
58-
<Optimize>true</Optimize>
59-
<DebugType>pdbonly</DebugType>
6061
</PropertyGroup>
6162
<PropertyGroup Condition=" '$(Configuration)' == 'DebugMonoPY3'">
62-
<DebugSymbols>true</DebugSymbols>
6363
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;TRACE;DEBUG</DefineConstants>
64-
<DebugType>full</DebugType>
6564
</PropertyGroup>
6665
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMonoPY3'">
6766
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3</DefineConstants>
68-
<Optimize>true</Optimize>
69-
<DebugType>pdbonly</DebugType>
7067
</PropertyGroup>
7168
<PropertyGroup Condition=" '$(Configuration)' == 'DebugWinPY3'">
72-
<DebugSymbols>true</DebugSymbols>
7369
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;TRACE;DEBUG</DefineConstants>
74-
<DebugType>full</DebugType>
7570
</PropertyGroup>
7671
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWinPY3'">
7772
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3</DefineConstants>
78-
<Optimize>true</Optimize>
79-
<DebugType>pdbonly</DebugType>
8073
</PropertyGroup>
8174

8275
<ItemGroup>

0 commit comments

Comments
 (0)