From 28d053430b02b9c78c7f1631b9e8fa4598575213 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Thu, 18 Jul 2013 12:23:50 +0200 Subject: [PATCH] Fix installation for non EOLE developpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The version is extracted from “relase/” tags and they exists only on EOLE git repository. * Makefile (install): Depends on version file. (version.in): Fake dev version for developpers without devel release tags * setup.py: Add missing subprocess import. (fetch_version): Use same fallback version as Makefile. --- Makefile | 7 +++++-- setup.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) 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: