diff --git a/python-rebulk.spec b/python-rebulk.spec new file mode 100644 index 0000000000000000000000000000000000000000..5651868dfc974b4ac1b2002810555d284ed477e2 --- /dev/null +++ b/python-rebulk.spec @@ -0,0 +1,63 @@ +%global srcname rebulk + +Name: python-%{srcname} +Version: 3.0.1 +Release: 1 +Summary: ReBulk is a python library that performs advanced searches in strings +# Everything licensed as MIT, except: +# rebulk/toposort.py: Apache (v2.0) +# rebulk/test/test_toposort.py: Apache (v2.0) +License: MIT and ASL 2.0 +URL: https://github.com/Toilal/rebulk +Source: https://github.com/Toilal/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest-runner +BuildRequires: python3-six +BuildRequires: pylint + +%global _description\ +ReBulk is a python library that performs advanced searches in strings that\ +would be hard to implement using re module or String methods only.\ +\ +It includes some features like Patterns, Match, Rule that allows developers\ +to build a custom and complex string matcher using a readable and\ +extendable API. + +%description %_description + +%package -n python3-%{srcname} +Summary: %summary +%{?python_provide:%python_provide python3-%{srcname}} +Requires: python3-six + +%description -n python3-%{srcname} %_description + +%prep +%autosetup -n %{srcname}-%{version} + +%build +%py3_build + +%install +%py3_install +# Remove shebang from Python3 libraries +for lib in `find %{buildroot}%{python3_sitelib} -name "*.py"`; do + sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && + touch -r $lib $lib.new && + mv $lib.new $lib +done + +%check +%{__python3} setup.py test + +%files -n python3-%{srcname} +%doc README.md CHANGELOG.md +%license LICENSE +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info + +%changelog +* Fri Jun 25 2021 Juan wangxiaomeng - 3.0.1-1 +- Initial package diff --git a/rebulk-3.0.1.tar.gz b/rebulk-3.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..619d6adb185d97cab0e1110b8f958b725b3a02a7 Binary files /dev/null and b/rebulk-3.0.1.tar.gz differ