diff --git a/.gitignore b/.gitignore index e69de29..11dd8aa 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/drat-0.4.1.tar.gz diff --git a/python-drat.spec b/python-drat.spec new file mode 100644 index 0000000..9543233 --- /dev/null +++ b/python-drat.spec @@ -0,0 +1,104 @@ +%global with_python3 0 +%global module_name drat + +Name: python-%{module_name} +Version: 0.4.1 +Release: 1%{?dist} +Summary: A reading text analysis tool + +License: GPLv3+ +URL: https://github.com/riverrun/drat +Source0: https://pypi.python.org/packages/source/d/%{module_name}/%{module_name}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-requests +BuildRequires: python-click +BuildRequires: python-setuptools +Requires: drat-tools + +%if 0%{with_python3} +%package -n python3-%{module_name} +Summary: A reading text analysis tool +License: GPLv3+ +BuildRequires: python3-devel +BuildRequires: python3-requests +BuildRequires: python3-click +BuildRequires: python3-setuptools +Requires: drat-tools +%endif + +%package -n %{module_name}-tools +Summary: A reading text analysis tool +License: GPLv3+ + +%description +Drat is a tool that analyzes reading texts and produces a brief report which +gives a readability score (according to the Dale-Chall readability formula) +and the number of uncommon words (based on the General Service List) in the +text. It also lists all of these uncommon words (if you choose the verbose +option). + +%if 0%{with_python3} +%description -n python3-%{module_name} +Drat is a tool that analyzes reading texts and produces a brief report which +gives a readability score (according to the Dale-Chall readability formula) +and the number of uncommon words (based on the General Service List) in the +text. It also lists all of these uncommon words (if you choose the verbose +option). +%endif + +%description -n %{module_name}-tools +drat tool. + +%prep +%setup -q -n %{module_name}-%{version} +rm -rf *.egg-info + + +%build +%{__python2} setup.py build + +%if 0%{with_python3} +echo ${_python3} +%{__python3} setup.py build +%endif + +%install +%{__python2} setup.py install --skip-build --root=%{buildroot} + +%if 0%{with_python3} +%{__python3} setup.py install --skip-build --root=%{buildroot} +%endif + +%check +%{__python2} setup.py test + +%if 0%{with_python3} +%{__python3} setup.py test +%endif + +%files -n %{module_name}-tools +%doc README.rst +%{_bindir}/* + +%files -n python-%{module_name} +%doc README.rst +%{python2_sitelib}/%{module_name}/ +%{python2_sitelib}/%{module_name}-%{version}-py2.7.egg-info + +%if 0%{?with_python3} +%files -n python3-%{module_name} +%doc README.rst +%{python3_sitelib}/%{module_name}/ +%{python3_sitelib}/%{module_name}-%{version}-py3.*.egg-info +%endif + + +%changelog +* Sun Sep 28 2014 Parag Nemade - 0.4.1-1 +- Update to 0.4.1 release + +* Mon Sep 22 2014 Parag Nemade - 0.4.0-1 +- Initial packaging + diff --git a/sources b/sources index e69de29..9d77970 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7d80201f532ad426f298ea0b88f9463e drat-0.4.1.tar.gz