changeset 1:0db4f153d86d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_interproscan commit 7fbeae66de8617e525cd968a2ef89b0be448a618"
author iuc
date Wed, 17 Nov 2021 19:16:17 +0000
parents e93e32359b67
children 7776cb18fdf8
files data_manager/interproscan.py data_manager/interproscan.xml
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/interproscan.py	Mon Nov 15 17:21:22 2021 +0000
+++ b/data_manager/interproscan.py	Wed Nov 17 19:16:17 2021 +0000
@@ -97,7 +97,15 @@
         download_file(DATA_URL.format(version=tag), dest_tar)
 
         print("Finished, now checking md5...")
-        md5_computed = hashlib.md5(open(dest_tar, 'rb').read()).hexdigest()
+        m = hashlib.md5()
+        blocksize = 2**20
+        with open(dest_tar, 'rb') as tarball:
+            while True:
+                buf = tarball.read(blocksize)
+                if not buf:
+                    break
+                m.update(buf)
+        md5_computed = m.hexdigest()
         if not md5.startswith(md5_computed):
             raise RuntimeError("MD5 check failed: computed '%s', expected '%s'" % (md5_computed, md5))
 
@@ -111,7 +119,7 @@
         shutil.move(os.path.join(output_directory, 'interproscan-%s' % tag, 'core/jms-implementation/support-mini-x86-32/data/'), os.path.join(output_directory, 'data'))
     else:
         print("Moving data files around...")
-        shutil.move(os.path.join(output_directory, 'interproscan-%s' % tag), os.path.join(output_directory, 'data'))
+        shutil.move(os.path.join(output_directory, 'interproscan-%s' % tag, 'data'), os.path.join(output_directory, 'data'))
 
     print("Done, removing tarball and unneeded files...")
     os.remove(dest_tar)
--- a/data_manager/interproscan.xml	Mon Nov 15 17:21:22 2021 +0000
+++ b/data_manager/interproscan.xml	Wed Nov 17 19:16:17 2021 +0000
@@ -4,7 +4,7 @@
         <requirement type="package" version="2.26.0">requests</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
-python '$__tool_directory__/interproscan.py'
+python -u '$__tool_directory__/interproscan.py'
 $partial_data
 --version '$version'
 'interproscan'