diff --git a/Makefile b/Makefile index 25c8db1..fce5f8d 100644 --- a/Makefile +++ b/Makefile @@ -56,13 +56,16 @@ install-lang: build-lang $(INSTALL_DIR) $(TRADUC_DEST) $(call install_translation, $(TRADUC_DIR)) -install: install-lang +install: version.in install-lang python setup.py install --no-compile $(PYTHON_OPTS) # List in .PHONY to force generation at each call version.in: @if test -n $(VERSION) ; then \ - echo $(VERSION) > $(VERSION_FILE) ; \ + echo -n $(VERSION) > $(VERSION_FILE) ; \ + fi + @if test ! -s $(VERSION_FILE); then \ + echo -n '0.0-dev' > $(VERSION_FILE); \ fi dist: version.in diff --git a/setup.py b/setup.py index 5f4d89c..96c9e6b 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,12 @@ from distutils.core import setup import os +import subprocess def fetch_version(): """Get version from version.in or latest git tag""" version_file='version.in' - version = "0.0" + version = "0.0-dev" git_last_tag_cmd = ['git', 'describe', '--tags', '--abbrev=0'] try: