Fix installation for non EOLE developpers
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.
This commit is contained in:
parent
e6c3104681
commit
28d053430b
7
Makefile
7
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
|
||||
|
3
setup.py
3
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:
|
||||
|
Loading…
Reference in New Issue
Block a user