diff fabfile.py @ 13:30bb8acb77a4

Updated to v0.5.4p5, use repository dependencies.
author lparsons
date Tue, 05 Nov 2013 13:02:43 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fabfile.py	Tue Nov 05 13:02:43 2013 -0500
@@ -0,0 +1,26 @@
+from fabric.api import local
+from fabric.operations import prompt
+import os
+
+
+def package():
+    '''
+    Pacakge for upload to toolshed
+      packaging 'test' version (default) uses local directory
+      otherwise, specify a mercurial tag to package
+    '''
+    package_dir = 'package'
+    base_filename = os.path.join(package_dir, 'htseq-count')
+    version = prompt("Enter version number for package [test]:")
+    revision_option = ''
+    if version != '':
+        revision_option = '-r "%s"' % version
+    else:
+        version = 'test'
+    version_filename = '%s_%s.tar.gz' % (base_filename, version)
+    local('mkdir -p %s' % package_dir)
+    local('rm -f %s' % version_filename)
+    if version == 'test':
+        local('tar czvf %s --exclude "fabfile.*" --exclude "%s" --exclude ".hg*" *' % (version_filename, package_dir))
+    else:
+        local('hg archive -t tgz %s -X "fabfile.*" -X "package" -X ".hg*" -p . "%s"' % (revision_option, version_filename))