2016-04-26 14:33:30 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-rebulk
|
|
|
|
#
|
2020-04-21 10:15:33 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2016-04-26 14:33:30 +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 13:58:51 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-04-26 14:33:30 +00:00
|
|
|
#
|
|
|
|
|
2018-09-03 08:32:20 +00:00
|
|
|
|
2017-03-31 14:02:05 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2016-04-26 14:33:30 +00:00
|
|
|
Name: python-rebulk
|
2019-08-30 23:53:52 +00:00
|
|
|
Version: 2.0.0
|
2016-04-26 14:33:30 +00:00
|
|
|
Release: 0
|
2018-09-07 12:55:45 +00:00
|
|
|
Summary: Library for defining bulk search patterns to perform advanced string matching
|
2016-04-26 14:33:30 +00:00
|
|
|
License: MIT
|
2019-08-13 05:17:35 +00:00
|
|
|
URL: https://github.com/Toilal/rebulk
|
2019-10-14 14:41:16 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/r/rebulk/rebulk-%{version}.tar.gz
|
2020-04-21 10:15:33 +00:00
|
|
|
Patch0: fix-for-regex-2020.1.7.patch
|
2017-03-31 14:02:05 +00:00
|
|
|
BuildRequires: %{python_module pytest-runner}
|
2018-09-03 08:32:20 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-03-31 14:02:05 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-09-03 08:32:20 +00:00
|
|
|
BuildRequires: fdupes
|
2017-03-31 14:02:05 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2016-04-26 14:33:30 +00:00
|
|
|
BuildArch: noarch
|
2020-04-21 10:15:33 +00:00
|
|
|
Recommends: python-regex
|
2017-03-31 14:02:05 +00:00
|
|
|
%python_subpackages
|
2016-04-26 14:33:30 +00:00
|
|
|
|
|
|
|
%description
|
2018-09-07 12:55:45 +00:00
|
|
|
ReBulk is a Python library that performs advanced searches in
|
|
|
|
strings that would be hard to implement using the re module or
|
2016-04-26 14:33:30 +00:00
|
|
|
String methods only.
|
|
|
|
|
|
|
|
It includes some features like Patterns, Match, Rule that
|
2018-09-07 12:55:45 +00:00
|
|
|
allow building a custom and complex string matcher.
|
2016-04-26 14:33:30 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n rebulk-%{version}
|
2020-04-21 10:15:33 +00:00
|
|
|
%patch0 -p1
|
|
|
|
|
2017-03-31 14:02:05 +00:00
|
|
|
# Remove shebang from non-executable files
|
2019-08-30 23:53:52 +00:00
|
|
|
for i in {'builder','chain','debug','formatters','__init__','introspector','loose','match','pattern','processors','rebulk','remodule','rules','toposort','utils','validators','__version__'}; do
|
2017-03-31 14:02:05 +00:00
|
|
|
sed -i -e "1d" "rebulk/$i.py"
|
|
|
|
done
|
|
|
|
for i in {'default_rules_module','__init__','rebulk_rules_module','rules_module','test_chain','test_debug','test_introspector','test_loose','test_match','test_pattern','test_processors','test_rebulk','test_rules','test_toposort','test_validators'}; do
|
|
|
|
sed -i -e "1d" "rebulk/test/$i.py"
|
|
|
|
done
|
2016-04-26 14:33:30 +00:00
|
|
|
|
|
|
|
%build
|
2017-03-31 14:02:05 +00:00
|
|
|
%python_build
|
2016-04-26 14:33:30 +00:00
|
|
|
|
|
|
|
%install
|
2017-03-31 14:02:05 +00:00
|
|
|
%python_install
|
2019-10-14 14:41:16 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-03-31 14:02:05 +00:00
|
|
|
|
2018-09-03 08:32:20 +00:00
|
|
|
%check
|
2018-09-03 08:57:27 +00:00
|
|
|
export PYTHONDONTWRITEBYTECODE=1
|
2020-04-21 10:15:33 +00:00
|
|
|
%pytest rebulk/test/
|
2016-04-26 14:33:30 +00:00
|
|
|
|
2017-03-31 14:02:05 +00:00
|
|
|
%files %{python_files}
|
2018-09-03 08:32:20 +00:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2017-03-31 14:02:05 +00:00
|
|
|
%{python_sitelib}/rebulk
|
|
|
|
%{python_sitelib}/rebulk-%{version}-py%{python_version}.egg-info
|
2016-04-26 14:33:30 +00:00
|
|
|
|
|
|
|
%changelog
|