python310Packages.pysam: 0.20.0 -> 0.21.0
Bumped version and changed the test suite to use pytestCheckHook. Also enabled previously disabled tests.
This commit is contained in:
parent
1780cbef72
commit
880ef65c44
|
@ -8,14 +8,14 @@
|
||||||
, htslib
|
, htslib
|
||||||
, libdeflate
|
, libdeflate
|
||||||
, xz
|
, xz
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, samtools
|
, samtools
|
||||||
, zlib
|
, zlib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pysam";
|
pname = "pysam";
|
||||||
version = "0.20.0";
|
version = "0.21.0";
|
||||||
|
|
||||||
# Fetching from GitHub instead of PyPi cause the 0.13 src release on PyPi is
|
# Fetching from GitHub instead of PyPi cause the 0.13 src release on PyPi is
|
||||||
# missing some files which cause test failures.
|
# missing some files which cause test failures.
|
||||||
|
@ -24,19 +24,21 @@ buildPythonPackage rec {
|
||||||
owner = "pysam-developers";
|
owner = "pysam-developers";
|
||||||
repo = "pysam";
|
repo = "pysam";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-7yEZJ+iIw4qOxsanlKQlqt1bfi8MvyYjGJWiVDmXBrc=";
|
hash = "sha256-C4/AJwcUyLoUEUEnsATLHJb5F8mltP8X2XfktYu0OTo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ samtools ];
|
nativeBuildInputs = [ samtools ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
bzip2
|
bzip2
|
||||||
curl
|
curl
|
||||||
cython
|
|
||||||
libdeflate
|
libdeflate
|
||||||
xz
|
xz
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ cython ];
|
||||||
|
|
||||||
# Use nixpkgs' htslib instead of the bundled one
|
# Use nixpkgs' htslib instead of the bundled one
|
||||||
# See https://pysam.readthedocs.io/en/latest/installation.html#external
|
# See https://pysam.readthedocs.io/en/latest/installation.html#external
|
||||||
# NOTE that htslib should be version compatible with pysam
|
# NOTE that htslib should be version compatible with pysam
|
||||||
|
@ -47,53 +49,17 @@ buildPythonPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytest
|
pytestCheckHook
|
||||||
bcftools
|
bcftools
|
||||||
htslib
|
htslib
|
||||||
];
|
];
|
||||||
|
|
||||||
# See https://github.com/NixOS/nixpkgs/pull/100823 for why we aren't using
|
preCheck = ''
|
||||||
# disabledTests and pytestFlagsArray through pytestCheckHook
|
export HOME=$TMPDIR
|
||||||
checkPhase = ''
|
|
||||||
# Needed to avoid /homeless-shelter error
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
|
|
||||||
# To avoid API incompatibilities, these should ideally show the same version
|
|
||||||
echo "> samtools --version"
|
|
||||||
samtools --version
|
|
||||||
echo "> htsfile --version"
|
|
||||||
htsfile --version
|
|
||||||
echo "> bcftools --version"
|
|
||||||
bcftools --version
|
|
||||||
|
|
||||||
# Create auxiliary test data
|
|
||||||
make -C tests/pysam_data
|
make -C tests/pysam_data
|
||||||
make -C tests/cbcf_data
|
make -C tests/cbcf_data
|
||||||
|
make -C tests/tabix_data
|
||||||
# Delete pysam folder in current directory to avoid importing it during testing
|
|
||||||
rm -rf pysam
|
rm -rf pysam
|
||||||
|
|
||||||
# Deselect tests that are known to fail due to upstream issues
|
|
||||||
# See https://github.com/pysam-developers/pysam/issues/961
|
|
||||||
py.test \
|
|
||||||
--deselect tests/AlignmentFileHeader_test.py::TestHeaderBAM::test_dictionary_access_works \
|
|
||||||
--deselect tests/AlignmentFileHeader_test.py::TestHeaderBAM::test_header_content_is_as_expected \
|
|
||||||
--deselect tests/AlignmentFileHeader_test.py::TestHeaderCRAM::test_dictionary_access_works \
|
|
||||||
--deselect tests/AlignmentFileHeader_test.py::TestHeaderCRAM::test_header_content_is_as_expected \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestDeNovoConstruction::testBAMWholeFile \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestEmptyHeader::testEmptyHeader \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestHeaderWithProgramOptions::testHeader \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2BAM \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2CRAM \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2SAM \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testFetchFromClosedFileObject \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testOpenFromFilename \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testSAM2BAM \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIO::testWriteUncompressedBAMFile \
|
|
||||||
--deselect tests/AlignmentFile_test.py::TestIteratorRowAllBAM::testIterate \
|
|
||||||
--deselect tests/StreamFiledescriptors_test.py::StreamTest::test_text_processing \
|
|
||||||
--deselect tests/compile_test.py::BAMTest::testCount \
|
|
||||||
tests/
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
|
|
Loading…
Reference in a new issue