summaryrefslogtreecommitdiff
path: root/python-pyymatcher.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-pyymatcher.spec')
-rw-r--r--python-pyymatcher.spec264
1 files changed, 264 insertions, 0 deletions
diff --git a/python-pyymatcher.spec b/python-pyymatcher.spec
new file mode 100644
index 0000000..0691d5b
--- /dev/null
+++ b/python-pyymatcher.spec
@@ -0,0 +1,264 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pyymatcher
+Version: 0.0.5
+Release: 1
+Summary: Implementation of pattern matching in Python(using gestalt approach)
+License: MIT
+URL: https://github.com/abdulniyaspm/pyymatcher
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/03/10/8f7b2ff9b721096d4fe82e2d3cdb3ef136df1384f51edd79cd03f74d21f3/pyymatcher-0.0.5.tar.gz
+BuildArch: noarch
+
+
+%description
+# PyyMatcher
+
+[![License](https://img.shields.io/pypi/l/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Version](https://img.shields.io/pypi/v/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Python versions](https://img.shields.io/pypi/pyversions/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
+
+> Implementation of pattern matching in Python(using gestalt approach).
+> This library implements the underlaying algorithm(longest_common_substring) with C++.
+
+## Installation
+
+```python
+pip install pyymatcher
+```
+
+## Usage example
+
+```python
+>> from pyymatcher import PyyMatcher, get_close_matches
+
+>>> obj = PyyMatcher('Word1', 'word1')
+>>> obj.ratio()
+0.8
+>>> obj.ratio(case_insensitive=True)
+1.0
+>>> obj.longest_common_substr
+'ord1'
+
+>>> word = 'thiis'
+>>> get_close_matches(word=word,
+ possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
+ n=1)
+['this']
+>>> get_close_matches(word=word,
+ possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
+ n=2,
+ case_insensitive=True)
+['this', 'THIS']
+```
+
+## Release History
+
+* 0.0.1
+ * initial release
+
+## Support
+
+Python 3.6+
+
+## Meta
+
+Abdul Niyas P M – [@AbdulNiyas19](https://twitter.com/AbdulNiyas19) – abdulniyaspm@gmail.com
+
+Distributed under the MIT license. See ``LICENSE`` for more information.
+
+[Github Profile](https://github.com/abdulniyaspm)
+
+## Contributing
+
+1. Fork it (https://github.com/abdulniyaspm/pyymatcher/fork)
+2. Create your feature branch (`git checkout -b feature/fooBar`)
+3. Commit your changes (`git commit -am 'Add some fooBar'`)
+4. Push to the branch (`git push origin feature/fooBar`)
+5. Create a new Pull Request
+
+%package -n python3-pyymatcher
+Summary: Implementation of pattern matching in Python(using gestalt approach)
+Provides: python-pyymatcher
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pyymatcher
+# PyyMatcher
+
+[![License](https://img.shields.io/pypi/l/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Version](https://img.shields.io/pypi/v/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Python versions](https://img.shields.io/pypi/pyversions/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
+
+> Implementation of pattern matching in Python(using gestalt approach).
+> This library implements the underlaying algorithm(longest_common_substring) with C++.
+
+## Installation
+
+```python
+pip install pyymatcher
+```
+
+## Usage example
+
+```python
+>> from pyymatcher import PyyMatcher, get_close_matches
+
+>>> obj = PyyMatcher('Word1', 'word1')
+>>> obj.ratio()
+0.8
+>>> obj.ratio(case_insensitive=True)
+1.0
+>>> obj.longest_common_substr
+'ord1'
+
+>>> word = 'thiis'
+>>> get_close_matches(word=word,
+ possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
+ n=1)
+['this']
+>>> get_close_matches(word=word,
+ possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
+ n=2,
+ case_insensitive=True)
+['this', 'THIS']
+```
+
+## Release History
+
+* 0.0.1
+ * initial release
+
+## Support
+
+Python 3.6+
+
+## Meta
+
+Abdul Niyas P M – [@AbdulNiyas19](https://twitter.com/AbdulNiyas19) – abdulniyaspm@gmail.com
+
+Distributed under the MIT license. See ``LICENSE`` for more information.
+
+[Github Profile](https://github.com/abdulniyaspm)
+
+## Contributing
+
+1. Fork it (https://github.com/abdulniyaspm/pyymatcher/fork)
+2. Create your feature branch (`git checkout -b feature/fooBar`)
+3. Commit your changes (`git commit -am 'Add some fooBar'`)
+4. Push to the branch (`git push origin feature/fooBar`)
+5. Create a new Pull Request
+
+%package help
+Summary: Development documents and examples for pyymatcher
+Provides: python3-pyymatcher-doc
+%description help
+# PyyMatcher
+
+[![License](https://img.shields.io/pypi/l/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Version](https://img.shields.io/pypi/v/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Python versions](https://img.shields.io/pypi/pyversions/pyymatcher.svg)](https://pypi.org/project/pyymatcher/)
+[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
+
+> Implementation of pattern matching in Python(using gestalt approach).
+> This library implements the underlaying algorithm(longest_common_substring) with C++.
+
+## Installation
+
+```python
+pip install pyymatcher
+```
+
+## Usage example
+
+```python
+>> from pyymatcher import PyyMatcher, get_close_matches
+
+>>> obj = PyyMatcher('Word1', 'word1')
+>>> obj.ratio()
+0.8
+>>> obj.ratio(case_insensitive=True)
+1.0
+>>> obj.longest_common_substr
+'ord1'
+
+>>> word = 'thiis'
+>>> get_close_matches(word=word,
+ possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
+ n=1)
+['this']
+>>> get_close_matches(word=word,
+ possibilities=['tthis', 'thhis', 'this', 'thiss', 'THIS'],
+ n=2,
+ case_insensitive=True)
+['this', 'THIS']
+```
+
+## Release History
+
+* 0.0.1
+ * initial release
+
+## Support
+
+Python 3.6+
+
+## Meta
+
+Abdul Niyas P M – [@AbdulNiyas19](https://twitter.com/AbdulNiyas19) – abdulniyaspm@gmail.com
+
+Distributed under the MIT license. See ``LICENSE`` for more information.
+
+[Github Profile](https://github.com/abdulniyaspm)
+
+## Contributing
+
+1. Fork it (https://github.com/abdulniyaspm/pyymatcher/fork)
+2. Create your feature branch (`git checkout -b feature/fooBar`)
+3. Commit your changes (`git commit -am 'Add some fooBar'`)
+4. Push to the branch (`git push origin feature/fooBar`)
+5. Create a new Pull Request
+
+%prep
+%autosetup -n pyymatcher-0.0.5
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pyymatcher -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.5-1
+- Package Spec generated