From ada36a3ee504ab11fd03fd338925712106a1ad52 Mon Sep 17 00:00:00 2001 From: FestplattenSchnitzel Date: Mon, 8 Aug 2022 18:06:30 +0200 Subject: [PATCH 1/3] Fix l10n broken in venvs --- setup.py | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index 741b6877..0cc4e88c 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -import os import re import subprocess import sys @@ -50,30 +49,20 @@ class InstallWithCompile(install): 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 = [] with open('MANIFEST.in') as fp: data = fp.read() data_files.append( - ( - data_prefix + '/share/doc/fdroidserver/examples', - ['buildserver/config.buildserver.yml'] - + re.findall(r'include (examples/.*)', data), - ) + ('share/doc/fdroidserver/examples', re.findall(r'include (examples/.*)', data)) + ) + data_files.append( + ('share/doc/fdroidserver/examples', ['buildserver/config.buildserver.yml']) ) - for f in re.findall( - r'include (locale/[a-z][a-z][a-zA-Z_]*/LC_MESSAGES/fdroidserver\.)po', data - ): - f += 'mo' - d = os.path.join(data_prefix, 'share', os.path.dirname(f)) - data_files.append((d, [f])) + for d in re.findall(r'include (locale/.*)/fdroidserver\.po', data): + data_files.append(('share/' + d, [d + '/fdroidserver.mo'])) + return data_files From beb49eea48b97ee734d49112e9bbccd8e0a8f7cd Mon Sep 17 00:00:00 2001 From: FestplattenSchnitzel Date: Sun, 31 Jul 2022 21:52:54 +0200 Subject: [PATCH 2/3] Stop packaging makebuildserver script makebuildserver requires this repository to be cloned locally. Fixes #1014. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 0cc4e88c..0f6e9939 100755 --- a/setup.py +++ b/setup.py @@ -80,7 +80,6 @@ setup( url='https://f-droid.org', license='AGPL-3.0', packages=['fdroidserver', 'fdroidserver.asynchronousfilereader'], - scripts=['makebuildserver'], entry_points={'console_scripts': ['fdroid=fdroidserver.__main__:main']}, data_files=get_data_files(), python_requires='>=3.9', From ac9b20f6ab6702750c0914ca5d6579da5952fe62 Mon Sep 17 00:00:00 2001 From: FestplattenSchnitzel Date: Thu, 16 Feb 2023 21:52:26 +0100 Subject: [PATCH 3/3] gitlab-ci: check that localization works when installed with pip --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4672e077..63b7c97c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -159,6 +159,9 @@ ubuntu_jammy_pip: - export PATH=$PATH:$ANDROID_HOME/build-tools/33.0.0 - fdroid=`which fdroid` ./tests/run-tests + # check localization was properly installed + - LANGUAGE='de' fdroid --help | grep 'Gültige Befehle sind' + # test installation process on a bleeding edge distro with pip arch_pip_install: