# what it's called on pypi %global srcname sabyenc # what it's imported as %global libname %{srcname} # name of egg info directory %global eggname %{srcname} # package name fragment %global pkgname %{srcname} %global common_description %{expand: Modified the original yenc module by Alessandro Duca for use within SABnzbd. The module was extended to do header parsing and full yEnc decoding from a Python list of chunks, the way in which data is retrieved from usenet. This is particularly beneficial when SSL is enabled, which limits the size of each chunk to 16K. Parsing these chunks in python is much more costly.} Name: python-%{pkgname} Version: 3.3.6 Release: 1%{?dist} Summary: yEnc Decoding for Python License: LGPLv3 URL: https://github.com/sabnzbd/sabyenc # pypi tarball doesn't have tests Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildRequires: gcc %description %{common_description} %package -n python2-%{pkgname} Summary: %{summary} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pytest %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} %{common_description} %prep %autosetup -n %{srcname}-%{version} %build %py2_build %install %py2_install %check PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} --verbose tests %files -n python2-%{pkgname} %license LICENSE.md %{python2_sitearch}/%{libname}.so %{python2_sitearch}/%{eggname}-%{version}-py%{python2_version}.egg-info %changelog * Wed Aug 28 2019 Carl George - 3.3.6-1 - Latest upstream * Sat Mar 02 2019 Carl George - 3.3.5-2 - Add gcc build requirement * Mon May 14 2018 Carl George - 3.3.5-1 - Latest upstream * Sat Feb 17 2018 Carl George - 3.3.2-1 - Initial package