2011-09-01 14:21:47 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-Babel
|
|
|
|
#
|
2022-06-04 18:12:28 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2011-09-01 14:21:47 +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.
|
2011-09-01 15:48:04 +00:00
|
|
|
|
2018-12-04 13:15:20 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-01 14:21:47 +00:00
|
|
|
#
|
|
|
|
|
2011-09-01 15:48:04 +00:00
|
|
|
|
2021-10-03 17:50:08 +00:00
|
|
|
#
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
|
|
|
|
2017-04-04 05:55:30 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2017-05-06 04:29:44 +00:00
|
|
|
%define oldpython python
|
2011-09-01 14:21:47 +00:00
|
|
|
Name: python-Babel
|
2022-06-18 13:04:25 +00:00
|
|
|
Version: 2.10.3
|
2013-09-30 07:21:25 +00:00
|
|
|
Release: 0
|
2011-09-01 14:21:47 +00:00
|
|
|
Summary: Internationalization utilities
|
2011-09-01 14:27:28 +00:00
|
|
|
License: BSD-3-Clause
|
2018-05-07 13:49:29 +00:00
|
|
|
URL: http://babel.pocoo.org/
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/B/Babel/Babel-%{version}.tar.gz
|
2017-10-06 06:37:39 +00:00
|
|
|
BuildRequires: %{python_module freezegun}
|
2017-04-04 05:55:30 +00:00
|
|
|
BuildRequires: %{python_module py >= 1.4.14}
|
|
|
|
BuildRequires: %{python_module pytest >= 2.3.5}
|
2020-01-13 15:31:08 +00:00
|
|
|
BuildRequires: %{python_module pytz >= 2015.7}
|
2018-05-07 13:49:29 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-04-04 05:55:30 +00:00
|
|
|
BuildRequires: fdupes
|
2021-10-03 17:50:08 +00:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
2020-01-13 15:31:08 +00:00
|
|
|
Requires: python-pytz >= 2015.7
|
2021-10-03 17:50:08 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
Requires: alts
|
2021-10-06 07:35:26 +00:00
|
|
|
BuildRequires: alts
|
2021-10-03 17:50:08 +00:00
|
|
|
%else
|
2017-04-04 05:55:30 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-05-11 21:42:06 +00:00
|
|
|
Requires(postun):update-alternatives
|
2021-10-03 17:50:08 +00:00
|
|
|
%endif
|
2018-05-07 13:49:29 +00:00
|
|
|
BuildArch: noarch
|
2017-05-06 04:29:44 +00:00
|
|
|
%ifpython2
|
|
|
|
Obsoletes: %{oldpython}-babel < %{version}
|
|
|
|
Provides: %{oldpython}-babel = %{version}
|
|
|
|
%endif
|
2021-03-05 12:44:11 +00:00
|
|
|
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
|
2017-05-06 04:29:44 +00:00
|
|
|
Provides: python3-babel = %{version}
|
|
|
|
Obsoletes: python3-babel < %{version}
|
|
|
|
%endif
|
2017-04-04 05:55:30 +00:00
|
|
|
%python_subpackages
|
2011-09-01 14:21:47 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A collection of tools for internationalizing Python applications.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n Babel-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-04-04 05:55:30 +00:00
|
|
|
%python_build
|
2011-09-01 14:21:47 +00:00
|
|
|
|
|
|
|
%install
|
2017-04-04 05:55:30 +00:00
|
|
|
%python_install
|
2021-09-19 17:36:52 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pybabel
|
2019-06-04 07:58:52 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2011-09-01 14:21:47 +00:00
|
|
|
|
2013-09-30 07:21:25 +00:00
|
|
|
%check
|
2019-06-04 07:58:52 +00:00
|
|
|
%pytest
|
2013-09-30 09:00:55 +00:00
|
|
|
|
|
|
|
%pre
|
|
|
|
# Since /usr/bin/pybabel became ghosted to be used with update-alternatives, we have to get rid
|
|
|
|
# of the old binary resulting from the non-update-alternativies-ified package:
|
2014-11-14 15:30:00 +00:00
|
|
|
[ -h %{_bindir}/pybabel ] || rm -f %{_bindir}/pybabel
|
2021-10-03 17:50:08 +00:00
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative pybabel
|
2021-09-19 17:36:52 +00:00
|
|
|
|
2013-09-30 09:00:55 +00:00
|
|
|
%post
|
2017-04-04 05:55:30 +00:00
|
|
|
%python_install_alternative pybabel
|
2013-09-30 09:00:55 +00:00
|
|
|
|
2015-05-28 13:13:36 +00:00
|
|
|
%postun
|
2017-04-04 05:55:30 +00:00
|
|
|
%python_uninstall_alternative pybabel
|
2013-09-30 07:21:25 +00:00
|
|
|
|
2017-04-04 05:55:30 +00:00
|
|
|
%files %{python_files}
|
2018-05-07 13:49:29 +00:00
|
|
|
%license LICENSE
|
2022-06-04 18:12:28 +00:00
|
|
|
%doc CHANGES.rst
|
2017-04-04 05:55:30 +00:00
|
|
|
%python_alternative %{_bindir}/pybabel
|
|
|
|
%{python_sitelib}/babel
|
|
|
|
%{python_sitelib}/Babel-%{version}-py%{python_version}.egg-info
|
2011-09-01 14:21:47 +00:00
|
|
|
|
|
|
|
%changelog
|