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
This commit is contained in:
parent
f336dec7b6
commit
2d56c9ec77
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 27 20:56:49 UTC 2023 - Josef Reidinger <jreidinger@suse.com>
|
||||
|
||||
- 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 <yarunachalam@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user