%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name python-string-utils %define version 0.6.0 %define unmangled_version 0.6.0 %define release 1 Summary: Utility functions for strings checking and manipulation. %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}python-string-utils Version: %{version} Release: %{release} Source0: python-string-utils-%{unmangled_version}.tar.gz License: MIT Group: Development/Libraries BuildRoot: %{_tmppath}/python-string-utils-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Davide Zanotti Packager: Martin Juhl Url: https://github.com/daveoncode/python-string-utils %description # Python String Utils A small utility library to check and manipulate strings. - simple and pythonic - fast (based on compiled regex) - no external dependencies - fully documented - PEP8 complaint - 100% code coverage - tested against multiple python versions (2.7, 3.2, 3.3, 3.4, 3.5) ## What's inside... ### String checking functions: - is_string - is_full_string - is_ip - is_url - is_email - is_credit_card - is_camel_case - is_snake_case - is_json - is_uuid - is_pangram - is_palindrome - is_isogram - is_slug - words_count - contains_html ### String manipulation and generation - camel_case_to_snake - snake_case_to_camel - reverse - uuid - shuffle - strip_html - prettify - slugify ...and more are coming! ## Installation pip install python-string-utils ## Documentation Full API documentation available on: %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n python-string-utils-%{unmangled_version} %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py build %{?scl:EOF} %install %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %{?scl:EOF} %clean %{?scl:scl enable %{scl} - << \EOF} set -ex rm -rf $RPM_BUILD_ROOT %{?scl:EOF} %files -f INSTALLED_FILES %defattr(-,root,root)