Include mo files in pip installations

This commit is contained in:
Yen Chi Hsuan 2015-12-05 04:37:24 +08:00
parent 840f6d04b6
commit 8b92b7fb8d
2 changed files with 5 additions and 0 deletions

View File

@ -5,3 +5,4 @@ include youtube-dl.bash-completion
include youtube-dl.fish
include youtube-dl.1
recursive-include docs Makefile conf.py *.rst
include share/locale/*/LC_MESSAGES/youtube_dl.mo

View File

@ -6,6 +6,7 @@ from __future__ import print_function
import os.path
import warnings
import sys
import glob
import io
import zipfile
@ -64,6 +65,9 @@ else:
('share/doc/youtube_dl', ['README.txt']),
('share/man/man1', ['youtube-dl.1'])
]
for mo_file in glob.glob('share/locale/*/LC_MESSAGES/youtube_dl.mo'):
files_spec.append((os.path.dirname(mo_file), [mo_file]))
root = os.path.dirname(os.path.abspath(__file__))
data_files = []
for dirname, files in files_spec: