pythonnet: 2.4.0 -> 2.5.2
- No longer broken. - Updated mono dependency to mono5. - Fix / improve packaging.
This commit is contained in:
parent
3165afca11
commit
90e5205085
|
@ -2,8 +2,7 @@
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, fetchNuGet
|
, fetchNuGet
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, python
|
, pytestCheckHook
|
||||||
, pytest
|
|
||||||
, pycparser
|
, pycparser
|
||||||
, psutil
|
, psutil
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -15,29 +14,36 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
UnmanagedExports127 = fetchNuGet {
|
dotnetPkgs = [
|
||||||
baseName = "UnmanagedExports";
|
(fetchNuGet {
|
||||||
version = "1.2.7";
|
baseName = "UnmanagedExports";
|
||||||
sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf";
|
version = "1.2.7";
|
||||||
outputFiles = [ "*" ];
|
sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf";
|
||||||
};
|
outputFiles = [ "*" ];
|
||||||
|
})
|
||||||
NUnit371 = fetchNuGet {
|
(fetchNuGet {
|
||||||
baseName = "NUnit";
|
baseName = "NUnit";
|
||||||
version = "3.7.1";
|
version = "3.12.0";
|
||||||
sha256 = "1yc6dwaam4w2ss1193v735nnl79id78yswmpvmjr1w4bgcbdza4l";
|
sha256 = "1880j2xwavi8f28vxan3hyvdnph4nlh5sbmh285s4lc9l0b7bdk2";
|
||||||
outputFiles = [ "*" ];
|
outputFiles = [ "*" ];
|
||||||
};
|
})
|
||||||
|
(fetchNuGet {
|
||||||
|
baseName = "System.ValueTuple";
|
||||||
|
version = "4.5.0";
|
||||||
|
sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy";
|
||||||
|
outputFiles = [ "*" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pythonnet";
|
pname = "pythonnet";
|
||||||
version = "2.4.0";
|
version = "2.5.2";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "1ach9jic7a9rd3vmc4bphkr9fq01a0qk81f8a7gr9npwzmkqx8x3";
|
sha256 = "1qzdc6jd7i9j7p6bcihnr98y005gv1358xqdr1plpbpnl6078a5p";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -50,7 +56,6 @@ buildPythonPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pytest
|
|
||||||
pycparser
|
pycparser
|
||||||
|
|
||||||
pkg-config
|
pkg-config
|
||||||
|
@ -59,13 +64,15 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
mono
|
mono
|
||||||
|
|
||||||
NUnit371
|
] ++ dotnetPkgs;
|
||||||
UnmanagedExports127
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib
|
glib
|
||||||
mono
|
mono
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
psutil # needed for memory leak tests
|
psutil # needed for memory leak tests
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -73,22 +80,21 @@ buildPythonPackage rec {
|
||||||
rm -rf packages
|
rm -rf packages
|
||||||
mkdir packages
|
mkdir packages
|
||||||
|
|
||||||
ln -s ${NUnit371}/lib/dotnet/NUnit/ packages/NUnit.3.7.1
|
${builtins.concatStringsSep "\n" (
|
||||||
ln -s ${UnmanagedExports127}/lib/dotnet/NUnit/ packages/UnmanagedExports.1.2.7
|
builtins.map (
|
||||||
|
x: ''ln -s ${x}/lib/dotnet/${x.baseName} ./packages/${x.baseName}.${x.version}''
|
||||||
|
) dotnetPkgs)}
|
||||||
|
|
||||||
# Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542
|
# Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542
|
||||||
export TERM=xterm
|
export TERM=xterm
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
${python.interpreter} -m pytest
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = ".Net and Mono integration for Python";
|
description = ".Net and Mono integration for Python";
|
||||||
homepage = "https://pythonnet.github.io";
|
homepage = "https://pythonnet.github.io";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
# <https://github.com/pythonnet/pythonnet/issues/898>
|
||||||
|
badPlatforms = [ "aarch64-linux" ];
|
||||||
maintainers = with maintainers; [ jraygauthier ];
|
maintainers = with maintainers; [ jraygauthier ];
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6674,8 +6674,8 @@ in {
|
||||||
|
|
||||||
pythonnet = callPackage
|
pythonnet = callPackage
|
||||||
../development/python-modules/pythonnet {
|
../development/python-modules/pythonnet {
|
||||||
# `mono >= 4.6` required to prevent crashes encountered with earlier versions.
|
# Using `mono > 5`, tests are failing..
|
||||||
mono = pkgs.mono4;
|
mono = pkgs.mono5;
|
||||||
};
|
};
|
||||||
|
|
||||||
python-nmap = callPackage ../development/python-modules/python-nmap { };
|
python-nmap = callPackage ../development/python-modules/python-nmap { };
|
||||||
|
|
Loading…
Reference in New Issue