From 94c5d83e6752cf6506c78c9454c08b9f3df9371c Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Mar 2010 00:38:07 +0100 Subject: misc changes, make install --- Makefile | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index feef0bf0..92444a30 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,16 @@ NAME = ranger VERSION = 1.0.3 -PYTHON = python -DOCDIR = doc/pydoc +PYTHON ?= python +DOCDIR ?= doc/pydoc +PREFIX ?= /usr/local +PYTHONOPTIMIZE ?= 1 CWD = $(shell pwd) -EDITOR = vim +EDITOR ?= vim +DEST ?= $(shell $(PYTHON) -c 'import sys; sys.stdout.write( \ + [p for p in sys.path if "site" in p][0])' 2> /dev/null)/ranger -.PHONY: all clean doc cleandoc edit push test commit install info snapshot minimal_snapshot +.PHONY: all compile clean doc cleandoc edit push test commit \ + install uninstall info snapshot minimal_snapshot info: @echo 'This makefile provides shortcuts for common tasks.' @@ -21,7 +26,11 @@ info: @echo 'make push: push the changes via git' @echo 'make edit: open all relevant files in your editor' -all: test +all: test install + +compile: clean + @echo 'Compiling...' + PYTHONOPTIMIZE=$(PYTHONOPTIMIZE) python -m compileall -q ranger doc: cleandoc mkdir -p $(DOCDIR) @@ -30,8 +39,26 @@ doc: cleandoc sys.path[0] = "$(CWD)"; \ pydoc.writedocs("$(CWD)")' -install: - @less -XF INSTALL +uninstall: + @echo 'To uninstall ranger, please remove these files:' + @echo $(DEST)'/*' + @echo $(PREFIX)'/bin/ranger' + @echo 'and optionally the config files at:' + @echo '~/.ranger' + +install: compile + @echo "Installing..." + cp ranger.py $(PREFIX)/bin/ranger + cp -ruT ranger $(DEST) + @echo '--------------------------------------' + @echo 'Finished.' + @echo 'If you use BASH or ZSH, you can activate an extra feature now:' + @echo 'When you exit ranger, the directory of the current shell can be' + @echo 'changed to the last visited directory in ranger. To do so, add' + @echo 'this alias to your shell rc file (like ~/.bashrc):' + @echo 'alias rng="source ranger ranger"' + @echo 'And run ranger by typing rng.' + cleandoc: test -d $(DOCDIR) && rm -f -- $(DOCDIR)/*.html -- cgit 1.4.1-2-gfad0 From 0d15a7cb155df52bfde44b13407d565738d20898 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Mar 2010 02:33:05 +0100 Subject: make push: removed "hut" repo --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 92444a30..c93cb647 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,6 @@ push: @for repo in $(shell git remote); do \ echo "Pushing to $$repo..."; \ git push $$repo master; \ - git push $$repo -f hut; \ done commit: test -- cgit 1.4.1-2-gfad0 From 76f8d548b055fad7f9652d23035d30c910ec4ca0 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Mar 2010 19:19:42 +0100 Subject: make install: catch an exception --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c93cb647..83ba7ca0 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,10 @@ uninstall: @echo '~/.ranger' install: compile + @if [ '$(DEST)' == '/ranger' ]; then \ + echo 'Cannot find a suitable destination for the files.'; \ + false; \ + fi @echo "Installing..." cp ranger.py $(PREFIX)/bin/ranger cp -ruT ranger $(DEST) -- cgit 1.4.1-2-gfad0 From 2144cf26b899ce42b5aa5547aff63be5825e62be Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Mar 2010 21:21:58 +0100 Subject: incremented verison number --- Makefile | 2 +- README | 4 ++-- doc/pydoc/ranger.html | 4 ++-- ranger/__init__.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 83ba7ca0..96be5b71 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = ranger -VERSION = 1.0.3 +VERSION = 1.0.4 PYTHON ?= python DOCDIR ?= doc/pydoc PREFIX ?= /usr/local diff --git a/README b/README index 24760f36..b97b5ed7 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Ranger v.1.0.3 +Ranger v.1.0.4 ============== Ranger @@ -27,7 +27,7 @@ About * Author: Roman Zimbelmann * Email: romanz@lavabit.com * Git repo: http://git.savannah.gnu.org/cgit/ranger.git -* Version: 1.0.3 +* Version: 1.0.4 Features diff --git a/doc/pydoc/ranger.html b/doc/pydoc/ranger.html index 8a51d877..cba764cb 100644 --- a/doc/pydoc/ranger.html +++ b/doc/pydoc/ranger.html @@ -6,7 +6,7 @@  
ranger (version 1.0.4)
 
- 
ranger (version 1.0.3)
index
/home/hut/ranger/ranger/__init__.py

Ranger - file browser for the unix terminal

@@ -56,7 +56,7 @@ Has the same arguments as print() in python3. __email__ = 'romanz@lavabit.com'
__license__ = 'GPL3'
__maintainer__ = 'Roman Zimbelmann'
-__version__ = '1.0.3'
+__version__ = '1.0.4'
arg = {'cd_after_exit': False, 'debug': False, 'flags'...n': False, 'confdir': '~/.ranger', 'targets': []}

diff --git a/ranger/__init__.py b/ranger/__init__.py index 21825ea8..e2a4983d 100644 --- a/ranger/__init__.py +++ b/ranger/__init__.py @@ -20,7 +20,7 @@ import sys from ranger.ext.openstruct import OpenStruct __license__ = 'GPL3' -__version__ = '1.0.3' +__version__ = '1.0.4' __credits__ = 'Roman Zimbelmann' __author__ = 'Roman Zimbelmann' __maintainer__ = 'Roman Zimbelmann' -- cgit 1.4.1-2-gfad0 From 423ce88a4b4b139d64c5258b9ac64a0c3c0b3854 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 14 Mar 2010 00:27:01 +0100 Subject: make install: chmod after copying --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 96be5b71..60de6487 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,8 @@ install: compile @echo "Installing..." cp ranger.py $(PREFIX)/bin/ranger cp -ruT ranger $(DEST) + chmod 755 $(PREFIX)/bin/ranger + chmod -R +rX $(DEST) @echo '--------------------------------------' @echo 'Finished.' @echo 'If you use BASH or ZSH, you can activate an extra feature now:' -- cgit 1.4.1-2-gfad0 From fde932f216932009fc7cdb1b362012651c03468f Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 21 Mar 2010 04:36:03 +0100 Subject: make test: don't use "clean" before "test" --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 60de6487..83ee1e3d 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ cleandoc: clean: find . -regex .\*.py[co]$ | xargs rm -f -- -test: clean +test: ./all_tests.py edit: -- cgit 1.4.1-2-gfad0 From 1295513fdf03f442881c9a0018ee95678822ff1b Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 22 Mar 2010 20:40:44 +0100 Subject: make compile: create pyc files too --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 83ee1e3d..fb71a72a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = 1.0.4 PYTHON ?= python DOCDIR ?= doc/pydoc PREFIX ?= /usr/local -PYTHONOPTIMIZE ?= 1 +PYTHONOPTIMIZE ?= 2 CWD = $(shell pwd) EDITOR ?= vim DEST ?= $(shell $(PYTHON) -c 'import sys; sys.stdout.write( \ @@ -30,6 +30,7 @@ all: test install compile: clean @echo 'Compiling...' + python -m compileall -q ranger PYTHONOPTIMIZE=$(PYTHONOPTIMIZE) python -m compileall -q ranger doc: cleandoc -- cgit 1.4.1-2-gfad0 From cec158dac22bc14dd298b8136ab50b6e4e9ced4e Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 22 Mar 2010 20:58:30 +0100 Subject: make clean: safer method of cleaning --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fb71a72a..ac7b0502 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ cleandoc: test -d $(DOCDIR) && rm -f -- $(DOCDIR)/*.html clean: - find . -regex .\*.py[co]$ | xargs rm -f -- + find . -regex [^\s]\*.py[co]$ | xargs rm -f -- test: ./all_tests.py -- cgit 1.4.1-2-gfad0