gnu: snakemake: Fix cluster execution.
* gnu/packages/python.scm (snakemake)[arguments]: Add build phase "call-wrapper-not-wrapped-snakemake".
This commit is contained in:
		
							parent
							
								
									03b055a116
								
							
						
					
					
						commit
						e61bc976f6
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
					@ -6032,7 +6032,19 @@ of the structure, dynamics, and functions of complex networks.")
 | 
				
			||||||
    (build-system python-build-system)
 | 
					    (build-system python-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     ;; TODO: Package missing test dependencies.
 | 
					     ;; TODO: Package missing test dependencies.
 | 
				
			||||||
     '(#:tests? #f))
 | 
					     '(#:tests? #f
 | 
				
			||||||
 | 
					       #:phases
 | 
				
			||||||
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
 | 
					         ;; For cluster execution Snakemake will call Python.  Since there is
 | 
				
			||||||
 | 
					         ;; no suitable PYTHONPATH set, cluster execution will fail.  We fix
 | 
				
			||||||
 | 
					         ;; this by calling the snakemake wrapper instead.
 | 
				
			||||||
 | 
					         (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
 | 
				
			||||||
 | 
					           (lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
 | 
					             (substitute* "snakemake/executors.py"
 | 
				
			||||||
 | 
					               (("\\{sys.executable\\} -m snakemake")
 | 
				
			||||||
 | 
					                (string-append (assoc-ref outputs "out")
 | 
				
			||||||
 | 
					                               "/bin/snakemake")))
 | 
				
			||||||
 | 
					             #t)))))
 | 
				
			||||||
    (propagated-inputs
 | 
					    (propagated-inputs
 | 
				
			||||||
     `(("python-wrapt" ,python-wrapt)
 | 
					     `(("python-wrapt" ,python-wrapt)
 | 
				
			||||||
       ("python-requests" ,python-requests)))
 | 
					       ("python-requests" ,python-requests)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue