mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-22 13:02:50 +00:00
Make stdout a string instead of bytes, update AppVeyor config
This commit is contained in:
parent
6e6f6ddf2d
commit
71f000a5c8
@ -90,7 +90,7 @@ class Builder(object):
|
||||
|
||||
Return text from stdout.
|
||||
"""
|
||||
proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||
proc = Popen(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
||||
output, error = proc.communicate()
|
||||
code = proc.wait()
|
||||
if code != 0:
|
||||
@ -280,9 +280,9 @@ class Builder(object):
|
||||
tag = '0.0.0'
|
||||
revision = '0'
|
||||
else:
|
||||
tag, revision = lines[-1].decode('utf-8').split()
|
||||
tag, revision = lines[-1].split()
|
||||
output = self._bzr('log', self.branch_path, ['--line', '-r', '-1'], 'Error running bzr log')
|
||||
revision = output.decode('utf-8').split(':')[0]
|
||||
revision = output.split(':')[0]
|
||||
self.version = '{tag}-bzr{revision}'.format(tag=tag, revision=revision)
|
||||
# Write the version to the version file
|
||||
with open(os.path.join(self.dist_path, '.version'), 'w') as version_file:
|
||||
@ -295,7 +295,7 @@ class Builder(object):
|
||||
self._print('Copying default theme...')
|
||||
source = os.path.join(self.source_path, 'core', 'lib', 'json')
|
||||
dest = os.path.join(self.dist_path, 'core', 'lib', 'json')
|
||||
for root, dirs, files in os.walk(source):
|
||||
for root, _, files in os.walk(source):
|
||||
for filename in files:
|
||||
if filename.endswith('.json'):
|
||||
dest_path = os.path.join(dest, root[len(source) + 1:])
|
||||
@ -312,7 +312,7 @@ class Builder(object):
|
||||
self._print('Copying plugins...')
|
||||
source = os.path.join(self.source_path, 'plugins')
|
||||
dest = os.path.join(self.dist_path, 'plugins')
|
||||
for root, dirs, files in os.walk(source):
|
||||
for root, _, files in os.walk(source):
|
||||
for filename in files:
|
||||
if not filename.endswith('.pyc'):
|
||||
dest_path = os.path.join(dest, root[len(source) + 1:])
|
||||
@ -328,7 +328,7 @@ class Builder(object):
|
||||
self._print('Copying media player...')
|
||||
source = os.path.join(self.source_path, 'core', 'ui', 'media')
|
||||
dest = os.path.join(self.dist_path, 'core', 'ui', 'media')
|
||||
for root, dirs, files in os.walk(source):
|
||||
for root, _, files in os.walk(source):
|
||||
for filename in files:
|
||||
if not filename.endswith('.pyc'):
|
||||
dest_path = os.path.join(dest, root[len(source) + 1:])
|
||||
@ -373,18 +373,18 @@ class Builder(object):
|
||||
Compile the translations for Qt.
|
||||
"""
|
||||
self._print('Compiling translations...')
|
||||
files = os.listdir(self.i18n_path)
|
||||
if not os.path.exists(os.path.join(self.dist_path, 'i18n')):
|
||||
os.makedirs(os.path.join(self.dist_path, 'i18n'))
|
||||
for file in files:
|
||||
if file.endswith('.ts'):
|
||||
self._print_verbose('... %s', file)
|
||||
source_path = os.path.join(self.i18n_path, file)
|
||||
dest_path = os.path.join(self.dist_path, 'i18n', file.replace('.ts', '.qm'))
|
||||
for filename in os.listdir(self.i18n_path):
|
||||
if filename.endswith('.ts'):
|
||||
self._print_verbose('... %s', filename)
|
||||
source_path = os.path.join(self.i18n_path, filename)
|
||||
dest_path = os.path.join(self.dist_path, 'i18n', filename.replace('.ts', '.qm'))
|
||||
self._run_command((self.lrelease_exe, '-compress', '-silent', source_path, '-qm', dest_path),
|
||||
err_msg='Error running lconvert on %s' % source_path)
|
||||
self._print('Copying Qt translation files...')
|
||||
for filename in os.listdir(self.get_qt_translations_path()):
|
||||
source = self.get_qt_translations_path()
|
||||
for filename in os.listdir(source):
|
||||
if filename.startswith('qt_') and filename.endswith('.qm'):
|
||||
self._print_verbose('... %s', filename)
|
||||
copy(os.path.join(source, filename), os.path.join(self.dist_path, 'i18n', filename))
|
||||
|
@ -1,7 +1,7 @@
|
||||
[executables]
|
||||
innosetup = %(progfiles)s\Inno Setup 5\ISCC.exe
|
||||
sphinx = %(pyroot)s\Scripts\sphinx-build.exe
|
||||
pyinstaller = %(here)s\..\..\pyinstaller-develop\pyinstaller.py
|
||||
pyinstaller = %(here)s\..\..\PyInstaller-3.2\pyinstaller.py
|
||||
vcbuild = %(progfiles)s\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe
|
||||
htmlhelp = %(progfiles)s\HTML Help Workshop\hhc.exe
|
||||
psvince = %(here)s\psvince.dll
|
||||
|
Loading…
Reference in New Issue
Block a user