[med-svn] [Git][med-team/cyvcf2][master] 5 commits: New upstream version 0.30.18

Andreas Tille (@tille) gitlab at salsa.debian.org
Thu Oct 6 10:51:29 BST 2022



Andreas Tille pushed to branch master at Debian Med / cyvcf2


Commits:
0135a566 by Andreas Tille at 2022-10-06T11:47:09+02:00
New upstream version 0.30.18
- - - - -
5693f905 by Andreas Tille at 2022-10-06T11:47:09+02:00
routine-update: New upstream version

- - - - -
5e08a80e by Andreas Tille at 2022-10-06T11:47:10+02:00
Update upstream source from tag 'upstream/0.30.18'

Update to upstream version '0.30.18'
with Debian dir a06ad46412f16b94a9804d61cf5621b7c0dc5c1f
- - - - -
01a85451 by Andreas Tille at 2022-10-06T11:49:13+02:00
Refresh patches

- - - - -
71072ee8 by Andreas Tille at 2022-10-06T11:51:01+02:00
Upload to unstable

- - - - -


10 changed files:

- .github/workflows/wheels.yml
- README.md
- ci/linux-deps
- + ci/osx-arm64-deps
- ci/osx-deps
- cyvcf2/__init__.py
- debian/changelog
- debian/patches/add_htslib_link_dependency.patch
- + pyproject.toml
- setup.py


Changes:

=====================================
.github/workflows/wheels.yml
=====================================
@@ -46,17 +46,16 @@ jobs:
         CIBW_ENVIRONMENT: "CYTHONIZE=1 LIBDEFLATE=1 LDFLAGS='-L/usr/lib64/openssl11' CPPFLAGS='-I/usr/include/openssl11' C_INCLUDE_PATH='/root/include' LIBRARY_PATH='/root/lib'"
         CIBW_REPAIR_WHEEL_COMMAND_LINUX: LD_LIBRARY_PATH='/root/lib' auditwheel repair -w {dest_dir} {wheel}
 
-    - name: Build wheels for Mac OS
+    - name: Build wheels for Mac OS x86
       if: matrix.os == 'macos-latest'
       run: |
         python -m cibuildwheel --output-dir wheelhouse
       env:
         CIBW_SKIP: "pp* *i686*"
-        CIBW_ARCHS_MACOS: "x86_64 arm64"
+        CIBW_ARCHS_MACOS: "x86_64"
         CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
         CIBW_BEFORE_BUILD_MACOS: "{project}/ci/osx-deps"
         CIBW_TEST_COMMAND: "{project}/ci/test"
-        CIBW_TEST_SKIP: "*-macosx_arm64"
         CIBW_ENVIRONMENT: "CYTHONIZE=1 LIBDEFLATE=1 C_INCLUDE_PATH='/usr/local/include' LIBRARY_PATH='/usr/local/lib'"
         # https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-passing-dyld_library_path-to-delocate
         CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
@@ -66,6 +65,27 @@ jobs:
         CPPFLAGS: "-I/usr/local/opt/openssl at 1.1/include"
         PKG_CONFIG_PATH: "/usr/local/opt/openssl at 1.1/lib/pkgconfig"
 
+    - name: Build wheels for Mac OS arm64
+      # don't build with libdeflate, see https://github.com/brentp/cyvcf2/issues/252
+      if: matrix.os == 'macos-latest'
+      run: |
+        python -m cibuildwheel --output-dir wheelhouse
+      env:
+        CIBW_SKIP: "pp* *i686*"
+        CIBW_ARCHS_MACOS: "arm64"
+        CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
+        CIBW_BEFORE_BUILD_MACOS: "{project}/ci/osx-arm64-deps"
+        CIBW_TEST_COMMAND: "{project}/ci/test"
+        CIBW_TEST_SKIP: "*-macosx_arm64"
+        CIBW_ENVIRONMENT: "CYTHONIZE=1 C_INCLUDE_PATH='/usr/local/include' LIBRARY_PATH='/usr/local/lib'"
+        # https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-passing-dyld_library_path-to-delocate
+        CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
+          DYLD_LIBRARY_PATH=/usr/local/lib delocate-listdeps {wheel} &&
+          DYLD_LIBRARY_PATH=/usr/local/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
+        LDFLAGS: "-L/usr/local/opt/openssl at 1.1/lib"
+        CPPFLAGS: "-I/usr/local/opt/openssl at 1.1/include"
+        PKG_CONFIG_PATH: "/usr/local/opt/openssl at 1.1/lib/pkgconfig"
+
     # Enable tmate debugging of manually-triggered workflows if the input option was provided
     - name: Setup tmate session
       if: ${{ always() && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
@@ -118,7 +138,7 @@ jobs:
           name: artifact
           path: dist
 
-      - uses: pypa/gh-action-pypi-publish at master
+      - uses: pypa/gh-action-pypi-publish at release/v1
         with:
           user: __token__
           password: ${{ secrets.PYPI_API_TOKEN }}


=====================================
README.md
=====================================
@@ -31,31 +31,29 @@ The example below shows much of the use of cyvcf2.
 from cyvcf2 import VCF
 
 for variant in VCF('some.vcf.gz'): # or VCF('some.bcf')
-	variant.REF, variant.ALT # e.g. REF='A', ALT=['C', 'T']
+    variant.REF, variant.ALT # e.g. REF='A', ALT=['C', 'T']
 
+    variant.CHROM, variant.start, variant.end, variant.ID, \
+                variant.FILTER, variant.QUAL
 
-	variant.CHROM, variant.start, variant.end, variant.ID, \
-				variant.FILTER, variant.QUAL
+    # numpy arrays of specific things we pull from the sample fields.
+    # gt_types is array of 0,1,2,3==HOM_REF, HET, UNKNOWN, HOM_ALT
+    variant.gt_types, variant.gt_ref_depths, variant.gt_alt_depths # numpy arrays
+    variant.gt_phases, variant.gt_quals, variant.gt_bases # numpy array
 
-	# numpy arrays of specific things we pull from the sample fields.
-	# gt_types is array of 0,1,2,3==HOM_REF, HET, UNKNOWN, HOM_ALT
-	variant.gt_types, variant.gt_ref_depths, variant.gt_alt_depths # numpy arrays
-	variant.gt_phases, variant.gt_quals, variant.gt_bases # numpy array
+    ## INFO Field.
+    ## extract from the info field by it's name:
+    variant.INFO.get('DP') # int
+    variant.INFO.get('FS') # float
+    variant.INFO.get('AC') # float
 
+    # convert back to a string.
+    str(variant)
 
-	## INFO Field.
-	## extract from the info field by it's name:
-	variant.INFO.get('DP') # int
-	variant.INFO.get('FS') # float
-	variant.INFO.get('AC') # float
 
-	# convert back to a string.
-	str(variant)
+    ## sample info...
 
-
-	## sample info...
-
-	# Get a numpy array of the depth per sample:
+    # Get a numpy array of the depth per sample:
     dp = variant.format('DP')
     # or of any other format field:
     sb = variant.format('SB')
@@ -67,7 +65,6 @@ vcf = VCF('some.vcf.gz')
 for v in vcf('11:435345-556565'):
     if v.INFO["AF"] > 0.1: continue
     print(str(v))
-
 ```
 
 Installation
@@ -140,7 +137,7 @@ Options:
 See Also
 ========
 
-Pysam also [has a cython wrapper to htslib](https://github.com/pysam-developers/pysam/blob/master/pysam/cbcf.pyx) and one block of code here is taken directly from that library. But, the optimizations that we want for gemini are very specific so we have chosen to create a separate project.
+Pysam also [has a cython wrapper to htslib](https://github.com/pysam-developers/pysam/blob/master/pysam/libcbcf.pyx) and one block of code here is taken directly from that library. But, the optimizations that we want for gemini are very specific so we have chosen to create a separate project.
 
 Performance
 ===========


=====================================
ci/linux-deps
=====================================
@@ -6,8 +6,6 @@ yum install -y openssl11-devel
 yum install -y libffi libffi-devel zlib-devel
 yum install -y bzip2-devel bzip2-libs xz-devel xz-libs
 
-python -m pip install pip --upgrade
-
 git submodule init
 git submodule update
 
@@ -43,6 +41,3 @@ cd htslib
 /usr/bin/autoconf
 ./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2
 make
-
-cd ..
-pip install -r requirements.txt


=====================================
ci/osx-arm64-deps
=====================================
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+git submodule init
+git submodule update
+
+# configure fails with autoconf 2.71, so downgrade
+# see https://github.com/asdf-vm/asdf-erlang/issues/195
+brew install autoconf at 2.69 && \
+brew link --overwrite autoconf at 2.69 && \
+autoconf -V
+
+cd htslib
+autoheader
+autoconf
+./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2 --without-libdeflate
+make


=====================================
ci/osx-deps
=====================================
@@ -2,8 +2,6 @@
 
 set -e
 
-python -m pip install pip --upgrade
-
 git submodule init
 git submodule update
 
@@ -25,6 +23,3 @@ autoheader
 autoconf
 ./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2
 make
-
-cd ..
-pip install -r requirements.txt


=====================================
cyvcf2/__init__.py
=====================================
@@ -2,4 +2,4 @@ from .cyvcf2 import (VCF, Variant, Writer, r_ as r_unphased, par_relatedness,
                      par_het)
 Reader = VCFReader = VCF
 
-__version__ = "0.30.16"
+__version__ = "0.30.18"


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+cyvcf2 (0.30.18-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+
+ -- Andreas Tille <tille at debian.org>  Thu, 06 Oct 2022 11:49:23 +0200
+
 cyvcf2 (0.30.16-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/add_htslib_link_dependency.patch
=====================================
@@ -5,19 +5,7 @@ Description: Add missing link dependency on htslib, cythonize modules
 
 --- a/setup.py
 +++ b/setup.py
-@@ -11,11 +11,6 @@
-     sys.stderr.write("ERROR: cyvcf2 is only for python 2.7 or greater you are running %d.%d\n", (sys.version_info.major, sys.version_info.minor))
-     sys.exit(1)
- 
--# Install numpy right now
--dist.Distribution().fetch_build_eggs(['numpy'])
--import numpy as np
--
--
- def get_version():
-     """Get the version info from the mpld3 package without importing it"""
-     import ast
-@@ -43,34 +38,33 @@
+@@ -41,34 +41,33 @@ def no_cythonize(extensions, **_ignore):
          extension.sources[:] = sources
      return extensions
  
@@ -67,7 +55,7 @@ Description: Add missing link dependency on htslib, cythonize modules
      try:
          from Cython.Build import cythonize
      except ImportError:
-@@ -81,8 +75,6 @@
+@@ -79,8 +78,6 @@ if CYTHONIZE:
          sys.exit(1)
      compiler_directives = {"language_level": 2, "embedsignature": True}
      extensions = cythonize(extensions, compiler_directives=compiler_directives)


=====================================
pyproject.toml
=====================================
@@ -0,0 +1,2 @@
+[build-system]
+requires = ["setuptools", "wheel", "cython>=0.23.3", "oldest-supported-numpy"]


=====================================
setup.py
=====================================
@@ -5,14 +5,12 @@ import subprocess
 import platform
 
 import pkg_resources
-from setuptools import setup, Extension, dist
+from setuptools import setup, Extension
 
 if sys.version_info.major == 2 and sys.version_info.minor != 7:
     sys.stderr.write("ERROR: cyvcf2 is only for python 2.7 or greater you are running %d.%d\n", (sys.version_info.major, sys.version_info.minor))
     sys.exit(1)
 
-# Install numpy right now
-dist.Distribution().fetch_build_eggs(['numpy'])
 import numpy as np
 
 



View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/compare/ce0766ab3453160529fb5952aec986ea6c3310b8...71072ee84af7f982ce32784cfae9dcddc32201f3

-- 
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/compare/ce0766ab3453160529fb5952aec986ea6c3310b8...71072ee84af7f982ce32784cfae9dcddc32201f3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20221006/d8f51ffe/attachment-0001.htm>


More information about the debian-med-commit mailing list