2019-04-02 10:57:20 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-translation-finder
|
|
|
|
#
|
2025-05-12 05:58:25 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2021-02-21 10:00:36 +00:00
|
|
|
# Copyright (c) 2019-2021 Matthias Fehring <buschmann23@opensuse.org>
|
2019-04-02 10:57:20 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2019-04-02 11:01:31 +00:00
|
|
|
|
|
|
|
%define modname translation-finder
|
2019-04-02 10:57:20 +00:00
|
|
|
Name: python-translation-finder
|
2024-11-20 17:49:16 +00:00
|
|
|
Version: 2.19
|
2019-04-02 10:57:20 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Translation Files Finder
|
|
|
|
License: GPL-3.0-or-later
|
|
|
|
URL: https://github.com/WeblateOrg/translation-finder
|
2019-05-06 08:48:47 +00:00
|
|
|
# test_data/linked has to be symlink, hance using github tar ball
|
2021-02-21 10:00:36 +00:00
|
|
|
Source: https://github.com/WeblateOrg/translation-finder/archive/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
2024-11-14 14:05:59 +00:00
|
|
|
BuildRequires: %{python_module charset-normalizer}
|
2025-05-12 05:58:25 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-04-02 10:57:20 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-07-22 12:33:54 +00:00
|
|
|
BuildRequires: %{python_module ruamel.yaml}
|
2019-04-02 11:01:31 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module twine}
|
2021-03-18 08:12:58 +00:00
|
|
|
BuildRequires: %{python_module weblate-language-data >= 2021.2}
|
2025-05-12 05:58:25 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-04-02 11:01:31 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2024-11-14 14:05:59 +00:00
|
|
|
Requires: python-charset-normalizer
|
2019-07-22 12:33:54 +00:00
|
|
|
Requires: python-ruamel.yaml
|
2021-03-18 08:12:58 +00:00
|
|
|
Requires: python-weblate-language-data >= 2021.2
|
2019-04-02 10:57:20 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-11-14 14:05:59 +00:00
|
|
|
Requires(postun): update-alternatives
|
2019-04-02 10:57:20 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
A translation file finder for Weblate, translation tool with tight version control integration.
|
|
|
|
|
|
|
|
%prep
|
2019-04-02 11:01:31 +00:00
|
|
|
%setup -q -n %{modname}-%{version}
|
2020-04-15 09:46:54 +00:00
|
|
|
sed -i -e '/pytest-runner/d' setup.py
|
2019-04-02 10:57:20 +00:00
|
|
|
|
|
|
|
%build
|
2025-05-12 05:58:25 +00:00
|
|
|
%pyproject_wheel
|
2019-04-02 10:57:20 +00:00
|
|
|
|
|
|
|
%install
|
2025-05-12 05:58:25 +00:00
|
|
|
%pyproject_install
|
2019-04-02 10:57:20 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/weblate-discover
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2021-02-21 10:00:36 +00:00
|
|
|
# remove test data
|
|
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/translation_finder/test_data
|
2019-04-02 10:57:20 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative weblate-discover
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative weblate-discover
|
|
|
|
|
|
|
|
%check
|
2019-05-06 08:48:47 +00:00
|
|
|
%pytest
|
2019-04-02 10:57:20 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc CHANGES.rst README.rst
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/weblate-discover
|
2024-11-14 14:05:59 +00:00
|
|
|
%{python_sitelib}/translation_finder
|
2025-05-12 05:58:25 +00:00
|
|
|
%{python_sitelib}/translation_finder-%{version}.dist-info
|
2019-04-02 10:57:20 +00:00
|
|
|
|
|
|
|
%changelog
|