2018-12-27 04:01:15 +01:00
|
|
|
{ lib, fetchurl, buildPythonPackage, python, isPyPy, sip-module ? "sip" }:
|
2009-02-25 17:05:13 +01:00
|
|
|
|
2018-07-01 16:39:07 +02:00
|
|
|
buildPythonPackage rec {
|
2018-12-27 04:01:15 +01:00
|
|
|
pname = sip-module;
|
2020-10-07 11:14:41 +02:00
|
|
|
version = "4.19.24";
|
2017-03-21 13:01:17 +01:00
|
|
|
format = "other";
|
2014-01-08 09:06:08 +01:00
|
|
|
|
2018-07-01 16:39:07 +02:00
|
|
|
disabled = isPyPy;
|
|
|
|
|
2009-02-25 17:05:13 +01:00
|
|
|
src = fetchurl {
|
2019-02-25 15:40:06 +01:00
|
|
|
url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz";
|
2020-10-07 11:14:41 +02:00
|
|
|
sha256 = "1ra15vb5i9gkg2vdvh16cq9x2mmzw1yi3xphxs8q34q1pf83gkgd";
|
2009-02-25 17:05:13 +01:00
|
|
|
};
|
2013-07-04 07:07:02 +02:00
|
|
|
|
2016-08-17 18:35:29 +02:00
|
|
|
configurePhase = ''
|
2014-01-08 09:06:08 +01:00
|
|
|
${python.executable} ./configure.py \
|
2018-12-27 04:01:15 +01:00
|
|
|
--sip-module ${sip-module} \
|
2019-08-03 11:46:44 +02:00
|
|
|
-d $out/${python.sitePackages} \
|
2013-07-04 07:07:02 +02:00
|
|
|
-b $out/bin -e $out/include
|
|
|
|
'';
|
2014-01-08 09:06:08 +01:00
|
|
|
|
2018-12-27 14:10:36 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-08-03 11:46:44 +02:00
|
|
|
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;
|
|
|
|
|
2016-08-31 11:01:16 +02:00
|
|
|
meta = with lib; {
|
2009-09-10 19:00:30 +02:00
|
|
|
description = "Creates C++ bindings for Python modules";
|
2014-01-08 09:06:08 +01:00
|
|
|
homepage = "http://www.riverbankcomputing.co.uk/";
|
2013-07-14 01:08:03 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2017-03-27 19:11:17 +02:00
|
|
|
maintainers = with maintainers; [ lovek323 sander ];
|
2013-07-04 07:07:02 +02:00
|
|
|
platforms = platforms.all;
|
2009-09-10 19:00:30 +02:00
|
|
|
};
|
2009-02-25 17:05:13 +01:00
|
|
|
}
|