Update patch for external htslib
authorAfif Elghraoui <afif@debian.org>
Mon, 20 Jun 2016 01:05:06 +0000 (18:05 -0700)
committerAfif Elghraoui <afif@debian.org>
Mon, 20 Jun 2016 01:05:06 +0000 (18:05 -0700)
The build system tries to make htslib/config.h, which isn't
necessary for our case.

debian/patches/external-htslib.patch

index 9160eb8a9ebe57a0e863a5c5dde80ee065c6d30b..c7c37addea904fec65cb2a92ac4b29c32c9ac6f7 100644 (file)
@@ -4,7 +4,7 @@ Forwarded: no
 Last-Update: 2016-03-05
 --- python-pysam.orig/setup.py
 +++ python-pysam/setup.py
-@@ -87,10 +87,20 @@
+@@ -87,10 +87,21 @@
  #         pysam.
  # external: use shared libhts.so compiled outside of
  #           pysam
@@ -23,10 +23,11 @@ Last-Update: 2016-03-05
 +package_dirs = {'pysam': 'pysam',
 +                'pysam.include.samtools': 'samtools',
 +                'pysam.include.bcftools': 'bcftools'}
++config_headers = ["samtools/config.h"]
  
  # Check if cython is available
  #
-@@ -101,13 +111,15 @@
+@@ -101,13 +112,15 @@
      from cy_build import CyExtension as Extension, cy_build_ext as build_ext
      source_pattern = "pysam/c%s.pyx"
      cmdclass = {'build_ext': build_ext}
@@ -44,7 +45,7 @@ Last-Update: 2016-03-05
  
  # collect pysam version
  sys.path.insert(0, "pysam")
-@@ -140,6 +152,10 @@
+@@ -140,6 +153,10 @@
  htslib_configure_options = None
  
  if HTSLIB_MODE in ['shared', 'separate']:
@@ -55,7 +56,24 @@ Last-Update: 2016-03-05
      htslib_configure_options = configure_library(
          "htslib",
          HTSLIB_CONFIGURE_OPTIONS,
-@@ -492,13 +508,7 @@
+@@ -149,6 +166,7 @@
+     print ("# pysam: htslib configure options: {}".format(
+         str(htslib_configure_options)))
++    config_headers += ["htslib/config.h"]
+     if htslib_configure_options is None:
+         # create empty config.h file
+         with open("htslib/config.h", "w") as outf:
+@@ -261,7 +279,7 @@
+ # create empty config.h files if they have not been created automatically
+ # or created by the user:
+-for fn in "samtools/config.h", "htslib/config.h":
++for fn in config_headers:
+     if not os.path.exists(fn):
+         with open(fn, "w") as outf:
+             outf.write(
+@@ -493,13 +511,7 @@
      'license': "MIT",
      'platforms': "ALL",
      'url': "https://github.com/pysam-developers/pysam",
@@ -70,7 +88,7 @@ Last-Update: 2016-03-05
      'requires': ['cython (>=0.21)'],
      'ext_modules': [chtslib,
                      csamfile,
-@@ -511,10 +521,7 @@
+@@ -512,10 +524,7 @@
                      cfaidx,
                      cutils],
      'cmdclass': cmdclass,