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
|
Author: Andreas Tille <tille@debian.org>
Last-Changed: Tue, 03 Mar 2015 20:55:53 +0100
Forwarded: not-needed
Description: We are using Debian packaged python-joblib
Debian has its own way to distinguish Python versions and there is no point
in doing this inside the code.
.
The patch is non-intrusive since it conserves the original code and uses
Debian pyyaml only if the original method fails.
--- a/assembler/src/spades_pipeline/scripts/compress_all.py
+++ b/assembler/src/spades_pipeline/scripts/compress_all.py
@@ -28,12 +28,15 @@ def remove_not_corrected_reads(output_di
def compress_dataset_files(input_file, ext_python_modules_home, max_threads, log, not_used_yaml_file, output_dir,
gzip_output):
addsitedir(ext_python_modules_home)
- if sys.version.startswith("2."):
- import pyyaml2 as pyyaml
- from joblib2 import Parallel, delayed
- elif sys.version.startswith("3."):
- import pyyaml3 as pyyaml
- from joblib3 import Parallel, delayed
+ try:
+ if sys.version.startswith("2."):
+ import pyyaml2 as pyyaml
+ from joblib2 import Parallel, delayed
+ elif sys.version.startswith("3."):
+ import pyyaml3 as pyyaml
+ from joblib3 import Parallel, delayed
+ except:
+ from joblib import Parallel, delayed
dataset_data = pyyaml.load(open(input_file))
remove_not_corrected_reads(output_dir)
|