at 23.11-beta 1.4 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, lxml 6, numpy 7, openjpeg 8, pytestCheckHook 9, pythonOlder 10, scikit-image 11, setuptools 12}: 13 14buildPythonPackage rec { 15 pname = "glymur"; 16 version = "0.12.5"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "quintusdias"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-9NMSAt5yFRnlCUDP37/ozhDsS8FTdRkfjUz8kQwWzVc="; 26 }; 27 28 nativeBuildInputs = [ 29 setuptools 30 ]; 31 32 propagatedBuildInputs = [ 33 numpy 34 ]; 35 36 nativeCheckInputs = [ 37 lxml 38 pytestCheckHook 39 scikit-image 40 ]; 41 42 postConfigure = '' 43 substituteInPlace glymur/config.py \ 44 --replace "path = read_config_file(libname)" "path = '${openjpeg}/lib/lib' + libname + ${if stdenv.isDarwin then "'.dylib'" else "'.so'"}" 45 ''; 46 47 disabledTestPaths = [ 48 # this test involves glymur's different ways of finding the openjpeg path on 49 # fsh systems by reading an .rc file and such, and is obviated by the patch 50 # in postConfigure 51 "tests/test_config.py" 52 "tests/test_tiff2jp2.py" 53 ]; 54 55 pythonImportsCheck = [ 56 "glymur" 57 ]; 58 59 meta = with lib; { 60 description = "Tools for accessing JPEG2000 files"; 61 homepage = "https://github.com/quintusdias/glymur"; 62 changelog = "https://github.com/quintusdias/glymur/blob/v${version}/CHANGES.txt"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ ]; 65 }; 66}