%{!?python_sitelib_platform: %define python_sitelib_platform %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Summary: Python bindings for the libmagic API Name: python-magic Version: 4.21 Release: 1%{?dist} License: BSD Group: Development/Libraries URL: http://www.darwinsys.com/file/ Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz BuildRequires: python-devel file-devel = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description This package contains the Python bindings to allow access to the libmagic API. The libmagic library is also used by the familiar file(1) command. %prep %setup -q -n file-%{version} %build cd python CFLAGS="%{optflags}" %{__python} setup.py build %install %{__rm} -rf %{buildroot} cd python %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__install} -d %{buildroot}%{_datadir}/%{name} %clean %{__rm} -rf %{buildroot} %files %defattr(-, root, root, -) %doc python/README LEGAL.NOTICE %{python_sitelib_platform}/magic.so %changelog * Wed Sep 01 2007 Terje Rosten - 4.21-1 - Initial build