From df91a87b2471484c265948e0e58e968903636dee Mon Sep 17 00:00:00 2001 From: utahta Date: Mon, 8 Aug 2011 02:44:08 +0900 Subject: [PATCH] update 0.10 --- ChangeLog | 5 +++++ PKG-INFO | 24 +++++++++++++++++++-- README.rst | 13 +++++++++++ pythonbrew/define.py | 2 +- pythonbrew/installer/pythonbrewinstaller.py | 4 ++++ pythonbrew/installer/pythoninstaller.py | 2 +- stable-version.txt | 2 +- 7 files changed, 47 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f61a9d6..d44a530 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +* 0.10 + - Added systemwide install support. (issue #31) + - Fixed issue #41 Handle venv binary with the symlink command. + - Improved `venv` command (without virtualenvwrapper) + * 0.9 - Added `buildout` command. - Added `venv` command. diff --git a/PKG-INFO b/PKG-INFO index 4cd025e..9add08d 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -25,6 +25,17 @@ If you need to install pythonbrew into somewhere else, you can do that by settin chmod +x pythonbrewinstall ./pythonbrewinstall +For Systemwide(Multi-User) installation +--------------------------------------- + +If the install script is run as root, pythonbrew will automatically install into /usr/local/pythonbrew. + +The pythonbrew.bashrc will be automatically configured for every user on the system if you install as root. + +After installation, where you would normally use `sudo`, non-root users will need to use `sudopybrew`:: + + sudopybrew install -n -v -j2 2.7.2 + Usage ===== @@ -91,6 +102,7 @@ Create/Remove a symbolic link to python (in a directory on your $PATH):: pythonbrew symlink -p 2.7.2 pythonbrew symlink pip # Create a symbolic link to the specified script in bin directory pythonbrew symlink -r # Remove a symbolic link + pythonbrew symlink -v foo # Create a symbolic link to the specified virtual environment python in bin directory Runs the buildout with specified or current using python:: @@ -99,6 +111,7 @@ Runs the buildout with specified or current using python:: Create isolated python environments (uses virtualenv):: + pythonbrew venv init pythonbrew venv create proj pythonbrew venv list pythonbrew venv use proj @@ -160,11 +173,18 @@ See more details below Changelog ========= +0.10 (2011-08-08) +----------------- + +- Added systemwide install support. (issue #31) +- Fixed issue #41 Handle venv binary with the symlink command. +- Improved `venv` command (without virtualenvwrapper) + 0.9 (2011-07-21) ---------------- -- Add `venv` command (virtualenv and virtualenvwrapper supported) -- Add `buildout` command. +- Added `venv` command (uses virtualenv and virtualenvwrapper) +- Added `buildout` command. 0.8 (2011-07-10) ---------------- diff --git a/README.rst b/README.rst index 8c240ae..0c66401 100644 --- a/README.rst +++ b/README.rst @@ -25,6 +25,17 @@ If you need to install pythonbrew into somewhere else, you can do that by settin chmod +x pythonbrewinstall ./pythonbrewinstall +For Systemwide(Multi-User) installation +--------------------------------------- + +If the install script is run as root, pythonbrew will automatically install into /usr/local/pythonbrew. + +The pythonbrew function will be automatically configured for every user on the system if you install as root. + +After installation, where you would normally use `sudo`, non-root users will need to use `sudopybrew`:: + + sudopybrew install -n -v -j2 2.7.2 + Usage ===== @@ -91,6 +102,7 @@ Create/Remove a symbolic link to python (in a directory on your $PATH):: pythonbrew symlink -p 2.7.2 pythonbrew symlink pip # Create a symbolic link to the specified script in bin directory pythonbrew symlink -r # Remove a symbolic link + pythonbrew symlink -v foo # Create a symbolic link to the specified virtual environment python in bin directory Runs the buildout with specified or current using python:: @@ -99,6 +111,7 @@ Runs the buildout with specified or current using python:: Create isolated python environments (uses virtualenv):: + pythonbrew venv init pythonbrew venv create proj pythonbrew venv list pythonbrew venv use proj diff --git a/pythonbrew/define.py b/pythonbrew/define.py index 5589615..a8ab362 100644 --- a/pythonbrew/define.py +++ b/pythonbrew/define.py @@ -6,7 +6,7 @@ except: import configparser as ConfigParser # pythonbrew version -VERSION = "0.9" +VERSION = "0.10" # pythonbrew installer root path INSTALLER_ROOT = os.path.dirname(os.path.abspath(__file__)) diff --git a/pythonbrew/installer/pythonbrewinstaller.py b/pythonbrew/installer/pythonbrewinstaller.py index ab6e824..eb44c1e 100644 --- a/pythonbrew/installer/pythonbrewinstaller.py +++ b/pythonbrew/installer/pythonbrewinstaller.py @@ -9,6 +9,7 @@ from pythonbrew.define import PATH_BUILD, PATH_BIN, PATH_DISTS, PATH_PYTHONS,\ PATH_LOG, PATH_PATCHES, PATH_ETC_CONFIG,\ PATH_SCRIPTS_PYTHONBREW_INSTALLER, PATH_VENVS, PATH_HOME_ETC, ROOT import stat +import time class PythonbrewInstaller(object): """pythonbrew installer: @@ -84,6 +85,9 @@ fi fp.write(profile) fp.close() elif os.path.isfile('/etc/profile'): + # create backup + shutil.copy('/etc/profile', '/tmp/profile.pythonbrew.%s' % int(time.time())) + output = [] is_copy = True fp = open('/etc/profile', 'r') diff --git a/pythonbrew/installer/pythoninstaller.py b/pythonbrew/installer/pythoninstaller.py index 46f8182..eaaacc6 100644 --- a/pythonbrew/installer/pythoninstaller.py +++ b/pythonbrew/installer/pythoninstaller.py @@ -107,7 +107,7 @@ class PythonInstaller(object): dl.download(base_url, self.download_url, self.download_file) except: unlink(self.download_file) - logger.error("\n%s" % (sys.exc_info()[1])) + logger.error("Failed to download.\n%s" % (sys.exc_info()[1])) sys.exit(1) # extracting if not extract_downloadfile(self.content_type, self.download_file, self.build_dir): diff --git a/stable-version.txt b/stable-version.txt index d893d08..688abaa 100644 --- a/stable-version.txt +++ b/stable-version.txt @@ -1 +1 @@ -0.9 \ No newline at end of file +0.10 \ No newline at end of file