From 6f8291fa692d6c226a2bbf630a4286d180a782b4 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Oct 22 2009 07:50:40 +0000 Subject: Imported in Fedora. --- diff --git a/.cvsignore b/.cvsignore index e69de29..a21a8fa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +mpmath-0.13.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..2211376 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +python-mpmath-0_13-5_fc11:HEAD:python-mpmath-0.13-5.fc11.src.rpm:1256197771 diff --git a/python-mpmath.spec b/python-mpmath.spec new file mode 100644 index 0000000..4f1d277 --- /dev/null +++ b/python-mpmath.spec @@ -0,0 +1,106 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Name: python-mpmath +Version: 0.13 +Release: 5%{?dist} +Summary: A pure Python library for multiprecision floating-point arithmetic +Group: Applications/Engineering +License: BSD +URL: http://code.google.com/p/mpmath/ +Source0: http://mpmath.googlecode.com/files/mpmath-%{version}.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildArch: noarch + +BuildRequires: python-devel +# For building documentation +BuildRequires: dvipng +BuildRequires: python-sphinx +BuildRequires: tex(latex) +# For running test +BuildRequires: python-py + + +%description +Mpmath is a pure-Python library for multiprecision floating-point arithmetic. +It provides an extensive set of transcendental functions, unlimited exponent +sizes, complex numbers, interval arithmetic, numerical integration and +differentiation, root-finding, linear algebra, and much more. Almost any +calculation can be performed just as well at 10-digit or 1000-digit precision, +and in many cases mpmath implements asymptotically fast algorithms that scale +well for extremely high precision work. If available, mpmath will (optionally) +use gmpy to speed up high precision operations. + +If you require plotting capabilities in mpmath, install python-matplotlib. + +%package doc +Summary: HTML documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} + +%description doc +This package contains the HTML documentation for %{name}. + + +%prep +%setup -q -n mpmath-%{version} +# Convert line encodings +for doc in LICENSE CHANGES PKG-INFO README mpmath/tests/runtests.py; do + sed "s|\r||g" $doc > $doc.new && \ + touch -r $doc $doc.new && \ + mv $doc.new $doc +done +find doc -name *.txt -exec sed -i "s|\r||g" {} \; + +# Get rid of unnecessary shebangs +for lib in mpmath/elliptic.py mpmath/tests/runtests.py; do + sed '/#!\/usr\/bin\/env/d' $lib > $lib.new && \ + touch -r $lib $lib.new && \ + mv $lib.new $lib +done + +%build +python setup.py build +# Build documentation +cd doc +python build.py + +%install +rm -rf %{buildroot} +python setup.py install -O1 --skip-build --root %{buildroot} + +%check +cd build/lib/mpmath/tests/ +py.test + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc CHANGES LICENSE PKG-INFO README +%{python_sitelib}/mpmath/ +%{python_sitelib}/mpmath-%{version}-*.egg-info + +%files doc +%defattr(-,root,root,-) +%doc doc/build/* + +%changelog +* Tue Oct 06 2009 Jussi Lehtola - 0.13-5 +- Removed BR: python-matplotlib, since it didn't actually help in the missing + image problem. +- Added versioned require in -doc. + +* Tue Oct 06 2009 Jussi Lehtola - 0.13-4 +- Replaced R: python-matplotlib with a comment in %%description. +- Added missing BR: python-matplotlib. + +* Tue Oct 06 2009 Jussi Lehtola - 0.13-3 +- Added missing BR: dvipng. +- Added %%check phase. + +* Wed Sep 23 2009 Jussi Lehtola - 0.13-2 +- Add missing BR: tex(latex). + +* Wed Sep 23 2009 Jussi Lehtola - 0.13-1 +- First release. diff --git a/sources b/sources index e69de29..ffcffdd 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ed7812cc7470c0b8fbbca76a2ff02075 mpmath-0.13.tar.gz