Merge pull request #308478 from natsukium/htseq/update

python311Packages.htseq: 0.12.4 -> 2.0.4

authored by OTABI Tomoya and committed by GitHub 0204bbde be9b31b7

+61 -11
+61 -11
pkgs/development/python-modules/htseq/default.nix
··· 1 - { lib, buildPythonPackage, fetchFromGitHub, cython, numpy, pysam, matplotlib, python, isPy27, isPy3k }: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + fetchpatch, 6 + swig, 7 + cython, 8 + matplotlib, 9 + numpy, 10 + pandas, 11 + pysam, 12 + setuptools, 13 + pytestCheckHook, 14 + nix-update-script, 15 + }: 2 16 buildPythonPackage rec { 3 - version = "0.12.4"; 4 - format = "setuptools"; 5 17 pname = "htseq"; 18 + version = "2.0.4"; 19 + pyproject = true; 6 20 7 21 src = fetchFromGitHub { 8 22 owner = "htseq"; 9 23 repo = "htseq"; 10 24 rev = "release_${version}"; 11 - sha256 = "0y7vh249sljqjnv81060w4xkdx6f1y5zdqkh38yk926x6v9riijm"; 25 + hash = "sha256-7ocrmuj9LOtPz9XbI5rKGcdE5JbFz/pZh00Nie65XxE="; 12 26 }; 13 27 14 - nativeBuildInputs = [ cython ]; 15 - propagatedBuildInputs = [ numpy pysam matplotlib ]; 28 + patches = [ 29 + # https://github.com/htseq/htseq/pull/84 30 + (fetchpatch { 31 + name = "replace-distutils-with-sysconfig.patch"; 32 + url = "https://github.com/htseq/htseq/commit/f0f1e464ee9aee56f0b44f905e7b3355b0bb8f29.patch"; 33 + hash = "sha256-yDYkXCPy+YFgnk1rnXwCB998aZwVd5nJeejZIgeEzAo="; 34 + }) 35 + ]; 16 36 17 - checkPhase = lib.optionalString isPy27 '' 18 - ${python.interpreter} python2/test/test_general.py 19 - '' + lib.optionalString isPy3k '' 20 - ${python.interpreter} python3/test/test_general.py 37 + nativeBuildInputs = [ swig ]; 38 + 39 + build-system = [ 40 + cython 41 + numpy 42 + pysam 43 + setuptools 44 + ]; 45 + 46 + dependencies = [ 47 + numpy 48 + pysam 49 + ]; 50 + 51 + optional-dependencies = { 52 + htseq-qa = [ matplotlib ]; 53 + }; 54 + 55 + pythonImportsCheck = [ "HTSeq" ]; 56 + 57 + nativeCheckInputs = [ 58 + pandas 59 + pytestCheckHook 60 + ] ++ optional-dependencies.htseq-qa; 61 + 62 + preCheck = '' 63 + rm -r src HTSeq 64 + export PATH=$out/bin:$PATH 21 65 ''; 22 66 67 + passthru.updateScript = nix-update-script { 68 + extraArgs = [ 69 + "--version-regex" 70 + "release_(.+)" 71 + ]; 72 + }; 73 + 23 74 meta = with lib; { 24 75 homepage = "https://htseq.readthedocs.io/"; 25 76 description = "A framework to work with high-throughput sequencing data"; 26 77 maintainers = with maintainers; [ unode ]; 27 - platforms = platforms.unix; 28 78 }; 29 79 }