diff options
author | Catalin Marinas <catalin.marinas@gmail.com> | 2009-10-28 22:05:34 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@gmail.com> | 2009-10-28 22:05:34 +0000 |
commit | bbd0c1f47a633740ce467e11113c1edf5df52829 (patch) | |
tree | 1992b9e904bf91736bbff058ed3cd4b02b8c4305 | |
parent | 655a39775cad71e4184563c24771306b34b4a470 (diff) | |
parent | 0eff9b85622b9e80502911431aaab9e8dc4c1bb8 (diff) | |
download | stgit-bbd0c1f47a633740ce467e11113c1edf5df52829.tar.gz |
Merge branch 'stable'
-rw-r--r-- | Makefile | 21 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rwxr-xr-x | setup.py | 17 |
3 files changed, 21 insertions, 19 deletions
@@ -4,20 +4,10 @@ PYTHON ?= python TEST_PATCHES ?= .. -all: build +all: $(PYTHON) setup.py build -build: stgit/commands/cmdlist.py stgit-completion.bash - -ALL_PY = $(shell find stgit -name '*.py') - -stgit/commands/cmdlist.py: $(ALL_PY) - $(PYTHON) stg-build --py-cmd-list > $@ - -stgit-completion.bash: $(ALL_PY) - $(PYTHON) stg-build --bash-completion > $@ - -install: build +install: $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force doc: @@ -29,10 +19,11 @@ install-doc: install-html: $(MAKE) -C Documentation install-html -test: build +test: + $(PYTHON) setup.py build cd t && $(MAKE) all -test_patches: build +test_patches: for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \ stg goto $$patch && $(MAKE) test || break; \ done @@ -53,5 +44,5 @@ tags: TAGS: ctags -e -R stgit/* -.PHONY: all build install doc install-doc install-html test test_patches \ +.PHONY: all install doc install-doc install-html test test_patches \ clean tags TAGS @@ -1,2 +1,2 @@ [install] -prefix: ~ +prefix: /usr @@ -4,6 +4,7 @@ import sys, glob, os from distutils.core import setup from stgit import version +from stgit import commands, completion def __version_to_list(version): """Convert a version string to a list of numbers or strings @@ -63,14 +64,24 @@ def __run_setup(): ]) # Check the minimum versions required -if sys.argv[1] in ['install', 'build']: - __check_python_version() - __check_git_version() +__check_python_version() +__check_git_version() # ensure readable template files old_mask = os.umask(0022) version.write_builtin_version() + +# generate the python command list +f = file('stgit/commands/cmdlist.py', 'w') +commands.py_commands(commands.get_commands(allow_cached = False), f) +f.close() + +# generate the bash completion script +f = file('stgit-completion.bash', 'w') +completion.write_completion(f) +f.close() + __run_setup() # restore the old mask |