Update setup.py and .gitignore

This commit is contained in:
André Apitzsch 2017-10-07 17:24:37 +02:00
parent 372c1f9941
commit 83d3635244
2 changed files with 7 additions and 4 deletions

4
.gitignore vendored
View File

@ -12,12 +12,16 @@ data/org.gajim.Gajim.appdata.xml
data/org.gajim.Gajim.desktop data/org.gajim.Gajim.desktop
libtool libtool
po/.intltool-merge-cache po/.intltool-merge-cache
data/gajim-remote.desktop
po/gajim.pot po/gajim.pot
po/POTFILES po/POTFILES
po/stamp-it po/stamp-it
stamp-h1 stamp-h1
Makefile Makefile
__pycache__/ __pycache__/
build/
dist/
gajim.egg-info/
src/gtk/ src/gtk/
win/_build_root win/_build_root

View File

@ -56,7 +56,7 @@ def build_trans(build_cmd):
data_files = build_cmd.distribution.data_files data_files = build_cmd.distribution.data_files
for lang in ALL_LINGUAS: for lang in ALL_LINGUAS:
po_file = os.path.join('po', lang + '.po') po_file = os.path.join('po', lang + '.po')
mo_file = os.path.join(cwd, 'mo', lang, 'LC_MESSAGES', 'gajim.mo') mo_file = os.path.join(cwd, 'build', 'mo', lang, 'LC_MESSAGES', 'gajim.mo')
mo_dir = os.path.dirname(mo_file) mo_dir = os.path.dirname(mo_file)
if not (os.path.isdir(mo_dir) or os.path.islink(mo_dir)): if not (os.path.isdir(mo_dir) or os.path.islink(mo_dir)):
os.makedirs(mo_dir) os.makedirs(mo_dir)
@ -84,7 +84,7 @@ def build_man(build_cmd):
data_files = build_cmd.distribution.data_files data_files = build_cmd.distribution.data_files
for man in ['gajim.1', 'gajim-history-manager.1', 'gajim-remote.1']: for man in ['gajim.1', 'gajim-history-manager.1', 'gajim-remote.1']:
filename = os.path.join('data', man) filename = os.path.join('data', man)
newdir = os.path.join(cwd, 'man') newdir = os.path.join(cwd, 'build', 'man')
if not (os.path.isdir(newdir) or os.path.islink(newdir)): if not (os.path.isdir(newdir) or os.path.islink(newdir)):
os.makedirs(newdir) os.makedirs(newdir)
@ -103,9 +103,8 @@ def build_man(build_cmd):
f_out.writelines(f_in) f_out.writelines(f_in)
log.info('Compiling %s >> %s', filename, man_file_gz) log.info('Compiling %s >> %s', filename, man_file_gz)
src = cwd + '/man' + '/' + man + '.gz'
target = 'share/man/man1' target = 'share/man/man1'
data_files.append((target, [src])) data_files.append((target, [man_file_gz]))
def build_intl(build_cmd): def build_intl(build_cmd):