Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revert "Rebase to pythonnet master" #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 10 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ matrix:
- dotnet-hostfxr-2.0.0
- dotnet-runtime-2.0.0
- dotnet-sdk-2.0.0

- python: 3.4
env: *xplat-env
addons: *xplat-addons
Expand All @@ -34,24 +33,9 @@ matrix:
- python: 3.6
env: *xplat-env
addons: *xplat-addons

- python: 3.7
- python: "3.7-dev"
env: *xplat-env
dist: xenial
sudo: true
addons: &xplat-addons-xenial
apt:
sources:
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main
key_url: https://packages.microsoft.com/keys/microsoft.asc
- sourceline: deb https://download.mono-project.com/repo/ubuntu stable-xenial 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
addons: *xplat-addons

# --------------------- Classic builds ------------------------
- python: 2.7
Expand All @@ -68,18 +52,15 @@ matrix:
- python: 3.6
env: *classic-env

- python: 3.7
- python: "3.7-dev"
env: *classic-env

allow_failures:
- python: "3.7-dev"
env: *xplat-env

- python: "3.7-dev"
env: *classic-env
dist: xenial
sudo: true
addons:
apt:
sources:
- sourceline: deb http://download.mono-project.com/repo/ubuntu xenial main
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
packages:
- mono-devel
- ca-certificates-mono

env:
global:
Expand Down
5 changes: 0 additions & 5 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

- Alexandre Catarino([@AlexCatarino](https://github.com/AlexCatarino))
- Arvid JB ([@ArvidJB](https://github.com/ArvidJB))
- Benoît Hudson ([@benoithudson](https://github.com/benoithudson))
- Bradley Friedman ([@leith-bartrich](https://github.com/leith-bartrich))
- Callum Noble ([@callumnoble](https://github.com/callumnoble))
- Christian Heimes ([@tiran](https://github.com/tiran))
Expand All @@ -23,12 +22,10 @@
- Daniel Fernandez ([@fdanny](https://github.com/fdanny))
- Daniel Santana ([@dgsantana](https://github.com/dgsantana))
- Dave Hirschfeld ([@dhirschfeld](https://github.com/dhirschfeld))
- David Lassonde ([@lassond](https://github.com/lassond))
- David Lechner ([@dlech](https://github.com/dlech))
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
- He-chien Tsai ([@t3476](https://github.com/t3476))
-   Ivan Cronyn ([@cronan](https://github.com/cronan))
- Jan Krivanek ([@jakrivan](https://github.com/jakrivan))
-   Jeff Reback ([@jreback](https://github.com/jreback))
- Joe Frayne ([@jfrayne](https://github.com/jfrayne))
- John Burnett ([@johnburnett](https://github.com/johnburnett))
Expand All @@ -42,8 +39,6 @@
- Sam Winstanley ([@swinstanley](https://github.com/swinstanley))
- Sean Freitag ([@cowboygneox](https://github.com/cowboygneox))
- Serge Weinstock ([@sweinst](https://github.com/sweinst))
- Simon Mourier ([@smourier](https://github.com/smourier))
- Viktoria Kovescses ([@vkovec](https://github.com/vkovec))
- Ville M. Vainio ([@vivainio](https://github.com/vivainio))
- Virgil Dupras ([@hsoft](https://github.com/hsoft))
- Wenguang Yang ([@yagweb](https://github.com/yagweb))
Expand Down
20 changes: 0 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,23 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
## [unreleased][]

### Added

- Added support for embedding python into dotnet core 2.0 (NetStandard 2.0)
- Added new build system (pythonnet.15.sln) based on dotnetcore-sdk/xplat(crossplatform msbuild).
Currently there two side-by-side build systems that produces the same output (net40) from the same sources.
After a some transition time, current (mono/ msbuild 14.0) build system will be removed.
- NUnit upgraded to 3.7 (eliminates travis-ci random bug)
- Added C# `PythonEngine.AddShutdownHandler` to help client code clean up on shutdown.
- Added `clr.GetClrType` ([#432][i432])([#433][p433])
- Allowed passing `None` for nullable args ([#460][p460])
- Added keyword arguments based on C# syntax for calling CPython methods ([#461][p461])
- Catches exceptions thrown in C# iterators (yield returns) and rethrows them in python ([#475][i475])([#693][p693])
- Implemented GetDynamicMemberNames() for PyObject to allow dynamic object members to be visible in the debugger ([#443][i443])([#690][p690])
- Incorporated reference-style links to issues and pull requests in the CHANGELOG ([#608][i608])
- Added detailed comments about aproaches and dangers to handle multi-app-domains ([#625][p625])
- Python 3.7 support, builds and testing added. Defaults changed from Python 3.6 to 3.7 ([#698][p698])

### Changed

- Reattach python exception traceback information (#545)
- PythonEngine.Intialize will now call `Py_InitializeEx` with a default value of 0, so signals will not be configured by default on embedding. This is different from the previous behaviour, where `Py_Initialize` was called instead, which sets initSigs to 1. ([#449][i449])

### Fixed

- Fixed secondary PythonEngine.Initialize call, all sensitive static variables now reseted.
This is a hidden bug. Once python cleaning up enough memory, objects from previous engine run becomes corrupted. ([#534][p534])
- Fixed Visual Studio 2017 compat ([#434][i434]) for setup.py
- Fixed crashes when integrating pythonnet in Unity3d ([#714][i714]),
related to unloading the Application Domain
- Fixed interop methods with Py_ssize_t. NetCoreApp 2.0 is more sensitive than net40 and requires this fix. ([#531][p531])
- Fixed crash on exit of the Python interpreter if a python class
derived from a .NET class has a `__namespace__` or `__assembly__`
attribute ([#481][i481])
Expand All @@ -48,8 +36,6 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
- Fixed errors breaking .NET Remoting on method invoke ([#276][i276])
- Fixed PyObject.GetHashCode ([#676][i676])
- Fix memory leaks due to spurious handle incrementation ([#691][i691])
- Fix spurious assembly loading exceptions from private types ([#703][i703])
- Fix inheritance of non-abstract base methods ([#755][i755])


## [2.3.0][] - 2017-03-11
Expand Down Expand Up @@ -607,7 +593,6 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].

[1.0.0]: https://github.com/pythonnet/pythonnet/releases/tag/1.0

[i714]: https://github.com/pythonnet/pythonnet/issues/714
[i608]: https://github.com/pythonnet/pythonnet/issues/608
[i443]: https://github.com/pythonnet/pythonnet/issues/443
[p690]: https://github.com/pythonnet/pythonnet/pull/690
Expand Down Expand Up @@ -698,9 +683,4 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
[p225]: https://github.com/pythonnet/pythonnet/pull/225
[p78]: https://github.com/pythonnet/pythonnet/pull/78
[p163]: https://github.com/pythonnet/pythonnet/pull/163
[p625]: https://github.com/pythonnet/pythonnet/pull/625
[i131]: https://github.com/pythonnet/pythonnet/issues/131
[p531]: https://github.com/pythonnet/pythonnet/pull/531
[i755]: https://github.com/pythonnet/pythonnet/pull/755
[p534]: https://github.com/pythonnet/pythonnet/pull/534
[i449]: https://github.com/pythonnet/pythonnet/issues/449
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="dot-net MyGet Feed" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" protocolVersion="3"/>
Expand Down
9 changes: 0 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,10 @@ environment:
BUILD_OPTS: --xplat
- PYTHON_VERSION: 3.6
BUILD_OPTS: --xplat
- PYTHON_VERSION: 3.7
BUILD_OPTS: --xplat
- PYTHON_VERSION: 2.7
- PYTHON_VERSION: 3.4
- PYTHON_VERSION: 3.5
- PYTHON_VERSION: 3.6
- PYTHON_VERSION: 3.7

matrix:
allow_failures:
- PYTHON_VERSION: 3.4
BUILD_OPTS: --xplat
- PYTHON_VERSION: 3.4

init:
# Update Environment Variables based on matrix/platform
Expand Down
17 changes: 5 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Allow config/verbosity to be set from cli
# http://stackoverflow.com/a/4792601/5208670
CONFIG = "Release" # Release or Debug
VERBOSITY = "normal" # quiet, minimal, normal, detailed, diagnostic
VERBOSITY = "minimal" # quiet, minimal, normal, detailed, diagnostic

is_64bits = sys.maxsize > 2**32
DEVTOOLS = "MsDev" if sys.platform == "win32" else "Mono"
Expand Down Expand Up @@ -329,16 +329,9 @@ def _install_packages(self):
self.debug_print("Updating NuGet: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)

try:
# msbuild=14 is mainly for Mono issues
cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages".format(nuget)
self.debug_print("Installing packages: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)
except:
# when only VS 2017 is installed do not specify msbuild version
cmd = "{0} restore pythonnet.sln -o packages".format(nuget)
self.debug_print("Installing packages: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)
cmd = "{0} restore pythonnet.sln -o packages".format(nuget)
self.debug_print("Installing packages: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)

def _find_msbuild_tool(self, tool="msbuild.exe", use_windows_sdk=False):
"""Return full path to one of the Microsoft build tools"""
Expand Down Expand Up @@ -523,10 +516,10 @@ def run(self):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
Expand Down
21 changes: 0 additions & 21 deletions src/embed_tests/GlobalTestsSetup.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/embed_tests/Python.EmbeddingTest.15.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<BaseDefineConstants>XPLAT</BaseDefineConstants>
<DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(DefineConstants);NETCOREAPP</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)'=='netstandard2.0'">$(DefineConstants);NETSTANDARD</DefineConstants>
<DefineConstants Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(CustomDefineConstants)' != '' AND $(Configuration.Contains('Debug'))">$(DefineConstants);TRACE;DEBUG</DefineConstants>
<FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride>
</PropertyGroup>
Expand Down
7 changes: 2 additions & 5 deletions src/embed_tests/Python.EmbeddingTest.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -86,7 +86,6 @@
<Compile Include="pyrunstring.cs" />
<Compile Include="TestConverter.cs" />
<Compile Include="TestCustomMarshal.cs" />
<Compile Include="TestDomainReload.cs" />
<Compile Include="TestExample.cs" />
<Compile Include="TestPyAnsiString.cs" />
<Compile Include="TestPyFloat.cs" />
Expand All @@ -104,8 +103,6 @@
<Compile Include="TestPyWith.cs" />
<Compile Include="TestRuntime.cs" />
<Compile Include="TestPyScope.cs" />
<Compile Include="TestTypeManager.cs" />
<Compile Include="GlobalTestsSetup.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\runtime\Python.Runtime.csproj">
Expand All @@ -125,4 +122,4 @@
<Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
<!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /-->
</Target>
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/embed_tests/TestConverter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using NUnit.Framework;
using NUnit.Framework;
using Python.Runtime;

namespace Python.EmbeddingTest
Expand Down
Loading