2018-05-15 20:04:18 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-titlecase
|
|
|
|
#
|
2025-06-04 06:18:44 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-05-15 20:04:18 +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.
|
|
|
|
|
2018-12-04 14:09:59 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2018-05-15 20:04:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-titlecase
|
2023-10-24 14:02:10 +00:00
|
|
|
Version: 2.4.1
|
2018-05-15 20:04:18 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python library to capitalize strings
|
2018-12-04 14:09:59 +00:00
|
|
|
License: MIT
|
2018-05-15 20:04:18 +00:00
|
|
|
Group: Development/Languages/Python
|
2020-05-18 13:02:50 +00:00
|
|
|
URL: https://github.com/ppannuto/python-titlecase
|
2018-05-15 20:04:18 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/titlecase/titlecase-%{version}.tar.gz
|
2025-06-04 06:18:44 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2020-07-24 14:06:37 +00:00
|
|
|
BuildRequires: %{python_module regex >= 2020.4.4}
|
2023-10-24 14:02:10 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
2018-05-15 20:04:18 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-06-04 06:18:44 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-05-15 20:04:18 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-07-24 14:06:37 +00:00
|
|
|
Requires: python-regex >= 2020.4.4
|
2020-05-18 13:02:50 +00:00
|
|
|
Requires(post): update-alternatives
|
2025-06-04 06:18:44 +00:00
|
|
|
Requires(postun): update-alternatives
|
2020-05-18 13:02:50 +00:00
|
|
|
BuildArch: noarch
|
2018-05-15 20:04:18 +00:00
|
|
|
# SECTION test requirements
|
2021-01-13 14:45:27 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-05-15 20:04:18 +00:00
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
This filter changes all words to Title Caps, and attempts to be
|
|
|
|
clever about SMALL words like a/an/the in the input.
|
|
|
|
|
|
|
|
The list of "SMALL words" which are not capped comes from the New
|
|
|
|
York Times Manual of Style, plus some others like 'vs' and 'v'.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n titlecase-%{version}
|
|
|
|
|
|
|
|
%build
|
2025-06-04 06:18:44 +00:00
|
|
|
%pyproject_wheel
|
2018-05-15 20:04:18 +00:00
|
|
|
|
|
|
|
%install
|
2025-06-04 06:18:44 +00:00
|
|
|
%pyproject_install
|
2020-05-18 13:02:50 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/titlecase
|
2018-05-15 20:04:18 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2021-01-13 14:45:27 +00:00
|
|
|
%pytest titlecase/tests.py
|
2018-05-15 20:04:18 +00:00
|
|
|
|
2020-05-18 13:02:50 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative titlecase
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative titlecase
|
|
|
|
|
2018-05-15 20:04:18 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
2020-05-18 13:02:50 +00:00
|
|
|
%python_alternative %{_bindir}/titlecase
|
2023-10-24 14:02:10 +00:00
|
|
|
%{python_sitelib}/titlecase
|
|
|
|
%{python_sitelib}/titlecase-%{version}*-info
|
2018-05-15 20:04:18 +00:00
|
|
|
|
|
|
|
%changelog
|