From 08f953fe944ed8d0a1827743c59065faadf1f09d Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Nov 22 2010 16:21:42 +0000 Subject: Initial import (#527462) --- diff --git a/.gitignore b/.gitignore index e69de29..b8813ea 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/gmpy-1.14.zip diff --git a/gmpy.spec b/gmpy.spec new file mode 100644 index 0000000..12036e6 --- /dev/null +++ b/gmpy.spec @@ -0,0 +1,82 @@ +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 1.14-1 +- sync with upstream + +* Mon Nov 15 2010 Michael J Gruber 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 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 1.13-1 +- initial packaging for Fedora diff --git a/sources b/sources index e69de29..6eb9079 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +919c25062a868c70617276edeaeb1521 gmpy-1.14.zip