use python3 for build, reomve bzr version, fall back to date without git

This commit is contained in:
j 2018-01-18 11:09:14 +01:00
parent 43393af132
commit c4a91f46ed

View file

@ -1,11 +1,10 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#vim: et:ts=4:sw=4:sts=4
from __future__ import print_function
import datetime
import json
import os
import ox
import re
import shutil
import subprocess
@ -13,6 +12,9 @@ import sys
import tarfile
import time
import ox
def get_version():
if os.path.exists('../../.git'):
revision = subprocess.Popen(
@ -20,9 +22,7 @@ def get_version():
).communicate()[0].strip().decode('utf-8')
revision = int(revision) - 94
else:
revision = subprocess.Popen(
['bzr', 'revno'], stdout=subprocess.PIPE
).communicate()[0].strip().decode('utf-8')
revision = 'x+' + datetime.datetime.now().strftime('%Y%m%d%H%M')
return '0.1.%s' % revision
def build_oxjs(downloads=False, geo=False):