diff --git a/.gitignore b/.gitignore index e69de29..070012b 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/inflect-0.2.4.tar.gz diff --git a/inflect-0.2.4-readme-encoding.patch b/inflect-0.2.4-readme-encoding.patch new file mode 100644 index 0000000..35e8797 --- /dev/null +++ b/inflect-0.2.4-readme-encoding.patch @@ -0,0 +1,12 @@ +diff -purN inflect-0.2.4.orig/setup.py inflect-0.2.4/setup.py +--- inflect-0.2.4.orig/setup.py 2013-06-09 03:03:47.000000000 -0400 ++++ inflect-0.2.4/setup.py 2014-07-08 14:02:39.471445182 -0400 +@@ -6,7 +6,7 @@ import inflect + + here = os.path.dirname(__file__) + readme_path = os.path.join(here, 'README.rst') +-readme = open(readme_path).read() ++readme = open(readme_path, 'rb').read().decode('utf-8') + + setup( + name='inflect', diff --git a/python-inflect.spec b/python-inflect.spec new file mode 100644 index 0000000..a8fc97a --- /dev/null +++ b/python-inflect.spec @@ -0,0 +1,106 @@ +Name: python-inflect +Version: 0.2.4 +Release: 4%{?dist} +Summary: Correctly generate plurals, singular nouns, ordinals and indefinite articles + +License: AGPLv3+ +URL: https://pypi.python.org/pypi/inflect +Source0: https://pypi.python.org/packages/source/i/inflect/inflect-%{version}.tar.gz +Patch0: inflect-0.2.4-readme-encoding.patch + +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python-setuptools + +# Required for check +BuildRequires: python-nose + +%description +The methods of the class 'engine' in module 'inflect.py' provide plural +inflections, singular noun inflections, "a"/"an" selection for English words, +and manipulation of numbers as words. + +Plural forms of all nouns, most verbs, and some adjectives are provided. Where +appropriate, "classical" variants (for example: "brother" -> "brethren", +"dogma" -> "dogmata", etc.) are also provided. + +Single forms of nouns are also provided. The gender of singular pronouns can be +chosen (for example "they" -> "it" or "she" or "he" or "they"). + +Pronunciation-based "a"/"an" selection is provided for all English words, and +most initialisms. + +It is also possible to inflect numerals (1,2,3) to ordinals (1st, 2nd, 3rd) and +to English words ("one", "two", "three). + +%package -n python3-inflect +Summary: Correctly generate plurals, singular nouns, ordinals and indefinite articles +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +# Required for check +BuildRequires: python3-nose + +%description -n python3-inflect +The methods of the class 'engine' in module 'inflect.py' provide plural +inflections, singular noun inflections, "a"/"an" selection for English words, +and manipulation of numbers as words. + +Plural forms of all nouns, most verbs, and some adjectives are provided. Where +appropriate, "classical" variants (for example: "brother" -> "brethren", +"dogma" -> "dogmata", etc.) are also provided. + +Single forms of nouns are also provided. The gender of singular pronouns can be +chosen (for example "they" -> "it" or "she" or "he" or "they"). + +Pronunciation-based "a"/"an" selection is provided for all English words, and +most initialisms. + +It is also possible to inflect numerals (1,2,3) to ordinals (1st, 2nd, 3rd) and +to English words ("one", "two", "three). + +%prep +%setup -q -n inflect-%{version} +%patch0 -p1 + +rm -rf %{py3dir} +cp -a . %{py3dir} + +%build +%{__python2} setup.py build + +( cd %{py3dir} && %{__python3} setup.py build ) + +%install +%{__python2} setup.py install --skip-build --root %{buildroot} + +( cd %{py3dir} && %{__python3} setup.py install --skip-build --root %{buildroot} ) + +%check +%{__python2} setup.py check +( cd %{py3dir} && %{__python3} setup.py check ) + +%files +%doc CHANGES.txt COPYING.txt README.rst +%{python2_sitelib}/inflect.py* +%{python2_sitelib}/inflect-%{version}-*.egg-info + +%files -n python3-inflect +%doc CHANGES.txt COPYING.txt README.rst +%{python3_sitelib}/inflect.py +%{python3_sitelib}/__pycache__/inflect.*.py* +%{python3_sitelib}/inflect-%{version}-*.egg-info + +%changelog +* Mon Jul 21 2014 David Shea - 0.2.4-4 +- Separate the python2 and python3 buildrequires by package section + +* Mon Jul 21 2014 David Shea - 0.2.4-3 +- Capitalize "English" in the description + +* Tue Jul 8 2014 David Shea - 0.2.4-2 +- Remove rst markup from the description. Oops. + +* Tue Jul 8 2014 David Shea - 0.2.4-1 +- Initial package diff --git a/sources b/sources index e69de29..0ad68e2 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +fc2d807b600c4e959e993690ffa573bc inflect-0.2.4.tar.gz