diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /sci-biology/pysam | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'sci-biology/pysam')
-rw-r--r-- | sci-biology/pysam/Manifest | 6 | ||||
-rw-r--r-- | sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch | 63 | ||||
-rw-r--r-- | sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch | 37 | ||||
-rw-r--r-- | sci-biology/pysam/pysam-0.16.0.1.ebuild (renamed from sci-biology/pysam/pysam-0.12.0.1.ebuild) | 37 |
4 files changed, 65 insertions, 78 deletions
diff --git a/sci-biology/pysam/Manifest b/sci-biology/pysam/Manifest index 7f96ff719811..b61c521c5275 100644 --- a/sci-biology/pysam/Manifest +++ b/sci-biology/pysam/Manifest @@ -1,4 +1,4 @@ -AUX pysam-0.12-fix-buildsystem.patch 2356 BLAKE2B 95542f99b411a00eeaa24836cb7489bf2bbf690d804669f69f6f1a8c07f66d9c6ef34624eb511036cd36b1268b49959d38db497cb557e9cc40f3a35b2d349f4d SHA512 24c5c521ddd2e8a88a713c2cab2aedb0cd9a589e2ae87696a60815f9714e2b222a5e0824c5ac293f9023f6f772a599256a5c07228b5a2df40b62a1bf7616c84a -DIST pysam-0.12.0.1.tar.gz 2672020 BLAKE2B 4bc6330405724f7b1126da91ba3338687f4dd17f015895f42b971f22ffbb6c32eda65e2667035a4cc830c0370b34d95d3aa6ae0f026b2b3276af1fd6841eed28 SHA512 31460ca98ad2ac5489905ffce76bfbb5bf4a295159f3cc8e088c78dcfbfc34b30d6f7871fd1454de01da98f82b7438ac2aca678a771d7b97ae0029a418f29f1d -EBUILD pysam-0.12.0.1.ebuild 1182 BLAKE2B 11c3a036ca7c6560a6316963ea6133708d36cce2d0f21a1e327180d303406ae23ad021ba04024191eda1687ef538f41c0bfe34bbed742bc85f9aeb12b38dc6da SHA512 fd71cf196e68f640343e2b43e3bb8b5355462f6816a1eb0e7755d188435c567ce53209f6f2599a84e5052d26b4747038c7a4b5a2e9b916c117f388ca369a3919 +AUX pysam-0.16.0.1-fix-tests.patch 1128 BLAKE2B 8e395496c23186b29622b8e87369f910326724b70b63f3eccfd6d4b6cea86abf8b34a712a931f205711e2c5a6e76c9572a93aa9bd994f915312c55dcc888da52 SHA512 e725143c72d04fc0e2e37e607e6d9b85b4c883bcc5a530ff3c92e3bbd45d7d7fb09c315766a19254bea2a19a2d00a5f64220094a4e9b1090e412b26ea489b530 +DIST pysam-0.16.0.1.tar.gz 3294073 BLAKE2B 8df1c9b061b0d4b3962ff4b0e30f1589e02d7df41ce362bff861596d3599bf800bb16b2fa4de326fc07102dc7801b48c6b821e5d47e694a3536bec2c5b1cfece SHA512 5cebb9f3bc8dc6186a629e91423a3c8cb802af6529b943fcd880e056661ec6ee2a00de789cf144c9e40b9d1ef2459c0e06ce27a1b9eab8e2875d2087f275af28 +EBUILD pysam-0.16.0.1.ebuild 1393 BLAKE2B a124ddf7b18e31a89d3fe0d47c7f938d5edfe65938bf0360de209cfa7545474f4be780b7a9e8b4c73fa4cd9282ac9176d8289a34805e062176dbacf3405f33d7 SHA512 b24b2c7d9d764a2e451f4f1c00a20ccc203079e17c238f909b5afb5c6d0a26303822ef54920209f22bf9ba08b3a8a27ff7c052d8bf571a14baca511524a28cdc MISC metadata.xml 410 BLAKE2B ed86e3ffe38a306e581762625b37cf6596dc2a2ba404406ab12f681d5b48529764e281d40411bedbdf6016bc57d02adb705e8c8703b8120cf89b4961f75bed67 SHA512 38bcd511561b2466ef5d39473a6d1a838af0aff6eeb520307331fe0fc3177be3062fa0be39f48a333bb8e31841115cafd9dfb80a5985c316c9b8df1609f00810 diff --git a/sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch b/sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch deleted file mode 100644 index 8b323a63fba5..000000000000 --- a/sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch +++ /dev/null @@ -1,63 +0,0 @@ -The build system is not designed with partial out-of-source -builds in mind. This is evident by using relative includes -such as '-Isamtools' instead of proper relative or absolute -paths. - -Bug: https://bugs.gentoo.org/show_bug.cgi?id=629670 - ---- a/setup.py -+++ b/setup.py -@@ -359,6 +359,8 @@ - - define_macros = [] - -+samtools_include_dirs = [os.path.abspath("samtools")] -+ - chtslib = Extension( - "pysam.libchtslib", - [source_pattern % "htslib", -@@ -385,7 +387,7 @@ - htslib_sources + - os_c_files, - library_dirs=htslib_library_dirs, -- include_dirs=["pysam", "samtools", "."] + include_os + htslib_include_dirs, -+ include_dirs=["pysam", "."] + samtools_include_dirs + include_os + htslib_include_dirs, - libraries=external_htslib_libraries + internal_htslib_libraries, - language="c", - extra_compile_args=extra_compile_args, -@@ -404,7 +406,7 @@ - htslib_sources + - os_c_files, - library_dirs=htslib_library_dirs, -- include_dirs=["pysam", "samtools"] + include_os + htslib_include_dirs, -+ include_dirs=["pysam"] + samtools_include_dirs + include_os + htslib_include_dirs, - libraries=external_htslib_libraries + internal_htslib_libraries, - language="c", - extra_compile_args=extra_compile_args, -@@ -423,7 +425,7 @@ - htslib_sources + - os_c_files, - library_dirs=htslib_library_dirs, -- include_dirs=["pysam", "samtools", "."] + include_os + htslib_include_dirs, -+ include_dirs=["pysam", "."] + samtools_include_dirs + include_os + htslib_include_dirs, - libraries=external_htslib_libraries + internal_htslib_libraries, - language="c", - extra_compile_args=extra_compile_args, -@@ -467,7 +469,7 @@ - htslib_sources + - os_c_files, - library_dirs=["pysam"] + htslib_library_dirs, -- include_dirs=["samtools", "pysam", "."] + -+ include_dirs=["pysam", "."] + samtools_include_dirs + - include_os + htslib_include_dirs, - libraries=external_htslib_libraries + internal_htslib_libraries, - language="c", -@@ -482,7 +484,7 @@ - htslib_sources + - os_c_files, - library_dirs=["pysam"] + htslib_library_dirs, -- include_dirs=["bcftools", "pysam", "."] + -+ include_dirs=["bcftools", "pysam", "."] + samtools_include_dirs + - include_os + htslib_include_dirs, - libraries=external_htslib_libraries + internal_htslib_libraries, - language="c", diff --git a/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch b/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch new file mode 100644 index 000000000000..9d269878e651 --- /dev/null +++ b/sci-biology/pysam/files/pysam-0.16.0.1-fix-tests.patch @@ -0,0 +1,37 @@ +--- a/tests/pysam_data/Makefile ++++ b/tests/pysam_data/Makefile +@@ -3,7 +3,7 @@ + BAI=$(BAM:%.bam=%.bam.bai) + CRAM=ex1.cram ex2.cram ex3.cram + CRAI=$(CRAM:%.cram=%.cram.crai) +-NO_PG:=$(findstring --no-PG,$(shell samtools view)) ++NO_PG:=--no-PG + + # ex2.bam - bam file without index + +--- a/tests/tabix_test.py ++++ b/tests/tabix_test.py +@@ -14,6 +14,7 @@ + import subprocess + import glob + import re ++import pytest + from TestUtils import checkBinaryEqual, checkGZBinaryEqual, check_url, \ + load_and_convert, TABIX_DATADIR, get_temp_filename + +@@ -1014,6 +1015,7 @@ + globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) + + ++@pytest.mark.skip(reason="requires internet connectivity") + class TestRemoteFileHTTP(unittest.TestCase): + + url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" +@@ -1053,6 +1055,7 @@ + self.assertEqual(list(self.local_file.header), []) + + ++@pytest.mark.skip(reason="requires internet connectivity") + class TestRemoteFileHTTPWithHeader(TestRemoteFileHTTP): + + url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example_comments.gtf.gz" diff --git a/sci-biology/pysam/pysam-0.12.0.1.ebuild b/sci-biology/pysam/pysam-0.16.0.1.ebuild index e7567f3501bf..acc0cb99892f 100644 --- a/sci-biology/pysam/pysam-0.12.0.1.ebuild +++ b/sci-biology/pysam/pysam-0.16.0.1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -PYTHON_COMPAT=( python3_6 ) +PYTHON_COMPAT=( python3_{6..9} ) inherit distutils-r1 @@ -11,18 +11,25 @@ DESCRIPTION="Python interface for the SAM/BAM sequence alignment and mapping for HOMEPAGE=" https://github.com/pysam-developers/pysam https://pypi.org/project/pysam/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/pysam-developers/pysam/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" -RDEPEND="=sci-libs/htslib-1.5*:=" +RDEPEND="=sci-libs/htslib-1.10*:=" DEPEND="${RDEPEND} dev-python/cython[${PYTHON_USEDEP}] dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND=" + test? ( + =sci-biology/bcftools-1.10* + =sci-biology/samtools-1.10* + )" -PATCHES=( "${FILESDIR}"/${PN}-0.12-fix-buildsystem.patch ) +distutils_enable_tests pytest + +DISTUTILS_IN_SOURCE_BUILD=1 python_prepare_all() { # unbundle htslib @@ -31,17 +38,23 @@ python_prepare_all() { export HTSLIB_LIBRARY_DIR="${EPREFIX}"/usr/$(get_libdir) rm -r htslib || die - # prevent setup.py from adding RPATHs - sed -e "/ext\.extra_link_args += \['-Wl,-rpath,\$ORIGIN'\]/d" \ - -i cy_build.py || die + # prevent setup.py from adding RPATHs (except $ORIGIN) sed -e '/runtime_library_dirs=htslib_library_dirs/d' \ -i setup.py || die + eapply "${FILESDIR}"/${PN}-0.16.0.1-fix-tests.patch + + if use test; then + einfo "Building test data" + emake -C tests/pysam_data + emake -C tests/cbcf_data + fi + distutils-r1_python_prepare_all } -src_compile() { - # TODO - # empty compile, as the build system runs the whole build again in install - : +python_compile() { + # breaks with parallel build + local MAKEOPTS=-j1 + distutils-r1_python_compile } |