- Sometimes _patch_'s guesses are not good enough. Redo patch to setup.py.

This commit is contained in:
José Abílio Oliveira Matos 2008-02-04 12:40:34 +00:00
parent 2c17da24d6
commit 1730c1d64a
3 changed files with 23 additions and 17 deletions

View File

@ -1,11 +0,0 @@
diff -up rpy-1.0-RC3/setup.py.BAD rpy-1.0-RC3/setup.py
--- rpy-1.0-RC3/setup.py.BAD 2008-01-07 19:43:13.000000000 -0500
+++ rpy-1.0-RC3/setup.py 2008-01-07 19:45:18.000000000 -0500
@@ -131,6 +131,7 @@ for RHOME in RHOMES:
else: # unix-like systems, this is known to work for Linux and Solaris
include_dirs = [ os.path.join(RHOME.strip(), 'include'),
'src' ]
+ include_dirs.append("/usr/include/R/")
libraries=['R','Rlapack']
library_dirs = r_libs
runtime_libs = r_libs

View File

@ -0,0 +1,13 @@
--- setup.py.orig 2007-11-27 02:06:32.000000000 +0000
+++ setup.py 2008-02-04 12:12:20.000000000 +0000
@@ -139,8 +139,8 @@
extra_compile_args=["-shared"]
source_files = source_files + ["src/setenv.c"]
else: # unix-like systems, this is known to work for Linux and Solaris
- include_dirs = [ os.path.join(RHOME.strip(), 'include'),
- 'src', '/usr/share/R/include' ]
+ include_dirs = [ os.path.join(RHOME.strip(), 'include'),
+ 'src', '/usr/share/R/include', "/usr/include/R/"]
libraries=['R','Rlapack']
library_dirs = r_libs
runtime_libs = r_libs

View File

@ -1,20 +1,21 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define rver 2.6.1
Name: rpy
Summary: Python interface to the R language
Version: 1.0.1
Release: 1%{?dist}
Release: 2%{?dist}
Url: http://rpy.sourceforge.net
Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.gz
License: GPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: rpy-1.0-RC3-FHSinclude.patch
Patch0: rpy-1.0.1-FHSinclude.patch
BuildRequires: R-devel = 2.6.1, numpy, python-devel, texinfo, tetex
BuildRequires: R-devel = %{rver}, numpy, python-devel, texinfo, tetex
Requires: numpy
Requires: R = 2.6.1
Requires: R = %{rver}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@ -27,8 +28,8 @@ converted to Python exceptions.
%prep
%setup -q
# The R headers are now in /usr/include/R
%patch0 -p1
# The R headers are now in /usr/include/R (for F9+)
%patch0
%build
env CFLAGS="$RPM_OPT_FLAGS" python setup.py build
@ -67,6 +68,9 @@ fi
%changelog
* Mon Feb 4 2008 José Matos <jamatos[AT]fc.up.pt> - 1.0.1-2
- Sometimes _patch_'s guesses are not good enough. Redo patch to setup.py.
* Sun Feb 3 2008 José Matos <jamatos[AT]fc.up.pt> - 1.0.1-1
- New upstream release.