2019-03-06 08:46:16 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-topy
|
|
|
|
#
|
2020-05-18 13:01:57 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2019-03-06 08:46:16 +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.
|
|
|
|
|
2019-03-06 08:47:25 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-03-06 08:46:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-topy
|
|
|
|
Version: 0.2.2
|
|
|
|
Release: 0
|
2019-03-17 15:30:39 +00:00
|
|
|
Summary: Tool for fixing typos in text using regular expressions
|
2019-03-06 08:47:25 +00:00
|
|
|
License: MIT AND CC-BY-SA-4.0
|
2019-03-06 08:46:16 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-03-06 08:47:25 +00:00
|
|
|
URL: https://github.com/intgr/topy
|
2019-03-06 08:46:16 +00:00
|
|
|
Source: https://github.com/intgr/topy/archive/v0.2.2.tar.gz#/topy-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2019-03-06 08:47:25 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-06 08:46:16 +00:00
|
|
|
Requires: python-beautifulsoup4
|
|
|
|
Requires: python-regex >= 2016.07.14
|
2020-05-18 13:01:57 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2019-03-06 08:46:16 +00:00
|
|
|
BuildArch: noarch
|
2019-03-06 08:47:25 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module beautifulsoup4}
|
|
|
|
BuildRequires: %{python_module regex >= 2016.07.14}
|
|
|
|
# /SECTION
|
2019-03-06 08:46:16 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-03-17 15:30:39 +00:00
|
|
|
A tool for fixing typos in text using regular expressions,
|
2019-03-06 08:46:16 +00:00
|
|
|
based on RegExTypoFix from Wikipedia.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n topy-%{version}
|
2019-03-06 08:47:25 +00:00
|
|
|
sed -i '1 { /^#!/ d }' topy/topy.py
|
2019-03-06 08:46:16 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-18 13:01:57 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/topy
|
2019-03-06 08:46:16 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
%python_exec setup.py test
|
|
|
|
|
2020-05-18 13:01:57 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative topy
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative topy
|
|
|
|
|
2019-03-06 08:46:16 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE.txt
|
2020-05-18 13:01:57 +00:00
|
|
|
%python_alternative %{_bindir}/topy
|
2019-03-06 08:46:16 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|