[122499] branches/gsoc14-pip2port/pypi2port

gaurav at macports.org gaurav at macports.org
Wed Jul 23 03:26:36 PDT 2014


Revision: 122499
          https://trac.macports.org/changeset/122499
Author:   gaurav at macports.org
Date:     2014-07-23 03:26:36 -0700 (Wed, 23 Jul 2014)
Log Message:
-----------
Updated executable

Modified Paths:
--------------
    branches/gsoc14-pip2port/pypi2port

Modified: branches/gsoc14-pip2port/pypi2port
===================================================================
--- branches/gsoc14-pip2port/pypi2port	2014-07-23 10:25:47 UTC (rev 122498)
+++ branches/gsoc14-pip2port/pypi2port	2014-07-23 10:26:36 UTC (rev 122499)
@@ -204,11 +204,18 @@
     if file_name:
         checksums = []
         try:
-            h = hashlib.new('ripemd160')
-            with open(file_name) as f:
-                h.update(f.read())
-                checksums.insert(0, h.hexdigest())
-                checksums.insert(1, hashlib.sha256(f.read()).hexdigest())
+#            h = hashlib.new('ripemd160')
+#            with open(file_name) as f:
+#                h.update(f.read())
+#                checksums.insert(0, h.hexdigest())
+#                checksums.insert(1, hashlib.sha256(f.read()).hexdigest())
+
+            command = "openssl rmd160 "+file_name
+            checksums.insert(0,subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).split('=')[1].strip())
+
+            command = "openssl sha256 "+file_name
+            checksums.insert(1,subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).split('=')[1].strip())
+
             dir = '/'.join(file_name.split('/')[0:-1])
             if flag:
                 os.remove(file_name)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140723/7d8a7b49/attachment-0001.html>


More information about the macports-changes mailing list