%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)') Name: pyephem Version: 3.7.2.3 Release: 1%{?dist} Summary: The astronomy library for Python Group: Development/Libraries License: LGPLv3 URL: http://rhodesmill.org/pyephem/ Source0: http://pypi.python.org/packages/source/p/pyephem/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel %description PyEphem provides scientific-grade astronomical computations for the Python programming language. %prep %setup -q %build CFLAGS="$RPM_OPT_FLAGS" python setup.py build %install rm -rf $RPM_BUILD_ROOT CFLAGS="$RPM_OPT_FLAGS" python setup.py install --root=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGELOG COPYING INSTALL LICENSE-GPL LICENSE-LGPL PKG-INFO README %{python_sitearch}/ephem %{python_sitearch}/*egg-info %exclude %{python_sitearch}/ephem/tests %changelog * Thu Apr 21 2008 Marek Mahut - 3.7.2.3-1 - Initial build