# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: python-qrcode Version: 20120425git77fe7aa3 Release: 1%{?dist} Summary: Pure python QR Code generator License: BSD URL: https://github.com/lincolnloop/python-qrcode Source0: %{name}-%{version}.tar.gz # generated with this script: Source1: %{name}-generate-tarball.sh BuildArch: noarch BuildRequires: python-devel Requires: python-imaging %description This module uses the Python Imaging Library (PIL) to generate 2-dimensional QR codes. %prep %setup -q %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %files %doc CHANGES.rst LICENSE README.rst %{python_sitelib}/* %{_bindir}/qr %changelog * Wed May 23 2012 Konstantin Ryabitsev - Initial spec file.