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
+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}
# 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']:
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",
'requires': ['cython (>=0.21)'],
'ext_modules': [chtslib,
csamfile,
-@@ -511,10 +521,7 @@
+@@ -512,10 +524,7 @@
cfaidx,
cutils],
'cmdclass': cmdclass,