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