Name: gmpy Version: 1.14 Release: 1%{?dist} Summary: A Python interface to the GNU Multiple Precision Arithmetic Library Group: Development/Libraries License: LGPLv2+ URL: http://code.google.com/p/gmpy/ Source0: http://gmpy.googlecode.com/files/gmpy-%{version}.zip BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: python2-devel BuildRequires: gmp-devel # we don't want to provide private python extension libs %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } %description A C-coded Python extension module that wraps the GMP library to provide to Python code fast multiprecision arithmetic (integer, rational, and float), random number generation, advanced number-theoretical functions, and more. %prep %setup -q # Convert to utf-8 for file in doc/gmpydoc.txt; do iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ touch -r $file $file.new && \ mv $file.new $file done %build CFLAGS="%{optflags}" python ./setup.py build %install rm -rf %{buildroot} python ./setup.py install -O1 --skip-build --root=%{buildroot} chmod 755 %{buildroot}%{python_sitearch}/gmpy.so %check # Make python see the library that we have just compiled libdir=`ls build/|grep lib` export PYTHONPATH=`pwd`/build/$libdir cd test python gmpy_test.py %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{python_sitearch}/gmpy.so %{python_sitearch}/gmpy-%{version}-py*.egg-info %doc README lgpl-2.1.txt doc/* %changelog * Thu Nov 18 2010 Michael J Gruber <mjg@fedoraproject.org> 1.14-1 - sync with upstream * Mon Nov 15 2010 Michael J Gruber <mjg@fedoraproject.org> 1.13-3 - include lgpl-2.1.txt in doc - include all doc in toplevel dir rather than subdir * Tue Nov 11 2010 Michael J Gruber <mjg@fedoraproject.org> 1.13-2 - avoid automatic provides for .so - add check section rather than bundling the tests - convert latin1 doc file to utf8 during prep - chmod 755 the installed .so * Mon Nov 10 2010 Michael J Gruber <mjg@fedoraproject.org> 1.13-1 - initial packaging for Fedora