%define pyver %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()") %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-dialog Version: 2.7 Release: 1 Epoch: 0 Summary: Python interface to the Unix dialog utility Group: Development/Languages License: LGPL URL: http://pythondialog.sourceforge.net Source0: http://dl.sf.net/pythondialog/pythondialog-2.7.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel Requires: python-abi = %{pyver} Requires: dialog %description A Python interface to the Unix dialog utility, designed to provide an easy, pythonic and as complete as possible way to use the dialog features from Python code. %prep %setup -q -n pythondialog-%{version} %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc demo.py AUTHORS COPYING DEBUGGING README TODO %{python_sitelib}/dialog.py %{python_sitelib}/dialog.pyc %ghost %{python_sitelib}/dialog.pyo %changelog * Thu Feb 10 2005 Aurelien Bompard 0:2.7-1 - update to version 2.7 - update URL * Sat Feb 05 2005 Toshio Kuratomi 0:2.0.6-2 - Change %%python_sitearch to %%python_sitelib as sitearch references /usr/lib64 on x86_64 multilib and the python files install to /usr/lib. * Sat Jul 24 2004 Aurelien Bompard 0:2.06-0.fdr.1 - Initial Fedora Package