at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cmake, 8 nanobind, 9 ninja, 10 pcpp, 11 scikit-build-core, 12 typing-extensions, 13 14 # buildInputs 15 imath, 16 isl, 17 18 # tests 19 pytestCheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "islpy"; 24 version = "2025.2.5"; 25 pyproject = true; 26 27 src = fetchFromGitHub { 28 owner = "inducer"; 29 repo = "islpy"; 30 tag = "v${version}"; 31 hash = "sha256-E3DRj1WpMr79BVFUeJftp1JZafP2+Zn6yyf9ClfdWqI="; 32 }; 33 34 build-system = [ 35 cmake 36 nanobind 37 ninja 38 pcpp 39 scikit-build-core 40 typing-extensions 41 ]; 42 43 buildInputs = [ 44 imath 45 isl 46 ]; 47 48 dontUseCmakeConfigure = true; 49 50 cmakeFlags = [ 51 "-DUSE_SHIPPED_ISL=OFF" 52 "-DUSE_SHIPPED_IMATH=OFF" 53 "-DUSE_BARVINOK=OFF" 54 "-DISL_INC_DIRS:LIST='${lib.getDev isl}/include'" 55 "-DISL_LIB_DIRS:LIST='${lib.getLib isl}/lib'" 56 ]; 57 58 # Force resolving the package from $out to make generated ext files usable by tests 59 preCheck = '' 60 rm -rf islpy 61 ''; 62 63 nativeCheckInputs = [ pytestCheckHook ]; 64 65 pythonImportsCheck = [ "islpy" ]; 66 67 meta = { 68 description = "Python wrapper around isl, an integer set library"; 69 homepage = "https://github.com/inducer/islpy"; 70 changelog = "https://github.com/inducer/islpy/releases/tag/v${version}"; 71 license = lib.licenses.mit; 72 maintainers = with lib.maintainers; [ tomasajt ]; 73 }; 74}