[83694] trunk/dports/net
singingwolfboy at macports.org
singingwolfboy at macports.org
Fri Sep 9 07:40:49 PDT 2011
Revision: 83694
http://trac.macports.org/changeset/83694
Author: singingwolfboy at macports.org
Date: 2011-09-09 07:40:49 -0700 (Fri, 09 Sep 2011)
Log Message:
-----------
New port: gsutil
Added Paths:
-----------
trunk/dports/net/gsutil/
trunk/dports/net/gsutil/Portfile
trunk/dports/net/gsutil/files/
trunk/dports/net/gsutil/files/gsutil.patch
Added: trunk/dports/net/gsutil/Portfile
===================================================================
--- trunk/dports/net/gsutil/Portfile (rev 0)
+++ trunk/dports/net/gsutil/Portfile 2011-09-09 14:40:49 UTC (rev 83694)
@@ -0,0 +1,53 @@
+# $Id: Portfile 47983 2009-03-12 01:01:28Z ram at macports.org $
+
+PortSystem 1.0
+
+name gsutil
+version 20110908
+set year [string range ${version} 0 3]
+set month [string range ${version} 4 5]
+set day [string range ${version} 6 7]
+categories net
+platforms darwin
+license Apache 2.0
+maintainers singingwolfboy openmaintainer
+
+description command line utility for interacting with cloud storage services
+long_description \
+ gsutil allows you to store, share and manage data hosted at cloud-based \
+ storage providers. It supports a URI syntax for naming data, as well as \
+ URI wildcards. At present gsutil works with Google Storage for Developers \
+ and Amazon's Simple Storage Service (S3). gsutil is implemented in Python, \
+ atop the popular boto open source library.
+
+homepage http://code.google.com/p/${name}/
+master_sites http://${name}.googlecode.com/files/
+distname ${name}_${month}-${day}-${year}
+worksrcdir ${name}
+
+depends_lib port:py27-gslib
+
+checksums md5 65577aea58479c4eea190dd93b72c42b \
+ sha1 58bb5e5b4443576c548bb795f5aa30c3d12ea8c5 \
+ rmd160 b08b6f303d43eb23bc3be165cdfc68c30ae8d82e
+
+patchfiles gsutil.patch
+
+build {}
+destroot {
+ move ${worksrcpath}/gsutil ${destroot}${prefix}/bin/gsutil
+
+ set docdir ${destroot}${prefix}/share/doc/${name}
+ xinstall -d ${docdir}
+ xinstall -m 644 -W ${worksrcpath} README ${docdir}
+ move ${worksrcpath}/cloudauth ${worksrcpath}/cloudreader ${docdir}
+}
+
+variant python27 description {Use Python 2.7} {
+ depends_lib port:py27-gslib port:python27
+ configure {
+ set python.bin ${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7
+ reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${worksrcpath}/gsutil
+ }
+}
+default_variants +python27
Added: trunk/dports/net/gsutil/files/gsutil.patch
===================================================================
--- trunk/dports/net/gsutil/files/gsutil.patch (rev 0)
+++ trunk/dports/net/gsutil/files/gsutil.patch 2011-09-09 14:40:49 UTC (rev 83694)
@@ -0,0 +1,32 @@
+--- gsutil.orig 2011-09-09 10:11:30.000000000 -0400
++++ gsutil 2011-09-09 10:17:27.000000000 -0400
+@@ -38,25 +38,11 @@
+ sys.stderr.write('%s\n' % message)
+ sys.exit(1)
+
+-
+-# Before importing boto, find where gsutil is installed and include its
+-# boto sub-directory at the start of the PYTHONPATH, to ensure the versions of
+-# gsutil and boto stay in sync after software updates. This also allows gsutil
+-# to be used without explicitly adding it to the PYTHONPATH.
+-# We use realpath() below to unwind symlinks if any were used in the gsutil
+-# installation.
+-gsutil_bin_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
+-if not gsutil_bin_dir:
+- OutputAndExit('Unable to determine where gsutil is installed. Sorry, '
+- 'cannot run correctly without this.\n')
+-boto_lib_dir = os.path.join(gsutil_bin_dir, 'boto')
+-if not os.path.isdir(boto_lib_dir):
+- OutputAndExit('There is no boto library under the gsutil install directory '
+- '(%s).\nThe gsutil command cannot work properly when installed '
+- 'this way.\nPlease re-install gsutil per the installation '
+- 'instructions.' % gsutil_bin_dir)
+-sys.path.insert(0, boto_lib_dir)
++import gslib
+ import boto
++gsutil_bin_dir = os.path.dirname(gslib.__file__)
++boto_lib_dir = os.path.dirname(boto.__file__)
++
+ boto.UserAgent += '/gsutil'
+ from boto.exception import BotoClientError
+ from boto.exception import InvalidAclError
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110909/d05d4120/attachment.html>
More information about the macports-changes
mailing list