Now that captcha 0.2 has been released I should create a RPM package of captcha. python-captcha is not yet available in Fedora and RHEL. It doesn't look hard. https://fedoraproject.org/wiki/Packaging:Python has a good example.
Here is my first attempt:
%global pypi_name captcha
%global sum A captcha library that generates audio and image CAPTCHAs.
Name: python-%{pypi_name}
Version: 0.2
Release: 1%{?dist}
Summary: A captcha library that generates audio and image CAPTCHAs.
License: BSD
URL: http://pypi.python.org/pypi/%{pypi_name}
Source0: https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python3-devel
%description
A captcha library that generates audio and image CAPTCHAs.
%package -n python2-%{pypi_name}
Summary: %{sum}
Requires: python3-pillow
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
A captcha library that generates audio and image CAPTCHAs.
%package -n python3-%{pypi_name}
Summary: %{sum}
Requires: python3-pillow
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
A captcha library that generates audio and image CAPTCHAs.
%prep
%setup -q -n %{pypi_name}-%{version}
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%files -n python2-%{pypi_name}
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
Now that captcha 0.2 has been released I should create a RPM package of captcha. python-captcha is not yet available in Fedora and RHEL. It doesn't look hard. https://fedoraproject.org/wiki/Packaging:Python has a good example.
Here is my first attempt: