2023-03-04 12:14:45 +00:00
|
|
|
{ lib, fetchurl, buildPythonPackage, python, isPyPy, pythonAtLeast, sip-module ? "sip" }:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = sip-module;
|
|
|
|
version = "4.19.25";
|
|
|
|
format = "other";
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
disabled = isPyPy || pythonAtLeast "3.11";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz";
|
|
|
|
sha256 = "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk";
|
|
|
|
};
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
${python.executable} ./configure.py \
|
|
|
|
--sip-module ${sip-module} \
|
|
|
|
-d $out/${python.sitePackages} \
|
|
|
|
-b $out/bin -e $out/include
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installCheckPhase = let
|
|
|
|
modules = [
|
|
|
|
sip-module
|
|
|
|
"sipconfig"
|
|
|
|
];
|
|
|
|
imports = lib.concatMapStrings (module: "import ${module};") modules;
|
|
|
|
in ''
|
|
|
|
echo "Checking whether modules can be imported..."
|
|
|
|
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -c "${imports}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Creates C++ bindings for Python modules";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://riverbankcomputing.com/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ lovek323 sander ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|