Skip to content

Commit

Permalink
release 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
utahta committed Jul 10, 2011
1 parent 7371bde commit cfdd193
Show file tree
Hide file tree
Showing 26 changed files with 742 additions and 251 deletions.
17 changes: 14 additions & 3 deletions ChangeLog
@@ -1,9 +1,20 @@
* 0.8
- Fixed issue #21 Added Ubuntu 11.04(Natty) support
- Fixed issue #24 non-framework python27 now defines environ properly. Thanks npinto.
- Fixed issue #27 Cleanup of OS X python build flags
- Fixed issue #28 Describe the 'symlink' command better. Thanks tgs.
- Fixed issue #30 py command does not accept arguments with a space
- Fixed bug: `pythonbrew off` need not have removed the symlink in bin directory
- Added --no-test option to the install command
- Added --verbose option to the install command
- `pythonbrew clean` has been renamed. Added `pythonbrew cleanup` instead.

* 0.7.3
- Improved symlink command.
- support python3
- Improved symlink command
- Added python3 support

* 0.7.2
- Bug fixed.
- Bug fixed

* 0.7.1
- Enable parallel make option (--jobs).
Expand Down
1 change: 0 additions & 1 deletion PKG-INFO

This file was deleted.

159 changes: 159 additions & 0 deletions PKG-INFO
@@ -0,0 +1,159 @@
Overview
========

pythonbrew is a program to automate the building and installation of Python in the users $HOME.

pythonbrew is inspired by `perlbrew <http://github.com/gugod/App-perlbrew>`_ and `rvm <https://github.com/wayneeseguin/rvm>`_.

Installation
============

The recommended way to download and install pythonbrew is to run these statements in your shell::

curl -kL http://xrl.us/pythonbrewinstall | bash

After that, pythonbrew installs itself to ~/.pythonbrew, and you should follow the instruction on screen to setup your .bashrc to put it in your PATH.

If you need to install pythonbrew into somewhere else, you can do that by setting a PYTHONBREW_ROOT environment variable::

export PYTHONBREW_ROOT=/path/to/pythonbrew
curl -kLO http://xrl.us/pythonbrewinstall
chmod +x pythonbrewinstall
./pythonbrewinstall

Usage
=====

pythonbrew command [options]

Install some pythons::

pythonbrew install 2.7.2
pythonbrew install --verbose 2.7.2
pythonbrew install --force 2.7.2
pythonbrew install --no-test 2.7.2
pythonbrew install --configure="CC=gcc_4.1" 2.7.2
pythonbrew install --no-setuptools 2.7.2
pythonbrew install http://www.python.org/ftp/python/2.7/Python-2.7.2.tgz
pythonbrew install /path/to/Python-2.7.2.tgz
pythonbrew install /path/to/Python-2.7.2
pythonbrew install 2.7.2 3.2

Permanently use the specified python::

pythonbrew switch 2.7.2
pythonbrew switch 3.2

Use the specified python in current shell::

pythonbrew use 2.7.2

Runs a named python file against specified and/or all pythons::

pythonbrew py test.py
pythonbrew py -v test.py # Show running python version
pythonbrew py -p 2.7.2 -p 3.2 test.py # Use the specified pythons

List the installed pythons::

pythonbrew list

List the available installation pythons::

pythonbrew list -k

Uninstall the specified python::

pythonbrew uninstall 2.7.2
pythonbrew uninstall 2.7.2 3.2

Remove stale source folders and archives::

pythonbrew cleanup

Upgrades pythonbrew to the latest version::

pythonbrew update
pythonbrew update --master
pythonbrew update --develop

Disable pythonbrew::

pythonbrew off

Create/Remove a symbolic link to python (in a directory on your $PATH)::

pythonbrew symlink # Create a symbolic link, like "py2.7.2", for each installed version
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

Show version::

pythonbrew version

COMMANDS
========

install <version>
Build and install the given version of python.
Install setuptools and pip automatically.

switch <version>
Permanently use the specified python as default.

use <version>
Use the specified python in current shell.

py <python file>
Runs a named python file against specified and/or all pythons.

list
List the installed all pythons.

list -k <version>
List the available install pythons.

uninstall <version>
Uninstall the given version of python.

cleanup
Remove stale source folders and archives.

update
Upgrades pythonbrew to the latest version.

off
Disable pythonbrew.

version
Show version.

See more details below::

pythonbrew help <command>

LICENCE
=======

The MIT License

Copyright (c) <2010-2011> <utahta>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
80 changes: 33 additions & 47 deletions README.rst
@@ -1,7 +1,7 @@
Overview
========

pythonbrew is a program to automate the building and installation of Python in the users HOME.
pythonbrew is a program to automate the building and installation of Python in the users $HOME.

pythonbrew is inspired by `perlbrew <http://github.com/gugod/App-perlbrew>`_ and `rvm <https://github.com/wayneeseguin/rvm>`_.

Expand All @@ -10,20 +10,16 @@ Installation

The recommended way to download and install pythonbrew is to run these statements in your shell::

curl -kLO http://github.com/utahta/pythonbrew/raw/master/pythonbrew-install
chmod +x pythonbrew-install
./pythonbrew-install

or more simply like this::

curl -kL http://github.com/utahta/pythonbrew/raw/master/pythonbrew-install | bash
curl -kL http://xrl.us/pythonbrewinstall | bash

After that, pythonbrew installs itself to ~/.pythonbrew, and you should follow the instruction on screen to setup your .bashrc to put it in your PATH.

If you need to install pythonbrew into somewhere else, you can do that by setting a PYTHONBREW_ROOT environment variable::

export PYTHONBREW_ROOT=/path/to/pythonbrew
./pythonbrew-install
curl -kLO http://xrl.us/pythonbrewinstall
chmod +x pythonbrewinstall
./pythonbrewinstall

Usage
=====
Expand All @@ -32,59 +28,63 @@ pythonbrew command [options]

Install some pythons::

pythonbrew install 2.6.6
pythonbrew install --force 2.6.6
pythonbrew install --configure="CC=gcc_4.1" 2.6.6
pythonbrew install --no-setuptools 2.6.6
pythonbrew install http://www.python.org/ftp/python/2.7/Python-2.6.6.tgz
pythonbrew install file:///path/to/Python-2.6.6.tgz
pythonbrew install /path/to/Python-2.6.6.tgz
pythonbrew install 2.5.5 2.6.6
pythonbrew install 2.7.2
pythonbrew install --verbose 2.7.2
pythonbrew install --force 2.7.2
pythonbrew install --no-test 2.7.2
pythonbrew install --configure="CC=gcc_4.1" 2.7.2
pythonbrew install --no-setuptools 2.7.2
pythonbrew install http://www.python.org/ftp/python/2.7/Python-2.7.2.tgz
pythonbrew install /path/to/Python-2.7.2.tgz
pythonbrew install /path/to/Python-2.7.2
pythonbrew install 2.7.2 3.2
Permanently use the specified python as default::
Permanently use the specified python::

pythonbrew switch 2.6.6
pythonbrew switch 2.5.5
pythonbrew switch 2.7.2
pythonbrew switch 3.2

Use the specified python in current shell::

pythonbrew use 2.6.6
pythonbrew use 2.7.2

Runs a named python file against specified and/or all pythons::

pythonbrew py test.py
pythonbrew py -v test.py # Show running python version
pythonbrew py -p 2.6.6 -p 3.1.2 test.py # Use the specified pythons
pythonbrew py -p 2.7.2 -p 3.2 test.py # Use the specified pythons

List the installed pythons::

pythonbrew list

List the available install pythons::
List the available installation pythons::

pythonbrew list -k

Uninstall the specified python::

pythonbrew uninstall 2.6.6
pythonbrew uninstall 2.5.5 2.6.6
pythonbrew uninstall 2.7.2
pythonbrew uninstall 2.7.2 3.2

Remove stale source folders and archives::

pythonbrew clean
pythonbrew cleanup

Upgrades pythonbrew to the latest version::

pythonbrew update
pythonbrew update --master
pythonbrew update --develop

Disable pythonbrew::

pythonbrew off
Create/Remove a symbolic link to python (in a directory on your $PATH)::

pythonbrew symlink # Create a symbolic link, like "py2.5.5", for each installed version
pythonbrew symlink -p 2.5.5
pythonbrew symlink # Create a symbolic link, like "py2.7.2", for each installed version
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

Expand All @@ -97,10 +97,7 @@ COMMANDS

install <version>
Build and install the given version of python.

Setuptools and pip is automatically installed.

options: --force, --no-setuptools, --configure and --as.
Install setuptools and pip automatically.

switch <version>
Permanently use the specified python as default.
Expand All @@ -120,7 +117,7 @@ list -k <version>
uninstall <version>
Uninstall the given version of python.

clean
cleanup
Remove stale source folders and archives.

update
Expand All @@ -131,21 +128,10 @@ off

version
Show version.

See more details below::

Options
=======

\-f | --force
Force installation of a python. (skip `make test`)

\-C | --configure
Custom configure options.

\-n | --no-setuptools
Skip installation of setuptools.

\--as
Install a python under an alias.
pythonbrew help <command>

LICENCE
=======
Expand Down
5 changes: 5 additions & 0 deletions pythonbrew/__init__.py
@@ -1,6 +1,7 @@
import sys
from pythonbrew.basecommand import command_dict, load_all_commands
from pythonbrew.baseparser import parser
from pythonbrew.log import logger

def main():
options, args = parser.parse_args(sys.argv[1:])
Expand All @@ -12,6 +13,10 @@ def main():
load_all_commands()
command = args[0].lower()
if command not in command_dict:
if command == 'clean':
# note: for some time
logger.info('\nDEPRECATION WARNING: `pythonbrew clean` has been renamed. Please run `pythonbrew cleanup` instead.\n')
return
parser.error("Unknown command: `%s`" % command)
return
command = command_dict[command]
Expand Down
12 changes: 6 additions & 6 deletions pythonbrew/commands/clean.py → pythonbrew/commands/cleanup.py
Expand Up @@ -3,17 +3,17 @@
from pythonbrew.define import PATH_BUILD, PATH_DISTS
from pythonbrew.util import rm_r

class CleanCommand(Command):
name = "clean"
class CleanupCommand(Command):
name = "cleanup"
usage = "%prog"
summary = "Remove stale source folders and archives"

def run_command(self, options, args):
self._clean(PATH_BUILD)
self._clean(PATH_DISTS)
self._cleanup(PATH_BUILD)
self._cleanup(PATH_DISTS)

def _clean(self, root):
def _cleanup(self, root):
for dir in os.listdir(root):
rm_r(os.path.join(root, dir))

CleanCommand()
CleanupCommand()

0 comments on commit cfdd193

Please sign in to comment.