From 2d56c9ec771f993611b1df05d7e66953b25977de6a40cf81bd77be7cb7297230 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 4 May 2023 12:54:25 +0000 Subject: [PATCH] Accepting request 1084592 from home:jreidinger:branches:devel:languages:python - Split python-langtable-data subpackage to hold XML data that package use it saves some spaces and allows usage of that XML without python dependency OBS-URL: https://build.opensuse.org/request/show/1084592 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-langtable?expand=0&rev=14 --- python-langtable.changes | 7 +++++++ python-langtable.spec | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/python-langtable.changes b/python-langtable.changes index fc74932..c1504ea 100644 --- a/python-langtable.changes +++ b/python-langtable.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 27 20:56:49 UTC 2023 - Josef Reidinger + +- Split python-langtable-data subpackage to hold XML data that + package use it saves some spaces and allows usage of that XML + without python dependency + ------------------------------------------------------------------- Tue Dec 6 03:52:27 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-langtable.spec b/python-langtable.spec index fbb1a5c..5fa07b2 100644 --- a/python-langtable.spec +++ b/python-langtable.spec @@ -1,7 +1,7 @@ # # spec file for package python-langtable # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -34,6 +34,7 @@ BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: libxml2-tools BuildRequires: python-rpm-macros +Requires: python-langtable-data = %{version} BuildArch: noarch %python_subpackages @@ -44,16 +45,26 @@ example, guess the territory and the keyboard layout if the language is known or guess the language and keyboard layout if the territory is already known. +%package -n python-langtable-data +Summary: XML data to map various locale settingsn and its relations + +%description -n python-langtable-data +Provides XML data used by python-langtable. Packaged separately so it is not affected +by more python target versions and also it can be used indenpendently. + %prep %autosetup -n langtable-%{version} %build -sed -i -e "s,_DATADIR = .*,_DATADIR = '%{python3_sitelib}/langtable'," langtable/langtable.py %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +mkdir -p %{buildroot}/%{_datadir}/langtable/data +# here it needs to copy xml as sadly it is done multiple times and we want to get rid of all data from python +# flavors, so all python version can share same xml data +%python_expand mv %{buildroot}%{$python_sitelib}/langtable/data/* %{buildroot}/%{_datadir}/langtable/data %check (cd langtable; python3 langtable.py) @@ -69,4 +80,7 @@ done %doc README ChangeLog %{python_sitelib}/* +%files -n python-langtable-data +%{_datadir}/langtable + %changelog