rpms/ScientificPython/devel ScientificPython-netcdf-better-location.patch, NONE, 1.1 ScientificPython.spec, 1.18, 1.19

Jef Spaleta jspaleta at fedoraproject.org
Wed Jul 15 18:00:58 UTC 2009


Author: jspaleta

Update of /cvs/pkgs/rpms/ScientificPython/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6269

Modified Files:
	ScientificPython.spec 
Added Files:
	ScientificPython-netcdf-better-location.patch 
Log Message:
* Wed Jul 15 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-6
- Even better patch!


ScientificPython-netcdf-better-location.patch:

--- NEW FILE ScientificPython-netcdf-better-location.patch ---
--- setup.py.old	2009-07-15 08:29:35.000000000 -0800
+++ setup.py	2009-07-15 09:33:45.000000000 -0800
@@ -45,6 +45,9 @@
                                  "Lib/site-packages/numpy/core/include")]
     else:
         arrayobject_h_include = [os.path.join(sys.prefix,
+                                "lib64/python%s.%s/site-packages/numpy/core/include"
+                                % sys.version_info [:2]),
+                                os.path.join(sys.prefix,
                                 "lib/python%s.%s/site-packages/numpy/core/include"
                                 % sys.version_info [:2])]
 
@@ -75,13 +78,25 @@
         netcdf_prefix=os.environ['NETCDF_PREFIX']
     except KeyError:
         pass
+netcdf_include=None
+netcdf_lib=None
 if netcdf_prefix is None:
     for netcdf_prefix in ['/usr/local', '/usr', '/sw']:
-        netcdf_include = os.path.join(netcdf_prefix, 'include')
-        netcdf_lib = os.path.join(netcdf_prefix, 'lib')
-        if os.path.exists(os.path.join(netcdf_include, 'netcdf.h')):
-            break
-    else:
+      for netcdf_postfix in ['', 'netcdf', 'netcdf-3']:
+        netcdf_include = os.path.join(netcdf_prefix, 'include',netcdf_postfix)
+        for arch_lib in ['lib64', 'lib']:
+             netcdf_lib = os.path.join(netcdf_prefix, arch_lib)
+             if os.path.exists(os.path.join(netcdf_include, 'netcdf.h')):
+                 break
+             else:
+               arch_lib = None
+        if arch_lib is not None:
+          break
+        else:
+          netcdf_postfix = None
+      if netcdf_postfix is not None:
+        break
+      else:
         netcdf_prefix = None
 
 if netcdf_prefix is None:
@@ -105,9 +120,9 @@
         options['bdist_wininst'] = {'install_script': "scientific_win32_postinstall.py"}
     else:
         print "Using netCDF installation in ", netcdf_prefix
-        netcdf_include = os.path.join(netcdf_prefix, 'include')
-        netcdf_h_file = os.path.join(netcdf_prefix, 'include', 'netcdf.h')
-        netcdf_lib = os.path.join(netcdf_prefix, 'lib')
+        if netcdf_include == None: netcdf_include = os.path.join(netcdf_prefix, 'include')
+        netcdf_h_file = os.path.join(netcdf_include, 'netcdf.h')
+        if netcdf_lib==None: netcdf_lib = os.path.join(netcdf_prefix, 'lib')
     ext_modules = [Extension('Scientific_netcdf',
                              ['Src/Scientific_netcdf.c'],
                              include_dirs=['Include', netcdf_include]


Index: ScientificPython.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ScientificPython/devel/ScientificPython.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- ScientificPython.spec	2 Mar 2009 03:00:28 -0000	1.18
+++ ScientificPython.spec	15 Jul 2009 18:00:58 -0000	1.19
@@ -3,7 +3,7 @@
 
 Name:           ScientificPython
 Version:        2.8
-Release:        4%{?dist}
+Release:        6%{?dist}
 Summary:        A collection of Python modules that are useful for scientific computing
 
 Group:          Development/Languages
@@ -12,11 +12,12 @@ URL:            http://dirac.cnrs-orlean
 Source0:        http://sourcesup.cru.fr/frs/download.php/1034/ScientificPython-%{version}.tar.gz
 Patch0:         ScientificPython-arch-lib.patch
 Patch1:         ScientificPython-mpi-compile.patch
+Patch2:         ScientificPython-netcdf-better-location.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  python-devel
 BuildRequires:  netcdf-devel 
-BuildRequires:  openmpi-devel 
+#BuildRequires:  openmpi-devel 
 BuildRequires: numpy
 Requires: numpy
 
@@ -69,8 +70,8 @@ that tell you how to program with Scient
 
 %prep
 %setup -q
-%patch0 -p 1
 %patch1 -p 1
+%patch2 -p 0
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
@@ -155,6 +156,13 @@ rm -rf $RPM_BUILD_ROOT
 %doc Doc/Reference Examples Doc/BSP_Tutorial.pdf
 
 %changelog
+* Wed Jul 15 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-6
+- Even better patch!
+
+* Wed Jul 15 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-5
+- Fix netcdf location patch with better long term fix provided 
+  by user in bug 511313
+
 * Sun Mar 1 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-4
 - Fix MPI compile script 
 




More information about the fedora-extras-commits mailing list