%{!?_licensedir: %global license %%doc} %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif %global modname Pastebin Name: python-pastebin Version: 1.1.2 Release: 1%{?dist} Summary: Python Pastebin API interaction object. Group: Development/Libraries License: GPL URL: http://pypi.python.org/pypi/Pastebin Source0: https://pypi.python.org/packages/3b/5f/3e069acfa5991195475d914f4e70696ba5fbb241e37d3b74b0ad1e78d411/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel, python2-setuptools %description The package allows you to communicate directly with Pastebin.com from your Python application, either logged in or anonymously. This can be handy for a number of reasons - dumping error logs before an abort, regular web based status updates, but can't be bothered getting a web-server running etc. %prep %setup -q -n %{modname}-%{version} # Remove bundled egg-info in case it exists rm -rf %{modname}.egg-info %build CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root=%{buildroot} %check %{__python2} setup.py test %files %doc readme.markdown %license LICENSE.txt %{python2_sitelib}/%(v=%{modname}; echo ${v,,})* %{python2_sitelib}/%{modname}-%{version}*/ %changelog * Fri Oct 20 2017 <> 1.1.2-1 - initial package for Fedora