%global pypiname filetype Name: python-%{pypiname} Version: 1.0.0 Release: 1%{?dist} Summary: Infer file type and MIME type of any file/buffer License: MIT License URL: https://github.com/h2non/filetype.py Source0: https://files.pythonhosted.org/packages/source/f/%{pypiname}/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python3-devel %description Small and dependency free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer. %package -n python2-%{pypiname} Summary: Infer file type and MIME type of any file/buffer %{?python_provide:%python_provide python2-%{pypiname}} %description -n python2-%{pypiname} Small and dependency free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer. %package -n python3-%{pypiname} Summary: Infer file type and MIME type of any file/buffer %{?python_provide:%python_provide python3-%{pypiname}} %description -n python3-%{pypiname} Small and dependency free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer. %prep %setup -q -n %{pypiname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install # Please see: # https://github.com/h2non/filetype.py/pull/19 %files -n python2-%{pypiname} %{python2_sitelib}/* %files -n python3-%{pypiname} %{python3_sitelib}/* %changelog * Mon Dec 25 2017 williamjmorenor@gmail.com - 1.0.0-1 - Initial packaging