From 37a4ea597631266c44593db2a365f9df58c8c06e Mon Sep 17 00:00:00 2001 From: Dani Carles Date: Wed, 9 Mar 2016 12:56:01 +0000 Subject: [PATCH] Fix for #180 Update travis CI build to use latest mono and add a call to mono_domain_set_config to solve problems using pythonnet with mod_wsgi. --- .travis.yml | 15 ++++++++------- src/monoclr/pynetinit.c | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31c762455..551befdf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: required language: python python: - 2.6 @@ -6,14 +7,14 @@ python: - 3.4 - 3.5 before_install: - - sudo apt-get install software-properties-common - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" - - sudo apt-get -qq update - - sudo apt-get -qq install mono-devel mono-gmcs mono-xbuild nunit-console - - sudo mozroots --import --machine --sync - - yes | sudo certmgr -ssl -m https://go.microsoft.com - - yes | sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net - - yes | sudo certmgr -ssl -m https://nuget.org + - sudo apt-get install software-properties-common + - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF + - echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list + - echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list + - sudo apt-get update + - sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono nunit-console + install: - pip install six - pip install pycparser diff --git a/src/monoclr/pynetinit.c b/src/monoclr/pynetinit.c index f6487802c..df9d67c9a 100644 --- a/src/monoclr/pynetinit.c +++ b/src/monoclr/pynetinit.c @@ -37,6 +37,7 @@ PyNet_Args* PyNet_Init(int ext) { pn_args->shutdown_name = "Python.Runtime:Shutdown()"; pn_args->domain = mono_jit_init_version(MONO_DOMAIN, MONO_VERSION); + mono_domain_set_config(pn_args->domain, ".", "Python.Runtime.dll.config"); /* * Load the default Mono configuration file, this is needed