[123175] branches/gsoc14-pip2port/pypi2port

gaurav at macports.org gaurav at macports.org
Wed Aug 6 04:16:17 PDT 2014


Revision: 123175
          https://trac.macports.org/changeset/123175
Author:   gaurav at macports.org
Date:     2014-08-06 04:16:17 -0700 (Wed, 06 Aug 2014)
Log Message:
-----------
Updated executable

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

Modified: branches/gsoc14-pip2port/pypi2port
===================================================================
--- branches/gsoc14-pip2port/pypi2port	2014-08-06 11:03:38 UTC (rev 123174)
+++ branches/gsoc14-pip2port/pypi2port	2014-08-06 11:16:17 UTC (rev 123175)
@@ -252,7 +252,107 @@
             return licenses[i]
     
 
+#def testing(name,portv=27,type="quiet"):
+    
 
+
+def port_fetch(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t fetch dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+def port_checksum(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t checksum dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+def port_extract(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t extract dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+def port_patch(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t patch dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+def port_configure(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t configure dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+def port_build(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t build dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+def port_destroot(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t destroot dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+	
+
+def port_clean(name,portv=27,type="quiet"):
+    try:
+        command = "sudo port -t clean dports/python/py-"+name+" subport=py"+portv+"-"name
+        if type=="quiet":
+            phase_output = subprocess.check_output(command,shell=True,stderr=subprocess.STDOUT).strip()
+        else:
+            phase_output = subprocess.check_call(command,shell=True,stderr=subprocess.STDOUT).strip()            
+        return phase_output
+    except Exception e:
+        return False
+
+
+
 def create_portfile(dict, file_name, dict2):
     search_distfile(dict['name'],dict['version'])
     print "Creating Portfile for pypi package "+dict['name']+"..."
@@ -365,7 +465,7 @@
             master_site_exists = True
         else:
             master_site_exists = False
-        file.write('distname            {0}-{1}\n\n'.format(
+        file.write('distname            {0}-{1}.tar.gz\n\n'.format(
                    dict['name'], dict['version']))
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140806/e57ebf0e/attachment.html>


More information about the macports-changes mailing list