forked from pool/python-rebulk
- Update to version 3.0.1 * Fix broken package No such file or directory: 'CHANGELOG.md' - Update to version 3.0.0 * regex: Replace REGEX_DISABLED environment variable with REBULK_REGEX_ENABLED * Add python 3.8/3.9 support, drop python 2.7/3.4 support * regex module is now disabled by default, even if it's available in the python interpreter. You have to set REBULK_REGEX_ENABLED=1 in your environment to enable it, as this module may cause some issues. - Update to version 2.0.1 * Drop python 3.4 support * Fix errors when regex module is available * Cleanup chain matching code - Drop fix-for-regex-2020.1.7.patch (merged upstream) - Add patch to fix an incompatible change introduced in python-regex 2020.1.7, where unused arguments now raise an exception: * fix-for-regex-2020.1.7.patch - Use %pytest in %check section - Replace %fdupes -s with plain %fdupes; hardlinks are better. - Update to version 2.0.0 * Add named method to Match class * Add tagged method to Match class * Enhance defaults feature * Some code refactoring and bugfixes * BREAKING CHANGE: This change how chain **kwargs and .defaults() is transmitted to chained patterns, so upgrades should be performed with care. Chain **kwargs are now only used inside chain pattern itself, and doesn't implicitly set chain .defaults() anymore. You may have to repeat some chain **kwargs to its own .defaults() for Rebulk to behave as before, or set them accordingly to chained patterns. - Re-enable debug test - Update to version 1.0.1 * Add python 3.8-dev support and make debug tests asserts less strict - Remove superfluous devel dependency for noarch package - Update to version 1.0.0 * Add python 3.7 support - Trim name repetition in summary. Ensure neutrality of description. - Write up the tests syntax to match up rest python packages - Update to version 0.9.0 * Fix pylint issues * Refactor Matches to_dict() method for better API - Enabled tests - Converted to single-spec - Dropped python-rebulk-rpmlintrc - Update to version 0.8.2 * Remove fake usage of kwargs, in favor of pylint local ignore * Merge pull request #8 from ratoaq2/feature/performance-improvements * Handle unused kwargs * Performance improvements changes since version 0.8.1: * Avoid dict comprehension (unsupported in Python 2.6) * Fix unit tests changes since version 0.8.0: * Add chain_breaker option to implement dynamic breaking of chain patterns * Add pattern post processor changes since version 0.7.7: * Remove twine workaround for zest releaser * Fix chain patterns not properly detected in certain scenarios - update to version 0.7.3: * Fix pylint issue * Add initiator value in matches logs * Use string representation for Regexp Pattern * Fix missing parent on matches generated by chain() * Add more logs for conflict solving - Initial version 0.7.1 OBS-URL: https://build.opensuse.org/request/show/858746 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rebulk?expand=0&rev=28
72 lines
2.4 KiB
RPMSpec
72 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-rebulk
|
|
#
|
|
# Copyright (c) 2020 SUSE LLC
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define skip_python2 1
|
|
Name: python-rebulk
|
|
Version: 3.0.1
|
|
Release: 0
|
|
Summary: Library for defining bulk search patterns to perform advanced string matching
|
|
License: MIT
|
|
URL: https://github.com/Toilal/rebulk
|
|
Source0: https://files.pythonhosted.org/packages/source/r/rebulk/rebulk-%{version}.tar.gz
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildArch: noarch
|
|
Recommends: python-regex
|
|
%python_subpackages
|
|
|
|
%description
|
|
ReBulk is a Python library that performs advanced searches in
|
|
strings that would be hard to implement using the re module or
|
|
String methods only.
|
|
|
|
It includes some features like Patterns, Match, Rule that
|
|
allow building a custom and complex string matcher.
|
|
|
|
%prep
|
|
%autosetup -n rebulk-%{version}
|
|
|
|
# Remove shebang from non-executable files
|
|
for i in {'builder','chain','debug','formatters','__init__','introspector','loose','match','pattern','processors','rebulk','remodule','rules','toposort','utils','validators','__version__'}; do
|
|
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
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest rebulk/test/
|
|
|
|
%files %{python_files}
|
|
%doc CHANGELOG.md README.md
|
|
%license LICENSE
|
|
%{python_sitelib}/rebulk
|
|
%{python_sitelib}/rebulk-%{version}-py%{python_version}.egg-info
|
|
|
|
%changelog
|