9e437a
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
9e437a
bf50a8
%define rver   2.8.0
1304c8
Name:          rpy
1304c8
Summary:       Python interface to the R language
75810a
Version:       1.0.3
bf50a8
Release:       4%{?dist}
1304c8
Url:           http://rpy.sourceforge.net
2c17da
Source:        http://downloads.sf.net/%{name}/%{name}-%{version}.tar.gz
1304c8
License:       GPLv2+
1304c8
Group:         Development/Libraries
1304c8
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
75810a
75810a
# The R headers are now in /usr/include/R (for F9+)
1730c1
Patch0:        rpy-1.0.1-FHSinclude.patch
75810a
# Backported patches from development
75810a
Patch1:	       rpy-1.0.3-turn-off-debug.patch
75810a
Patch2:	       rpy-1.0.3-use-lapack.patch
bf50a8
# Rdevices.h is gone in 2.8.0
bf50a8
Patch3:        rpy-1.0.3-R-2.8.0.patch
1304c8
a51fb6
BuildRequires: R-devel = %{rver}, numpy, python-devel, texinfo-tex, tetex
1304c8
1304c8
Requires:      numpy
1730c1
Requires:      R = %{rver}
1304c8
d4ddba
Requires(post): /sbin/install-info
d4ddba
Requires(preun): /sbin/install-info
9e437a
9e437a
%description
9e437a
RPy provides a robust Python interface to the R
9e437a
programming language.  It can manage all kinds of R objects and can
9e437a
execute arbitrary R functions. All the errors from the R language are
9e437a
converted to Python exceptions.
9e437a
2c17da
%prep
2c17da
%setup -q
1730c1
%patch0
75810a
%patch1 -p2
75810a
%patch2 -p2
bf50a8
%patch3 -p1
9e437a
9e437a
%build
9e437a
env CFLAGS="$RPM_OPT_FLAGS" python setup.py build
d4ddba
cd doc
1304c8
makeinfo --html rpy.texi
1304c8
makeinfo --html rpy.texi
d4ddba
mv rpy manual
d4ddba
make pdf
d4ddba
make info
9e437a
9e437a
%install
9e437a
rm -rf $RPM_BUILD_ROOT
9e437a
python setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT
d4ddba
cd doc
d4ddba
install -d $RPM_BUILD_ROOT/%{_infodir}
d4ddba
install rpy.info $RPM_BUILD_ROOT/%{_infodir}
9e437a
9e437a
%clean
9e437a
rm -rf $RPM_BUILD_ROOT
9e437a
d4ddba
%post
d4ddba
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
d4ddba
d4ddba
%preun
d4ddba
if [ $1 = 0 ]; then
d4ddba
    /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
d4ddba
fi
d4ddba
9e437a
9e437a
%files
9e437a
%defattr(-,root,root)
1304c8
%doc NEWS README examples/
1304c8
%doc doc/rpy.pdf doc/manual/
d4ddba
%{_infodir}/rpy.info*
9e437a
%{python_sitearch}/*
9e437a
9e437a
9e437a
%changelog
bf50a8
* Sun Oct 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.3-4
bf50a8
- rebuild against R-2.8.0
bf50a8
293681
* Fri Aug 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.3-3
293681
- rebuild against R-2.7.2
293681
40baa8
* Tue Jul  8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.3-2
40baa8
- rebuild against R 2.7.1
40baa8
75810a
* Wed May 21 2008 José Matos <jamatos[at]fc.up.pt> - 1.0.3-1
75810a
- Update to 1.0.3
75810a
- Backport two patches from upstream (turn off debug and use the lapack version that R was compiled with)
75810a
a6f8ff
* Tue Apr 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.2-1
a6f8ff
- update to 1.0.2
a6f8ff
- R 2.7.0
a6f8ff
a51fb6
* Wed Feb 13 2008 José Matos <jamatos[at]fc.up.pt> - 1.0.1-5
a51fb6
- BR texinfo -> texinfo-tex
a51fb6
b975b2
* Wed Feb 13 2008 José Matos <jamatos[at]fc.up.pt> - 1.0.1-4
b975b2
- Rebuild for gcc 4.3
b975b2
c4d2e1
* Fri Feb  8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.1-3
c4d2e1
- rebuild for R 2.6.2
c4d2e1
1730c1
* Mon Feb  4 2008 José Matos <jamatos[at]fc.up.pt> - 1.0.1-2
1730c1
- Sometimes _patch_'s guesses are not good enough. Redo patch to setup.py.
1730c1
2c17da
* Sun Feb  3 2008 José Matos <jamatos[at]fc.up.pt> - 1.0.1-1
2c17da
- New upstream release.
2c17da
116cd2
* Mon Jan  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0-0.7.RC3
116cd2
- find the moved R headers in their new home (/usr/include/R)
116cd2
18429a
* Mon Jan  7 2008 Alex Lancaster <alexlan[at]fedoraproject org=""> - 1.0-0.6.RC3
18429a
- BuildRequires: R-devel rather than just R
18429a
cf20ff
* Mon Nov 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0-0.5.RC3
cf20ff
- really rebuild against R 2.6.1
cf20ff
- versioned buildrequires for R
cf20ff
464732
* Mon Nov 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0-0.4.RC3
464732
- rebuild against R 2.6.1
464732
3a0578
* Mon Oct  8 2007 José Matos <jamatos[at]fc.up.pt> - 1.0-0.3.RC3
3a0578
- Rebuild for R 2.6.0 (really).
3a0578
8dbb07
* Fri Oct  5 2007 José Matos <jamatos[at]fc.up.pt> - 1.0-0.2.RC3
8dbb07
- Rebuild for R version 2.6.
8dbb07
1304c8
* Wed Aug 29 2007 José Matos <jamatos[at]fc.up.pt> - 1.0-0.1.RC3
1304c8
- New upstream version.
1304c8
- Change from python-numeric to numpy package.
1304c8
37576e
* Tue Aug 28 2007 José Matos <jamatos[at]fc.up.pt> - 0.4.6-18
37576e
- License fix, rebuild for devel (F8).
37576e
ee5b7b
* Fri Jul  6 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 0.4.6-17
ee5b7b
- Rebuild to link with R 2.5.1
ee5b7b
e65177
* Thu Apr 26 2007 José Matos <jamatos[at]fc.up.pt> - 0.4.6-16
e65177
- Rebuild to link with R 2.5.0
e65177
e68d4e
* Thu Dec 21 2006 Tom "spot" Callaway <tcallawa@redhat.com> - 0.4.6-15
e68d4e
- Rebuild for new R-version.
e68d4e
f046ae
* Tue Dec 12 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-14
f046ae
- Rebuild for python 2.5.
f046ae
65c5be
* Tue Oct 17 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-13
65c5be
- Rebuild for new R-version.
65c5be
e4a56f
* Thu Sep 14 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-12
e4a56f
- Rebuild for FC6.
e4a56f
e4a56f
* Sun Jun  4 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-11
eb52a3
- Rebuild for R-2.3.1
eb52a3
e4a56f
* Wed Apr 26 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-10
30bba6
- BuildRequires tetex for "make pdf" (pdftex).
30bba6
e4a56f
* Wed Apr 26 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-9
172da4
- Fix detection of R version.
172da4
e4a56f
* Wed Apr 26 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-8
99a603
- Rebuild for R-2.3.0
99a603
e4a56f
* Fri Feb 17 2006 Alex Lancaster <alexl[at]users.sourceforge.net> - 0.4.6-7
d4ddba
- Build info docs (bz#169002).
d4ddba
- Build pdf and html documentation, clean doc directory. (jamatos)
d4ddba
e4a56f
* Thu Feb 16 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-6
334f8e
- Use a fixed value for R version.
334f8e
e4a56f
* Thu Feb 16 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-5
96255a
- Set explicit dependency on exact version of R used to build the package. (bz#177078)
96255a
e4a56f
* Tue Jan  3 2006 José Matos <jamatos[at]fc.up.pt> - 0.4.6-4
07ea34
- Update for R-2.2.1
07ea34
e4a56f
* Tue Oct 11 2005 José Matos <jamatos[at]fc.up.pt> - 0.4.6-3
e3aec8
- Another try to deal with make tag.
e3aec8
e4a56f
* Mon Oct 10 2005 José Matos <jamatos[at]fc.up.pt> - 0.4.6-2
de3ae1
- Rebuild for R-2.2.0
de3ae1
e4a56f
* Thu Sep 15 2005 José Matos <jamatos[at]fc.up.pt> - 0.4.6-1
9e437a
- Initial package for Fedora Extras