at 24.11-pre 60 lines 1.4 kB view raw
1{ 2 lib, 3 fetchurl, 4 fetchpatch, 5 buildPythonPackage, 6 python, 7 isPyPy, 8 pythonAtLeast, 9 sip-module ? "sip", 10}: 11 12buildPythonPackage rec { 13 pname = sip-module; 14 version = "4.19.25"; 15 format = "other"; 16 17 # relies on distutils 18 disabled = isPyPy || pythonAtLeast "3.12"; 19 20 src = fetchurl { 21 url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz"; 22 sha256 = "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"; 23 }; 24 25 patches = lib.optionals (pythonAtLeast "3.11") [ 26 (fetchpatch { 27 name = "sip-4-python3-11.patch"; 28 url = "https://aur.archlinux.org/cgit/aur.git/plain/python3-11.patch?h=sip4&id=67b5907227e68845cdfafcf050fedb89ed653585"; 29 sha256 = "sha256-cmuz2y5+T8EM/h03G2oboSnnOwrUjVKt2TUQaC9YAdE="; 30 }) 31 ]; 32 33 configurePhase = '' 34 ${python.executable} ./configure.py \ 35 --sip-module ${sip-module} \ 36 -d $out/${python.sitePackages} \ 37 -b $out/bin -e $out/include 38 ''; 39 40 enableParallelBuilding = true; 41 42 pythonImportsCheck = [ 43 sip-module 44 "sipconfig" 45 ]; 46 47 doCheck = true; 48 49 meta = with lib; { 50 description = "Creates C++ bindings for Python modules"; 51 mainProgram = "sip"; 52 homepage = "https://riverbankcomputing.com/"; 53 license = licenses.gpl2Plus; 54 maintainers = with maintainers; [ 55 lovek323 56 sander 57 ]; 58 platforms = platforms.all; 59 }; 60}