summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 04:24:04 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 04:24:04 +0000
commit43fc10e7c64a53135d9623033835573be3f59f42 (patch)
tree2a669a5475436d9eb52bafc936d2687a459e1feb
parent0886bf8f49864d9fbccc80e6f581e3ca437f6ce3 (diff)
automatic import of python-pluralizeropeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-pluralizer.spec213
-rw-r--r--sources1
3 files changed, 215 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6ca81a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pluralizer-1.2.0.tar.gz
diff --git a/python-pluralizer.spec b/python-pluralizer.spec
new file mode 100644
index 0000000..1c150f6
--- /dev/null
+++ b/python-pluralizer.spec
@@ -0,0 +1,213 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pluralizer
+Version: 1.2.0
+Release: 1
+Summary: Singularize or pluralize a given word useing a pre-defined list of rules
+License: MIT
+URL: https://github.com/weixu365/pluralizer-py
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c4/11/5e3e7af16fe46612265e6cfed0f1c8f49fb0cdb424d314154d5a3b364bac/pluralizer-1.2.0.tar.gz
+BuildArch: noarch
+
+
+%description
+[![PyPI](https://img.shields.io/pypi/v/pluralizer?style=plastic)](https://pypi.org/project/pluralizer/)
+[![Codecov](https://img.shields.io/codecov/c/github/weixu365/pluralizer-py?style=plastic)](https://codecov.io/gh/weixu365/pluralizer-py)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/weixu365/pluralizer-py/Python%20package?style=plastic)](https://github.com/weixu365/pluralizer-py/actions?query=branch%3Amaster)
+[![PyPI - Downloads](https://img.shields.io/pypi/dm/pluralizer?style=plastic)](https://pypistats.org/packages/pluralizer)
+
+## Why this project?
+This repo is simply a Python port of https://github.com/blakeembrey/pluralize which has > 1.4m github usages and 3.5 million downloads per week when I evaluating different libraries.
+
+> This module uses a pre-defined list of rules, applied in order, to singularize or pluralize a given word. There are many cases where this is useful, such as any automation based on user input. For applications where the word(s) are known ahead of time, you can use a simple ternary (or function) which would be a much lighter alternative.
+
+I have compared the following alternatives and found https://github.com/blakeembrey/pluralize is the best one for me (most accurate), so ported it into the Python world.
+- TextBlob: https://github.com/sloria/TextBlob
+- inflect: https://github.com/jazzband/inflect
+- NLTK Wordnet: https://www.nltk.org/howto/wordnet.html
+
+
+## Installation
+```bash
+pip install pluralizer
+```
+
+## Usage
+```python
+from pluralizer import Pluralizer
+
+pluralizer = Pluralizer()
+
+assert pluralizer.pluralize('apple', 1, False) == 'apple'
+assert pluralizer.pluralize('apple', 1, True) == '1 apple'
+assert pluralizer.pluralize('apple', 2, False) == 'apples'
+assert pluralizer.pluralize('apple', 2, True) == '2 apples'
+
+assert pluralizer.plural('apple') == 'apples'
+assert pluralizer.singular('apples') == 'apple'
+
+assert pluralizer.isPlural('apples') == True
+assert pluralizer.isPlural('apple') == False
+assert pluralizer.isSingular('apples') == False
+assert pluralizer.isSingular('apple') == True
+```
+
+## License
+MIT
+
+All credits to https://github.com/blakeembrey/pluralize.
+
+
+
+
+%package -n python3-pluralizer
+Summary: Singularize or pluralize a given word useing a pre-defined list of rules
+Provides: python-pluralizer
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pluralizer
+[![PyPI](https://img.shields.io/pypi/v/pluralizer?style=plastic)](https://pypi.org/project/pluralizer/)
+[![Codecov](https://img.shields.io/codecov/c/github/weixu365/pluralizer-py?style=plastic)](https://codecov.io/gh/weixu365/pluralizer-py)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/weixu365/pluralizer-py/Python%20package?style=plastic)](https://github.com/weixu365/pluralizer-py/actions?query=branch%3Amaster)
+[![PyPI - Downloads](https://img.shields.io/pypi/dm/pluralizer?style=plastic)](https://pypistats.org/packages/pluralizer)
+
+## Why this project?
+This repo is simply a Python port of https://github.com/blakeembrey/pluralize which has > 1.4m github usages and 3.5 million downloads per week when I evaluating different libraries.
+
+> This module uses a pre-defined list of rules, applied in order, to singularize or pluralize a given word. There are many cases where this is useful, such as any automation based on user input. For applications where the word(s) are known ahead of time, you can use a simple ternary (or function) which would be a much lighter alternative.
+
+I have compared the following alternatives and found https://github.com/blakeembrey/pluralize is the best one for me (most accurate), so ported it into the Python world.
+- TextBlob: https://github.com/sloria/TextBlob
+- inflect: https://github.com/jazzband/inflect
+- NLTK Wordnet: https://www.nltk.org/howto/wordnet.html
+
+
+## Installation
+```bash
+pip install pluralizer
+```
+
+## Usage
+```python
+from pluralizer import Pluralizer
+
+pluralizer = Pluralizer()
+
+assert pluralizer.pluralize('apple', 1, False) == 'apple'
+assert pluralizer.pluralize('apple', 1, True) == '1 apple'
+assert pluralizer.pluralize('apple', 2, False) == 'apples'
+assert pluralizer.pluralize('apple', 2, True) == '2 apples'
+
+assert pluralizer.plural('apple') == 'apples'
+assert pluralizer.singular('apples') == 'apple'
+
+assert pluralizer.isPlural('apples') == True
+assert pluralizer.isPlural('apple') == False
+assert pluralizer.isSingular('apples') == False
+assert pluralizer.isSingular('apple') == True
+```
+
+## License
+MIT
+
+All credits to https://github.com/blakeembrey/pluralize.
+
+
+
+
+%package help
+Summary: Development documents and examples for pluralizer
+Provides: python3-pluralizer-doc
+%description help
+[![PyPI](https://img.shields.io/pypi/v/pluralizer?style=plastic)](https://pypi.org/project/pluralizer/)
+[![Codecov](https://img.shields.io/codecov/c/github/weixu365/pluralizer-py?style=plastic)](https://codecov.io/gh/weixu365/pluralizer-py)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/weixu365/pluralizer-py/Python%20package?style=plastic)](https://github.com/weixu365/pluralizer-py/actions?query=branch%3Amaster)
+[![PyPI - Downloads](https://img.shields.io/pypi/dm/pluralizer?style=plastic)](https://pypistats.org/packages/pluralizer)
+
+## Why this project?
+This repo is simply a Python port of https://github.com/blakeembrey/pluralize which has > 1.4m github usages and 3.5 million downloads per week when I evaluating different libraries.
+
+> This module uses a pre-defined list of rules, applied in order, to singularize or pluralize a given word. There are many cases where this is useful, such as any automation based on user input. For applications where the word(s) are known ahead of time, you can use a simple ternary (or function) which would be a much lighter alternative.
+
+I have compared the following alternatives and found https://github.com/blakeembrey/pluralize is the best one for me (most accurate), so ported it into the Python world.
+- TextBlob: https://github.com/sloria/TextBlob
+- inflect: https://github.com/jazzband/inflect
+- NLTK Wordnet: https://www.nltk.org/howto/wordnet.html
+
+
+## Installation
+```bash
+pip install pluralizer
+```
+
+## Usage
+```python
+from pluralizer import Pluralizer
+
+pluralizer = Pluralizer()
+
+assert pluralizer.pluralize('apple', 1, False) == 'apple'
+assert pluralizer.pluralize('apple', 1, True) == '1 apple'
+assert pluralizer.pluralize('apple', 2, False) == 'apples'
+assert pluralizer.pluralize('apple', 2, True) == '2 apples'
+
+assert pluralizer.plural('apple') == 'apples'
+assert pluralizer.singular('apples') == 'apple'
+
+assert pluralizer.isPlural('apples') == True
+assert pluralizer.isPlural('apple') == False
+assert pluralizer.isSingular('apples') == False
+assert pluralizer.isSingular('apple') == True
+```
+
+## License
+MIT
+
+All credits to https://github.com/blakeembrey/pluralize.
+
+
+
+
+%prep
+%autosetup -n pluralizer-1.2.0
+
+%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-pluralizer -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2c64490
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e3d7ec9784a66f31bb983d04a504993c pluralizer-1.2.0.tar.gz