Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pysam: 0.15.3 -> 0.15.4 (and disabling tests) #80625

Merged
merged 1 commit into from Feb 21, 2020

Conversation

unode
Copy link
Member

@unode unode commented Feb 20, 2020

This is a reopen of #80360

@unode
Copy link
Member Author

unode commented Feb 20, 2020

@ofborg build python37Packages.pysam

@unode unode changed the title pysam: 0.15.3 -> 0.15.4 (patching a failing test) pysam: 0.15.3 -> 0.15.4 (and disabling tests) Feb 20, 2020
@unode
Copy link
Member Author

unode commented Feb 20, 2020

Tests have been disabled due to upstream test data incompatibilities with samtools 1.10.
See related issue: #79548 for additional discussion as well as pysam-developers/pysam#890

Tests are to be re-enabled once upstream issues are fixed.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried my hand at this as well, do you mind incorporating some of my adjustments (mostly the pythonImportsCheck and meta)

{ lib
, buildPythonPackage
, fetchFromGitHub
, bzip2
, bcftools
, curl
, cython
, htslib
, lzma
, pytest
, samtools
, zlib
}:

buildPythonPackage rec {
  pname   = "pysam";
  version = "0.15.4";

  # Fetching from GitHub instead of PyPi cause the 0.13 src release on PyPi is
  # missing some files which cause test failures.
  # Tracked at: https://github.com/pysam-developers/pysam/issues/616
  src = fetchFromGitHub {
    owner = "pysam-developers";
    repo = "pysam";
    rev = "v${version}";
    sha256 = "04w6h6mv6lsr74hj9gy4r2laifcbhgl2bjcr4r1l9r73xdd45mdy";
  };

  nativeBuildInputs = [ samtools ];
  buildInputs = [ bzip2 curl cython lzma zlib ];

  checkInputs = [ pytest bcftools htslib ];
  checkPhase = "py.test";

  # tests require samtools<=1.9
  doCheck = false;
  preCheck = ''
    export HOME=$(mktemp -d)
    make -C tests/pysam_data
    make -C tests/cbcf_data
  '';

  pythonImportsCheck = [
    "pysam"
    "pysam.bcftools"
    "pysam.libcutils"
    "pysam.libcvcf"
  ];

  meta = with lib; {
    description = "A python module for reading, manipulating and writing genome data sets";
    homepage = "https://pysam.readthedocs.io/";
    maintainers = with maintainers; [ unode ];
    license = licenses.mit;
    platforms = [ "i686-linux" "x86_64-linux" ];
  };
}

Also disable tests until upstream test data issues are resolved.
See link in comment in code for more information.
@unode
Copy link
Member Author

unode commented Feb 21, 2020

@jonringer Thanks. Included your recipe.

@infinisil infinisil merged commit 69c0de2 into NixOS:master Feb 21, 2020
@infinisil
Copy link
Member

Also backported to 20.03 in 07f20d0, which is fine since this is strictly a bugfix release: https://github.com/pysam-developers/pysam/releases/tag/v0.15.4

@unode unode deleted the pysam-0.15.4 branch February 21, 2020 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants