a6fcb98
Name:           python-inflect
bd9e4d0
Version:        0.2.5
875f0e1
Release:        3%{?dist}
a6fcb98
Summary:        Correctly generate plurals, singular nouns, ordinals and indefinite articles
a6fcb98
a6fcb98
License:        AGPLv3+
a6fcb98
URL:            https://pypi.python.org/pypi/inflect
a6fcb98
Source0:        https://pypi.python.org/packages/source/i/inflect/inflect-%{version}.tar.gz
a6fcb98
a6fcb98
BuildArch:      noarch
a6fcb98
a6fcb98
BuildRequires:  python2-devel
a6fcb98
BuildRequires:  python-setuptools
a6fcb98
a6fcb98
# Required for check
a6fcb98
BuildRequires:  python-nose
a6fcb98
a6fcb98
%description
a6fcb98
The methods of the class 'engine' in module 'inflect.py' provide plural
a6fcb98
inflections, singular noun inflections, "a"/"an" selection for English words,
a6fcb98
and manipulation of numbers as words.
a6fcb98
a6fcb98
Plural forms of all nouns, most verbs, and some adjectives are provided. Where
a6fcb98
appropriate, "classical" variants (for example: "brother" -> "brethren",
a6fcb98
"dogma" -> "dogmata", etc.) are also provided.
a6fcb98
a6fcb98
Single forms of nouns are also provided. The gender of singular pronouns can be
a6fcb98
chosen (for example "they" -> "it" or "she" or "he" or "they").
a6fcb98
a6fcb98
Pronunciation-based "a"/"an" selection is provided for all English words, and
a6fcb98
most initialisms.
a6fcb98
a6fcb98
It is also possible to inflect numerals (1,2,3) to ordinals (1st, 2nd, 3rd) and
a6fcb98
to English words ("one", "two", "three).
a6fcb98
a6fcb98
%package -n python3-inflect
a6fcb98
Summary:        Correctly generate plurals, singular nouns, ordinals and indefinite articles
a6fcb98
BuildRequires:  python3-devel
a6fcb98
BuildRequires:  python3-setuptools
a6fcb98
a6fcb98
# Required for check
a6fcb98
BuildRequires:  python3-nose
a6fcb98
a6fcb98
%description -n python3-inflect
a6fcb98
The methods of the class 'engine' in module 'inflect.py' provide plural
a6fcb98
inflections, singular noun inflections, "a"/"an" selection for English words,
a6fcb98
and manipulation of numbers as words.
a6fcb98
a6fcb98
Plural forms of all nouns, most verbs, and some adjectives are provided. Where
a6fcb98
appropriate, "classical" variants (for example: "brother" -> "brethren",
a6fcb98
"dogma" -> "dogmata", etc.) are also provided.
a6fcb98
a6fcb98
Single forms of nouns are also provided. The gender of singular pronouns can be
a6fcb98
chosen (for example "they" -> "it" or "she" or "he" or "they").
a6fcb98
a6fcb98
Pronunciation-based "a"/"an" selection is provided for all English words, and
a6fcb98
most initialisms.
a6fcb98
a6fcb98
It is also possible to inflect numerals (1,2,3) to ordinals (1st, 2nd, 3rd) and
a6fcb98
to English words ("one", "two", "three).
a6fcb98
a6fcb98
%prep
875f0e1
%setup -qc
875f0e1
mv inflect-%{version} python2
a6fcb98
875f0e1
pushd python2
875f0e1
875f0e1
# Copy common doc files to top dir
875f0e1
cp -pr CHANGES.txt COPYING.txt README.rst ../
875f0e1
875f0e1
rm -rf inflext.egg-info
875f0e1
popd
875f0e1
875f0e1
cp -a python2 python3
a6fcb98
a6fcb98
%build
875f0e1
pushd python2
a6fcb98
%{__python2} setup.py build
875f0e1
popd
a6fcb98
875f0e1
pushd python3
875f0e1
%{__python3} setup.py build
875f0e1
popd
a6fcb98
a6fcb98
%install
875f0e1
pushd python2
a6fcb98
%{__python2} setup.py install --skip-build --root %{buildroot}
875f0e1
popd
a6fcb98
875f0e1
pushd python3
875f0e1
%{__python3} setup.py install --skip-build --root %{buildroot}
875f0e1
popd
a6fcb98
a6fcb98
%check
875f0e1
pushd python2
875f0e1
nosetests
875f0e1
popd
875f0e1
875f0e1
pushd python3
875f0e1
nosetests-3.4
875f0e1
popd
a6fcb98
a6fcb98
%files
59233f2
%license COPYING.txt
59233f2
%doc CHANGES.txt README.rst
a6fcb98
%{python2_sitelib}/inflect.py*
a6fcb98
%{python2_sitelib}/inflect-%{version}-*.egg-info
a6fcb98
a6fcb98
%files -n python3-inflect
59233f2
%license COPYING.txt
59233f2
%doc CHANGES.txt README.rst
a6fcb98
%{python3_sitelib}/inflect.py
a6fcb98
%{python3_sitelib}/__pycache__/inflect.*.py*
a6fcb98
%{python3_sitelib}/inflect-%{version}-*.egg-info
a6fcb98
a6fcb98
%changelog
875f0e1
* Wed Mar 18 2015 David Shea <dshea@redhat.com> - 0.2.5-3
875f0e1
- Change the build commands to not use py3dir external to the build directory
875f0e1
- Actually run the tests in %%check
875f0e1
59233f2
* Wed Jan 28 2015 David Shea <dshea@redhat.com> - 0.2.5-2
875f0e1
- Use %%license for the license file
59233f2
bd9e4d0
* Tue Jan 13 2015 David Shea <dshea@redhat.com> - 0.2.5-1
bd9e4d0
- Update to inflect-0.2.5, which fixes the following issues:
bd9e4d0
- Fixed TypeError while parsing compounds (by yavarhusain)
bd9e4d0
- Fixed encoding issue in setup.py on Python 3
bd9e4d0
a6fcb98
* Mon Jul 21 2014 David Shea <dshea@redhat.com> - 0.2.4-4
a6fcb98
- Separate the python2 and python3 buildrequires by package section
a6fcb98
a6fcb98
* Mon Jul 21 2014 David Shea <dshea@redhat.com> - 0.2.4-3
a6fcb98
- Capitalize "English" in the description
a6fcb98
a6fcb98
* Tue Jul  8 2014 David Shea <dshea@redhat.com> - 0.2.4-2
a6fcb98
- Remove rst markup from the description. Oops.
a6fcb98
a6fcb98
* Tue Jul  8 2014 David Shea <dshea@redhat.com> - 0.2.4-1
a6fcb98
- Initial package