1 |
arfrever 10/12/31 20:10:05 |
2 |
|
3 |
Added: scientificpython-2.9.1-mpi-netcdf.patch |
4 |
Log: |
5 |
Version bump. |
6 |
|
7 |
(Portage version: 2.2.0_alpha11_p1/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-python/scientificpython/files/scientificpython-2.9.1-mpi-netcdf.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/scientificpython/files/scientificpython-2.9.1-mpi-netcdf.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/scientificpython/files/scientificpython-2.9.1-mpi-netcdf.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: scientificpython-2.9.1-mpi-netcdf.patch |
16 |
=================================================================== |
17 |
--- setup.py |
18 |
+++ setup.py |
19 |
@@ -2,7 +2,7 @@ |
20 |
|
21 |
from distutils.core import setup, Extension |
22 |
from distutils.command.install_headers import install_headers |
23 |
-import os, sys, platform |
24 |
+import os, sys, platform, subprocess |
25 |
from glob import glob |
26 |
|
27 |
class Dummy: |
28 |
@@ -103,13 +103,16 @@ |
29 |
netcdf_include = os.path.join(netcdf_prefix, 'include') |
30 |
netcdf_h_file = os.path.join(netcdf_prefix, 'include', 'netcdf.h') |
31 |
netcdf_lib = os.path.join(netcdf_prefix, 'lib') |
32 |
+ mpi_cflags = subprocess.Popen(["mpicc", "-showme:compile"], stdout=subprocess.PIPE).communicate()[0].rstrip().split() |
33 |
+ mpi_ldflags = subprocess.Popen(["mpicc", "-showme:link"], stdout=subprocess.PIPE).communicate()[0].rstrip().split() |
34 |
ext_modules = [Extension('Scientific_netcdf', |
35 |
['Src/Scientific_netcdf.c'], |
36 |
include_dirs=['Include', netcdf_include] |
37 |
+ arrayobject_h_include, |
38 |
library_dirs=[netcdf_lib], |
39 |
libraries = ['netcdf'], |
40 |
- extra_compile_args=extra_compile_args)] |
41 |
+ extra_compile_args=extra_compile_args + mpi_cflags, |
42 |
+ extra_link_args=mpi_ldflags)] |
43 |
|
44 |
try: |
45 |
# Add code for including documentation in Mac packages |