mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-18 20:50:10 +01:00
Fix l10n broken in venvs
This commit is contained in:
parent
92556e4cd0
commit
ada36a3ee5
25
setup.py
25
setup.py
@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@ -50,30 +49,20 @@ class InstallWithCompile(install):
|
|||||||
|
|
||||||
|
|
||||||
def get_data_files():
|
def get_data_files():
|
||||||
# workaround issue on OSX or --user installs, where sys.prefix is not an installable location
|
|
||||||
if os.access(sys.prefix, os.W_OK | os.X_OK):
|
|
||||||
data_prefix = sys.prefix
|
|
||||||
else:
|
|
||||||
data_prefix = '.'
|
|
||||||
|
|
||||||
data_files = []
|
data_files = []
|
||||||
with open('MANIFEST.in') as fp:
|
with open('MANIFEST.in') as fp:
|
||||||
data = fp.read()
|
data = fp.read()
|
||||||
|
|
||||||
data_files.append(
|
data_files.append(
|
||||||
(
|
('share/doc/fdroidserver/examples', re.findall(r'include (examples/.*)', data))
|
||||||
data_prefix + '/share/doc/fdroidserver/examples',
|
)
|
||||||
['buildserver/config.buildserver.yml']
|
data_files.append(
|
||||||
+ re.findall(r'include (examples/.*)', data),
|
('share/doc/fdroidserver/examples', ['buildserver/config.buildserver.yml'])
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for f in re.findall(
|
for d in re.findall(r'include (locale/.*)/fdroidserver\.po', data):
|
||||||
r'include (locale/[a-z][a-z][a-zA-Z_]*/LC_MESSAGES/fdroidserver\.)po', data
|
data_files.append(('share/' + d, [d + '/fdroidserver.mo']))
|
||||||
):
|
|
||||||
f += 'mo'
|
|
||||||
d = os.path.join(data_prefix, 'share', os.path.dirname(f))
|
|
||||||
data_files.append((d, [f]))
|
|
||||||
return data_files
|
return data_files
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user