1 new commit in py:

https://bitbucket.org/hpk42/py/changeset/6be37b7cb55c/
changeset:   6be37b7cb55c
user:        hpk42
date:        2012-05-22 17:22:38
summary:     update distribute_setup.py
affected #:  2 files

diff -r 333aee3e9e9e9ce29e7c1d1b4b13bddf78d06092 -r 
6be37b7cb55c6ac1da9e9afa4dbbae6c1f499fd2 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@
 - fix issue 13 - correct handling of the tag name object in xmlgen
 - fix issue 14 - support raw attribute values in xmlgen
 - fix windows terminalwriter printing/re-line problem
+- update distribute_setup.py to 0.6.27
 
 Changes between 1.4.6 and 1.4.7
 ==================================================


diff -r 333aee3e9e9e9ce29e7c1d1b4b13bddf78d06092 -r 
6be37b7cb55c6ac1da9e9afa4dbbae6c1f499fd2 distribute_setup.py
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -46,7 +46,7 @@
             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.19"
+DEFAULT_VERSION = "0.6.27"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/";
 SETUPTOOLS_FAKED_VERSION = "0.6c11"
 
@@ -63,7 +63,7 @@
 """ % SETUPTOOLS_FAKED_VERSION
 
 
-def _install(tarball):
+def _install(tarball, install_args=()):
     # extracting the tarball
     tmpdir = tempfile.mkdtemp()
     log.warn('Extracting in %s', tmpdir)
@@ -81,7 +81,7 @@
 
         # installing
         log.warn('Installing Distribute')
-        if not _python_cmd('setup.py', 'install'):
+        if not _python_cmd('setup.py', 'install', *install_args):
             log.warn('Something went wrong during the installation.')
             log.warn('See the error message above.')
     finally:
@@ -306,6 +306,9 @@
         log.warn('%s already exists', pkg_info)
         return
 
+    if not os.access(pkg_info, os.W_OK):
+        log.warn("Don't have permissions to write %s, skipping", pkg_info)
+
     log.warn('Creating %s', pkg_info)
     f = open(pkg_info, 'w')
     try:
@@ -474,11 +477,20 @@
             else:
                 self._dbg(1, "tarfile: %s" % e)
 
+def _build_install_args(argv):
+    install_args = []
+    user_install = '--user' in argv
+    if user_install and sys.version_info < (2,6):
+        log.warn("--user requires Python 2.6 or later")
+        raise SystemExit(1)
+    if user_install:
+        install_args.append('--user')
+    return install_args
 
 def main(argv, version=DEFAULT_VERSION):
     """Install or upgrade setuptools and EasyInstall"""
     tarball = download_setuptools()
-    _install(tarball)
+    _install(tarball, _build_install_args(argv))
 
 
 if __name__ == '__main__':

Repository URL: https://bitbucket.org/hpk42/py/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to