all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob a16f901e67037afc6bd1ae556f7757e877a9972d 4113 bytes (raw)
name: gnu/packages/patches/crossmap-allow-system-pysam.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
 
diff --git a/setup.py b/setup.py
--- a/setup.py	2015-02-26 15:28:49.771189185 +0100
+++ b/setup.py	2015-02-26 15:55:03.440327752 +0100
@@ -19,6 +19,15 @@
 except:
 	have_numpy = False
 
+try:
+	import pysam
+	if os.environ['CROSSMAP_USE_SYSTEM_PYSAM']:
+		have_pysam = True
+	else:
+		have_pysam = False
+except ImportError:
+	have_pysam = False
+
 if platform.system()=='Windows':
 	print >> sys.stderr, "Sorry, Windows platform is not supported!"
 	sys.exit()
@@ -165,49 +174,50 @@
 	
 	
 	#================= pysam samtools ====================
-	extensions.append(Extension(
-    	"pysam.csamtools",              
-		csamtools_sources + [ "lib/pysam/%s" % x for x in ("pysam_util.c", )] +\
-		glob.glob( os.path.join( "lib/samtools", "*.pysam.c" )) +\
-		os_c_files + \
-		glob.glob( os.path.join( "lib/samtools", "*", "*.pysam.c" ) ),
-		library_dirs=[],
-		include_dirs=[ "lib/samtools", "lib/pysam" ] + include_os,
-		libraries=[ "z", ],
-		language="c",
-		define_macros = [('_FILE_OFFSET_BITS','64'),('_USE_KNETFILE','')], 
-    ))
-
-	extensions.append(Extension(
-		"pysam.ctabix",                   
-		tabix_sources + [ "lib/pysam/%s" % x for x in ( "tabix_util.c", )] +\
-		os_c_files + \
-		glob.glob( os.path.join( "lib/tabix", "*.pysam.c" ) ),
-		library_dirs=[],
-		include_dirs=[ "lib/tabix", "lib/pysam" ] + include_os,
-		libraries=[ "z", ],
-		language="c",
-		define_macros = [('_FILE_OFFSET_BITS','64'),
-                     ('_USE_KNETFILE','')], 
-    ))
-
-	extensions.append(Extension(
-		"pysam.TabProxies",               
-		tabproxies_sources + os_c_files,
-		library_dirs=[],
-		include_dirs= include_os,
-		libraries=[ "z", ],
-		language="c",
-    ))
-
-	extensions.append(Extension(
-		"pysam.cvcf",                   
-		cvcf_sources + os_c_files,
-		library_dirs=[],
-		include_dirs= ["lib/tabix",] + include_os,
-		libraries=[ "z", ],
-		language="c",
-    ))
+        if not have_pysam:
+                extensions.append(Extension(
+                        "pysam.csamtools",              
+                        csamtools_sources + [ "lib/pysam/%s" % x for x in ("pysam_util.c", )] +\
+                        glob.glob( os.path.join( "lib/samtools", "*.pysam.c" )) +\
+                        os_c_files + \
+                        glob.glob( os.path.join( "lib/samtools", "*", "*.pysam.c" ) ),
+                        library_dirs=[],
+                        include_dirs=[ "lib/samtools", "lib/pysam" ] + include_os,
+                        libraries=[ "z", ],
+                        language="c",
+                        define_macros = [('_FILE_OFFSET_BITS','64'),('_USE_KNETFILE','')], 
+                ))
+
+                extensions.append(Extension(
+                        "pysam.ctabix",                   
+                        tabix_sources + [ "lib/pysam/%s" % x for x in ( "tabix_util.c", )] +\
+                        os_c_files + \
+                        glob.glob( os.path.join( "lib/tabix", "*.pysam.c" ) ),
+                        library_dirs=[],
+                        include_dirs=[ "lib/tabix", "lib/pysam" ] + include_os,
+                        libraries=[ "z", ],
+                        language="c",
+                        define_macros = [('_FILE_OFFSET_BITS','64'),
+                                         ('_USE_KNETFILE','')], 
+                ))
+
+                extensions.append(Extension(
+                        "pysam.TabProxies",               
+                        tabproxies_sources + os_c_files,
+                        library_dirs=[],
+                        include_dirs= include_os,
+                        libraries=[ "z", ],
+                        language="c",
+                ))
+
+                extensions.append(Extension(
+                        "pysam.cvcf",                   
+                        cvcf_sources + os_c_files,
+                        library_dirs=[],
+                        include_dirs= ["lib/tabix",] + include_os,
+                        libraries=[ "z", ],
+                        language="c",
+                ))
 
 
 	return extensions     

debug log:

solving a16f901 ...
found a16f901 in https://yhetil.org/guix/idj4mq8heed.fsf@bimsb-sys02.mdc-berlin.net/

applying [1/1] https://yhetil.org/guix/idj4mq8heed.fsf@bimsb-sys02.mdc-berlin.net/
diff --git a/gnu/packages/patches/crossmap-allow-system-pysam.patch b/gnu/packages/patches/crossmap-allow-system-pysam.patch
new file mode 100644
index 0000000..a16f901

1:12: space before tab in indent.
 	have_numpy = False
1:13: trailing whitespace.
 
1:24: space before tab in indent.
 	print >> sys.stderr, "Sorry, Windows platform is not supported!"
1:25: space before tab in indent.
 	sys.exit()
1:27: trailing whitespace.
 	
Checking patch gnu/packages/patches/crossmap-allow-system-pysam.patch...
Applied patch gnu/packages/patches/crossmap-allow-system-pysam.patch cleanly.
warning: squelched 17 whitespace errors
warning: 22 lines add whitespace errors.

index at:
100644 a16f901e67037afc6bd1ae556f7757e877a9972d	gnu/packages/patches/crossmap-allow-system-pysam.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.