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
2 changed files with 7 additions and 3 deletions
7
Makefile
7
Makefile
|
@ -56,13 +56,16 @@ install-lang: build-lang
|
||||||
$(INSTALL_DIR) $(TRADUC_DEST)
|
$(INSTALL_DIR) $(TRADUC_DEST)
|
||||||
$(call install_translation, $(TRADUC_DIR))
|
$(call install_translation, $(TRADUC_DIR))
|
||||||
|
|
||||||
install: install-lang
|
install: version.in install-lang
|
||||||
python setup.py install --no-compile $(PYTHON_OPTS)
|
python setup.py install --no-compile $(PYTHON_OPTS)
|
||||||
|
|
||||||
# List in .PHONY to force generation at each call
|
# List in .PHONY to force generation at each call
|
||||||
version.in:
|
version.in:
|
||||||
@if test -n $(VERSION) ; then \
|
@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
|
fi
|
||||||
|
|
||||||
dist: version.in
|
dist: version.in
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -3,11 +3,12 @@
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
def fetch_version():
|
def fetch_version():
|
||||||
"""Get version from version.in or latest git tag"""
|
"""Get version from version.in or latest git tag"""
|
||||||
version_file='version.in'
|
version_file='version.in'
|
||||||
version = "0.0"
|
version = "0.0-dev"
|
||||||
git_last_tag_cmd = ['git', 'describe', '--tags', '--abbrev=0']
|
git_last_tag_cmd = ['git', 'describe', '--tags', '--abbrev=0']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue