diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2007-09-11 17:32:38 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2007-09-11 17:32:38 +0000 |
commit | ab5f4b7a302712602326459470781edef1e3f7d8 (patch) | |
tree | ee2adb50cfef13cde7f5dbbe8aea236fa513b668 /sci-libs | |
parent | Initial commit for bug 156695, thanks to Ed Catmur for reporting. (diff) | |
download | gentoo-2-ab5f4b7a302712602326459470781edef1e3f7d8.tar.gz gentoo-2-ab5f4b7a302712602326459470781edef1e3f7d8.tar.bz2 gentoo-2-ab5f4b7a302712602326459470781edef1e3f7d8.zip |
fixed conflict with cdf (bug #191593), removed old versions
(Portage version: 2.1.2.12)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/scipy/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.5.2-cdf.patch | 24 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.5.2-getpath.patch | 108 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.5.2-mio.patch | 524 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.5.2-umfpack.patch | 28 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.5.2.1.ebuild | 4 |
6 files changed, 34 insertions, 662 deletions
diff --git a/sci-libs/scipy/ChangeLog b/sci-libs/scipy/ChangeLog index 768031c6bd64..5908ea6da1eb 100644 --- a/sci-libs/scipy/ChangeLog +++ b/sci-libs/scipy/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/scipy # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.21 2007/09/09 14:27:39 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.22 2007/09/11 17:32:38 bicatali Exp $ + + 11 Sep 2007; Sébastien Fabbro <bicatali@gentoo.org> + +files/scipy-0.5.2-cdf.patch, -files/scipy-0.5.2-getpath.patch, + -files/scipy-0.5.2-mio.patch, -files/scipy-0.5.2-umfpack.patch, + scipy-0.5.2.1.ebuild: + fixed conflict with cdf (bug #191593), removed old versions 09 Sep 2007; Joseph Jezak <josejx@gentoo.org> scipy-0.5.2.1.ebuild: Marked ~ppc for bug #191600. diff --git a/sci-libs/scipy/files/scipy-0.5.2-cdf.patch b/sci-libs/scipy/files/scipy-0.5.2-cdf.patch new file mode 100644 index 000000000000..99a334071c15 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.5.2-cdf.patch @@ -0,0 +1,24 @@ +--- Lib/special/setup.py.orig 2007-09-11 18:11:04.457232054 +0100 ++++ Lib/special/setup.py 2007-09-11 18:09:23.103456231 +0100 +@@ -20,9 +20,9 @@ + # Fortran libraries + config.add_library('mach',sources=[join('mach','*.f')], + config_fc={'noopt':(__file__,1)}) +- config.add_library('toms',sources=[join('amos','*.f')]) +- config.add_library('amos',sources=[join('toms','*.f')]) +- config.add_library('cdf',sources=[join('cdflib','*.f')]) ++ config.add_library('toms',sources=[join('toms','*.f')]) ++ config.add_library('amos',sources=[join('amos','*.f')]) ++ config.add_library('cdflib',sources=[join('cdflib','*.f')]) + config.add_library('specfun',sources=[join('specfun','*.f')]) + + # Extension _cephes +@@ -30,7 +30,7 @@ + 'toms_wrappers.c','cdf_wrappers.c','ufunc_extras.c'] + config.add_extension('_cephes', sources=sources, + libraries=['amos','toms','c_misc','cephes','mach', +- 'cdf', 'specfun'], ++ 'cdflib', 'specfun'], + define_macros = define_macros + ) + # Extension specfun diff --git a/sci-libs/scipy/files/scipy-0.5.2-getpath.patch b/sci-libs/scipy/files/scipy-0.5.2-getpath.patch deleted file mode 100644 index fe98a999411e..000000000000 --- a/sci-libs/scipy/files/scipy-0.5.2-getpath.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff -Nur Lib.orig/linalg/setup_atlas_version.py Lib/linalg/setup_atlas_version.py ---- Lib.orig/linalg/setup_atlas_version.py 2006-03-15 02:29:45.000000000 +0000 -+++ Lib/linalg/setup_atlas_version.py 2007-06-06 16:43:08.000000000 +0100 -@@ -4,14 +4,14 @@ - - import os - from distutils.core import Extension --from numpy.distutils.misc_util import get_path, default_config_dict -+from numpy.distutils.misc_util import get_path_from_frame, default_config_dict - from numpy.distutils.system_info import get_info,AtlasNotFoundError - - def configuration (parent_package=''): - package = 'linalg' - config = default_config_dict(package,parent_package) - del config['fortran_libraries'] -- local_path = get_path(__name__) -+ local_path = get_path_from_frame(__name__) - atlas_info = get_info('atlas_threads') - if not atlas_info: - atlas_info = get_info('atlas') -diff -Nur Lib.orig/odr/setup.py Lib/odr/setup.py ---- Lib.orig/odr/setup.py 2006-12-02 03:24:44.000000000 +0000 -+++ Lib/odr/setup.py 2007-06-06 16:43:08.000000000 +0100 -@@ -6,7 +6,7 @@ - import warnings - - from numpy.distutils.core import Extension --from numpy.distutils.misc_util import get_path, Configuration, dot_join -+from numpy.distutils.misc_util import get_path_from_frame, Configuration, dot_join - - from numpy.distutils.system_info import get_info,dict_append,\ - AtlasNotFoundError,LapackNotFoundError,BlasNotFoundError,\ -diff -Nur Lib.orig/sandbox/ga/setup_ga.py Lib/sandbox/ga/setup_ga.py ---- Lib.orig/sandbox/ga/setup_ga.py 2006-01-05 03:35:26.000000000 +0000 -+++ Lib/sandbox/ga/setup_ga.py 2007-06-06 16:43:08.000000000 +0100 -@@ -1,7 +1,7 @@ - #!/usr/bin/env python - - import os --from numpy.distutils.misc_util import get_path, default_config_dict -+from numpy.distutils.misc_util import get_path_from_frame, default_config_dict - - def configuration(parent_package='',parent_path=None): - package = 'ga' -diff -Nur Lib.orig/sandbox/gplt/setup_gplt.py Lib/sandbox/gplt/setup_gplt.py ---- Lib.orig/sandbox/gplt/setup_gplt.py 2006-01-05 03:35:31.000000000 +0000 -+++ Lib/sandbox/gplt/setup_gplt.py 2007-06-06 16:43:08.000000000 +0100 -@@ -1,11 +1,11 @@ - #!/usr/bin/env python - - import os, sys --from numpy.distutils.misc_util import get_path, default_config_dict -+from numpy.distutils.misc_util import get_path_from_frame, default_config_dict - - def configuration(parent_package='',parent_path=None): - package = 'gplt' -- local_path = get_path(__name__,parent_path) -+ local_path = get_path_from_frame(__name__,parent_path) - config = default_config_dict(package,parent_package) - - if sys.platform == 'win32': -diff -Nur Lib.orig/sandbox/image/setup_image.py Lib/sandbox/image/setup_image.py ---- Lib.orig/sandbox/image/setup_image.py 2006-03-15 02:29:18.000000000 +0000 -+++ Lib/sandbox/image/setup_image.py 2007-06-06 16:43:08.000000000 +0100 -@@ -6,12 +6,12 @@ - def configuration(parent_package='', parent_path=None): - from numpy.distutils.system_info import get_info, dict_append - from numpy.distutils.misc_util import default_config_dict, \ -- dot_join, get_path -+ dot_join, get_path_from_frame - - package = 'image' - config = default_config_dict(package,parent_package) - -- local_path = get_path(__name__, parent_path) -+ local_path = get_path_from_frame(__name__, parent_path) - image_path = os.path.join(parent_package,'image') - - color_files = glob(os.path.join(local_path, '*.txt')) -diff -Nur Lib.orig/sandbox/plt/setup_plt.py Lib/sandbox/plt/setup_plt.py ---- Lib.orig/sandbox/plt/setup_plt.py 2006-01-13 00:08:11.000000000 +0000 -+++ Lib/sandbox/plt/setup_plt.py 2007-06-06 16:43:08.000000000 +0100 -@@ -1,11 +1,11 @@ - #!/usr/bin/env python - - import os --from numpy.distutils.misc_util import get_path, default_config_dict -+from numpy.distutils.misc_util import get_path_from_frame, default_config_dict - - def configuration(parent_package='',parent_path=None): - package = 'plt' -- local_path = get_path(__name__,parent_path) -+ local_path = get_path_from_frame(__name__,parent_path) - config = default_config_dict(package,parent_package) - return config - -diff -Nur Lib.orig/sandbox/pysparse/setup.py Lib/sandbox/pysparse/setup.py ---- Lib.orig/sandbox/pysparse/setup.py 2006-03-15 02:29:36.000000000 +0000 -+++ Lib/sandbox/pysparse/setup.py 2007-06-06 16:43:08.000000000 +0100 -@@ -12,7 +12,7 @@ - - import os - from numpy.distutils.core import Extension --from numpy.distutils.misc_util import get_path,Configuration,dot_join -+from numpy.distutils.misc_util import get_path_from_frame,Configuration,dot_join - join = os.path.join - import glob - diff --git a/sci-libs/scipy/files/scipy-0.5.2-mio.patch b/sci-libs/scipy/files/scipy-0.5.2-mio.patch deleted file mode 100644 index b48c8eb4e770..000000000000 --- a/sci-libs/scipy/files/scipy-0.5.2-mio.patch +++ /dev/null @@ -1,524 +0,0 @@ -diff -Nur Lib/io.orig/mio4.py Lib/io/mio4.py ---- Lib/io.orig/mio4.py 2007-06-06 14:56:05.610464000 +0100 -+++ Lib/io/mio4.py 2007-06-06 14:56:17.015176750 +0100 -@@ -1,9 +1,9 @@ - ''' Classes for read / write of matlab (TM) 4 files - ''' - --from numpy import * -+import numpy as N - --from miobase import * -+from scipy.io.miobase import * - - miDOUBLE = 0 - miSINGLE = 1 -@@ -76,7 +76,7 @@ - header['mclass'] = T - header['dims'] = (data['mrows'], data['ncols']) - header['is_complex'] = data['imagf'] == 1 -- remaining_bytes = header['dtype'].itemsize * product(header['dims']) -+ remaining_bytes = header['dtype'].itemsize * N.product(header['dims']) - if header['is_complex'] and not header['mclass'] == mxSPARSE_CLASS: - remaining_bytes *= 2 - next_pos = self.mat_stream.tell() + remaining_bytes -@@ -109,7 +109,7 @@ - num_bytes = dt.itemsize - for d in dims: - num_bytes *= d -- arr = ndarray(shape=dims, -+ arr = N.ndarray(shape=dims, - dtype=dt, - buffer=self.mat_stream.read(num_bytes), - order='F') -@@ -122,9 +122,9 @@ - def __init__(self, array_reader, header): - super(Mat4FullGetter, self).__init__(array_reader, header) - if header['is_complex']: -- self.mat_dtype = dtype(complex128) -+ self.mat_dtype = N.dtype(N.complex128) - else: -- self.mat_dtype = dtype(float64) -+ self.mat_dtype = N.dtype(N.float64) - - def get_raw_array(self): - if self.header['is_complex']: -@@ -137,12 +137,12 @@ - - class Mat4CharGetter(Mat4MatrixGetter): - def get_raw_array(self): -- arr = self.read_array().astype(uint8) -+ arr = self.read_array().astype(N.uint8) - # ascii to unicode - S = arr.tostring().decode('ascii') -- return ndarray(shape=self.header['dims'], -- dtype=dtype('U1'), -- buffer = array(S)).copy() -+ return N.ndarray(shape=self.header['dims'], -+ dtype=N.dtype('U1'), -+ buffer = N.array(S)).copy() - - - class Mat4SparseGetter(Mat4MatrixGetter): -@@ -166,7 +166,7 @@ - res = self.read_array() - tmp = res[:-1,:] - dims = res[-1,0:2] -- ij = transpose(tmp[:,0:2]) - 1 # for 1-based indexing -+ ij = N.transpose(tmp[:,0:2]) - 1 # for 1-based indexing - vals = tmp[:,2] - if res.shape[1] == 4: - vals = vals + res[:-1,3] * 1j -@@ -196,15 +196,15 @@ - def format_looks_right(self): - # Mat4 files have a zero somewhere in first 4 bytes - self.mat_stream.seek(0) -- mopt_bytes = ndarray(shape=(4,), -- dtype=uint8, -+ mopt_bytes = N.ndarray(shape=(4,), -+ dtype=N.uint8, - buffer = self.mat_stream.read(4)) - self.mat_stream.seek(0) - return 0 in mopt_bytes - - def guess_byte_order(self): - self.mat_stream.seek(0) -- mopt = self.read_dtype(dtype('i4')) -+ mopt = self.read_dtype(N.dtype('i4')) - self.mat_stream.seek(0) - if mopt < 0 or mopt > 5000: - return ByteOrder.swapped_code -@@ -222,7 +222,7 @@ - ''' - if dims is None: - dims = self.arr.shape -- header = empty((), mdtypes_template['header']) -+ header = N.empty((), mdtypes_template['header']) - M = not ByteOrder.little_endian - O = 0 - header['mopt'] = (M * 1000 + -@@ -237,11 +237,10 @@ - self.write_string(self.name + '\0') - - def arr_to_2d(self): -- self.arr = atleast_2d(self.arr) -+ self.arr = N.atleast_2d(self.arr) - dims = self.arr.shape - if len(dims) > 2: -- dims = [product(dims[:-1]), dims[-1]] -- self.arr = reshape(self.arr, dims) -+ self.arr = self.arr.reshape(-1,dims[-1]) - - def write(self): - assert False, 'Not implemented' -@@ -280,12 +279,12 @@ - T=mxCHAR_CLASS) - if self.arr.dtype.kind == 'U': - # Recode unicode to ascii -- n_chars = product(dims) -- st_arr = ndarray(shape=(), -+ n_chars = N.product(dims) -+ st_arr = N.ndarray(shape=(), - dtype=self.arr_dtype_number(n_chars), - buffer=self.arr) - st = st_arr.item().encode('ascii') -- self.arr = ndarray(shape=dims, dtype='S1', buffer=st) -+ self.arr = N.ndarray(shape=dims, dtype='S1', buffer=st) - self.write_bytes(self.arr) - - -@@ -296,9 +295,9 @@ - See docstring for Mat4SparseGetter - ''' - imagf = self.arr.dtype.kind == 'c' -- N = self.arr.nnz -- ijd = zeros((N+1, 3+imagf), dtype='f8') -- for i in range(N): -+ nnz = self.arr.nnz -+ ijd = N.zeros((nnz+1, 3+imagf), dtype='f8') -+ for i in range(nnz): - ijd[i,0], ijd[i,1] = self.arr.rowcol(i) - ijd[:-1,0:2] += 1 # 1 based indexing - if imagf: -@@ -322,13 +321,13 @@ - if have_sparse: - if scipy.sparse.issparse(arr): - return Mat4SparseWriter(stream, arr, name) -- arr = array(arr) -+ arr = N.array(arr) - dtt = arr.dtype.type -- if dtt is object_: -+ if dtt is N.object_: - raise TypeError, 'Cannot save object arrays in Mat4' -- elif dtt is void: -+ elif dtt is N.void: - raise TypeError, 'Cannot save void type arrays' -- elif dtt in (unicode_, string_): -+ elif dtt in (N.unicode_, N.string_): - return Mat4CharWriter(stream, arr, name) - else: - return Mat4NumericWriter(stream, arr, name) -diff -Nur Lib/io.orig/mio5.py Lib/io/mio5.py ---- Lib/io.orig/mio5.py 2007-06-06 14:56:05.610464000 +0100 -+++ Lib/io/mio5.py 2007-06-06 14:56:17.019177000 +0100 -@@ -29,9 +29,9 @@ - import zlib - from copy import copy as pycopy - from cStringIO import StringIO --from numpy import * -+import numpy as N - --from miobase import * -+from scipy.io.miobase import * - - try: # Python 2.3 support - from sets import Set as set -@@ -154,10 +154,10 @@ - - def read_element(self, copy=True): - raw_tag = self.mat_stream.read(8) -- tag = ndarray(shape=(), -+ tag = N.ndarray(shape=(), - dtype=self.dtypes['tag_full'], - buffer = raw_tag) -- mdtype = tag['mdtype'] -+ mdtype = tag['mdtype'].item() - byte_count = mdtype >> 16 - if byte_count: # small data element format - if byte_count > 4: -@@ -165,10 +165,10 @@ - mdtype = mdtype & 0xFFFF - dt = self.dtypes[mdtype] - el_count = byte_count / dt.itemsize -- return ndarray(shape=(el_count,), -+ return N.ndarray(shape=(el_count,), - dtype=dt, - buffer=raw_tag[4:]) -- byte_count = tag['byte_count'] -+ byte_count = tag['byte_count'].item() - if mdtype == miMATRIX: - return self.current_getter(byte_count).get_array() - if mdtype in self.codecs: # encoded char data -@@ -180,7 +180,7 @@ - else: # numeric data - dt = self.dtypes[mdtype] - el_count = byte_count / dt.itemsize -- el = ndarray(shape=(el_count,), -+ el = N.ndarray(shape=(el_count,), - dtype=dt, - buffer=self.mat_stream.read(byte_count)) - if copy: -@@ -193,8 +193,8 @@ - def matrix_getter_factory(self): - ''' Returns reader for next matrix at top level ''' - tag = self.read_dtype(self.dtypes['tag_full']) -- mdtype = tag['mdtype'] -- byte_count = tag['byte_count'] -+ mdtype = tag['mdtype'].item() -+ byte_count = tag['byte_count'].item() - next_pos = self.mat_stream.tell() + byte_count - if mdtype == miCOMPRESSED: - getter = Mat5ZArrayReader(self, byte_count).matrix_getter_factory() -@@ -285,7 +285,7 @@ - self.mat_dtype = 'f8' - - def get_raw_array(self): -- return array([[]]) -+ return N.array([[]]) - - - class Mat5NumericMatrixGetter(Mat5MatrixGetter): -@@ -293,7 +293,7 @@ - def __init__(self, array_reader, header): - super(Mat5NumericMatrixGetter, self).__init__(array_reader, header) - if header['is_logical']: -- self.mat_dtype = dtype('bool') -+ self.mat_dtype = N.dtype('bool') - else: - self.mat_dtype = self.class_dtypes[header['mclass']] - -@@ -305,7 +305,7 @@ - res = res + (res_j * 1j) - else: - res = self.read_element() -- return ndarray(shape=self.header['dims'], -+ return N.ndarray(shape=self.header['dims'], - dtype=res.dtype, - buffer=res, - order='F') -@@ -334,14 +334,14 @@ - stored in column order, this gives the column corresponding to - each rowind - ''' -- cols = empty((len(res)), dtype=rowind.dtype) -- col_counts = diff(colind) -+ cols = N.empty((len(res)), dtype=rowind.dtype) -+ col_counts = N.diff(colind) - start_row = 0 -- for i in where(col_counts)[0]: -+ for i in N.where(col_counts)[0]: - end_row = start_row + col_counts[i] - cols[start_row:end_row] = i - start_row = end_row -- ij = vstack((rowind[:len(res)], cols)) -+ ij = N.vstack((rowind[:len(res)], cols)) - if have_sparse: - result = scipy.sparse.csc_matrix((res,ij), - self.header['dims']) -@@ -354,19 +354,19 @@ - def get_raw_array(self): - res = self.read_element() - # Convert non-string types to unicode -- if isinstance(res, ndarray): -- if res.dtype.type == uint16: -+ if isinstance(res, N.ndarray): -+ if res.dtype.type == N.uint16: - codec = miUINT16_codec - if self.codecs['uint16_len'] == 1: -- res = res.astype(uint8) -- elif res.dtype.type in (uint8, int8): -+ res = res.astype(N.uint8) -+ elif res.dtype.type in (N.uint8, N.int8): - codec = 'ascii' - else: - raise TypeError, 'Did not expect type %s' % res.dtype - res = res.tostring().decode(codec) -- return ndarray(shape=self.header['dims'], -- dtype=dtype('U1'), -- buffer=array(res), -+ return N.ndarray(shape=self.header['dims'], -+ dtype=N.dtype('U1'), -+ buffer=N.array(res), - order='F').copy() - - -@@ -374,12 +374,11 @@ - def get_raw_array(self): - # Account for fortran indexing of cells - tupdims = tuple(self.header['dims'][::-1]) -- length = product(tupdims) -- result = empty(length, dtype=object) -+ length = N.product(tupdims) -+ result = N.empty(length, dtype=object) - for i in range(length): - result[i] = self.get_item() -- result = transpose(reshape(result,tupdims)) -- return result -+ return result.reshape(tupdims).T - - def get_item(self): - return self.read_element() -@@ -507,7 +506,7 @@ - ''' Read in mat 5 file header ''' - hdict = {} - hdr = self.read_dtype(self.dtypes['file_header']) -- hdict['__header__'] = hdr['description'].strip(' \t\n\000') -+ hdict['__header__'] = hdr['description'].item().strip(' \t\n\000') - v_major = hdr['version'] >> 8 - v_minor = hdr['version'] & 0xFF - hdict['__version__'] = '%d.%d' % (v_major, v_minor) -@@ -516,8 +515,8 @@ - def format_looks_right(self): - # Mat4 files have a zero somewhere in first 4 bytes - self.mat_stream.seek(0) -- mopt_bytes = ndarray(shape=(4,), -- dtype=uint8, -+ mopt_bytes = N.ndarray(shape=(4,), -+ dtype=N.uint8, - buffer = self.mat_stream.read(4)) - self.mat_stream.seek(0) - return 0 not in mopt_bytes -@@ -525,7 +524,7 @@ - - class Mat5MatrixWriter(MatStreamWriter): - -- mat_tag = zeros((), mdtypes_template['tag_full']) -+ mat_tag = N.zeros((), mdtypes_template['tag_full']) - mat_tag['mdtype'] = miMATRIX - - def __init__(self, file_stream, arr, name, is_global=False): -@@ -555,14 +554,14 @@ - self._mat_tag_pos = self.file_stream.tell() - self.write_dtype(self.mat_tag) - # write array flags (complex, global, logical, class, nzmax) -- af = zeros((), mdtypes_template['array_flags']) -+ af = N.zeros((), mdtypes_template['array_flags']) - af['data_type'] = miUINT32 - af['byte_count'] = 8 - flags = is_complex << 3 | is_global << 2 | is_logical << 1 - af['flags_class'] = mclass | flags << 8 - af['nzmax'] = nzmax - self.write_dtype(af) -- self.write_element(array(self.arr.shape, dtype='i4')) -+ self.write_element(N.array(self.arr.shape, dtype='i4')) - self.write_element(self.name) - - def update_matrix_tag(self): -@@ -598,12 +597,12 @@ - T=mxCHAR_CLASS) - if self.arr.dtype.kind == 'U': - # Recode unicode to ascii -- n_chars = product(dims) -- st_arr = ndarray(shape=(), -+ n_chars = N.product(dims) -+ st_arr = N.ndarray(shape=(), - dtype=self.arr_dtype_number(n_chars), - buffer=self.arr) - st = st_arr.item().encode('ascii') -- self.arr = ndarray(shape=dims, dtype='S1', buffer=st) -+ self.arr = N.ndarray(shape=dims, dtype='S1', buffer=st) - self.write_bytes(self.arr) - - -@@ -615,7 +614,7 @@ - ''' - imagf = self.arr.dtype.kind == 'c' - N = self.arr.nnz -- ijd = zeros((N+1, 3+imagf), dtype='f8') -+ ijd = N.zeros((N+1, 3+imagf), dtype='f8') - for i in range(N): - ijd[i,0], ijd[i,1] = self.arr.rowcol(i) - ijd[:-1,0:2] += 1 # 1 based indexing -@@ -649,7 +648,7 @@ - if have_sparse: - if scipy.sparse.issparse(arr): - return Mat5SparseWriter(self.stream, arr, name, is_global) -- arr = array(arr) -+ arr = N.array(arr) - if arr.dtype.hasobject: - types, arr_type = classify_mobjects(arr) - if arr_type == 'c': -@@ -680,13 +679,13 @@ - o - object array - ''' - N = objarr.size -- types = empty((N,), dtype='S1') -+ types = N.empty((N,), dtype='S1') - types[:] = 'i' - type_set = set() - flato = objarr.flat - for i in range(N): - obj = flato[i] -- if isinstance(obj, ndarray): -+ if isinstance(obj, N.ndarray): - types[i] = 'a' - continue - try: -@@ -743,7 +742,7 @@ - ).write() - if self.do_compression: - str = zlib.compress(stream.getvalue()) -- tag = empty((), mdtypes_template['tag_full']) -+ tag = N.empty((), mdtypes_template['tag_full']) - tag['mdtype'] = miCOMPRESSED - tag['byte_count'] = len(str) - self.file_stream.write(tag.tostring() + str) -diff -Nur Lib/io.orig/miobase.py Lib/io/miobase.py ---- Lib/io.orig/miobase.py 2007-06-06 14:56:05.610464000 +0100 -+++ Lib/io/miobase.py 2007-06-06 14:56:17.019177000 +0100 -@@ -6,7 +6,7 @@ - - import sys - --from numpy import * -+import numpy as N - - try: - import scipy.sparse -@@ -71,10 +71,10 @@ - a_dtype is assumed to be correct endianness - ''' - num_bytes = a_dtype.itemsize -- arr = ndarray(shape=(), -- dtype=a_dtype, -- buffer=self.mat_stream.read(num_bytes), -- order='F') -+ arr = N.ndarray(shape=(), -+ dtype=a_dtype, -+ buffer=self.mat_stream.read(num_bytes), -+ order='F') - return arr - - def read_ztstring(self, num_bytes): -@@ -184,7 +184,7 @@ - def convert_dtypes(self, dtype_template): - dtypes = dtype_template.copy() - for k in dtypes: -- dtypes[k] = dtype(dtypes[k]).newbyteorder( -+ dtypes[k] = N.dtype(dtypes[k]).newbyteorder( - self.order_code) - return dtypes - -@@ -227,10 +227,10 @@ - if len(dims) >= 2: # return array of strings - dtt = self.order_code + 'U' - n_dims = dims[:-1] -- str_arr = reshape(arr, -- (small_product(n_dims), -- dims[-1])) -- arr = empty(n_dims, dtype=object) -+ str_arr = arr.reshape( -+ (small_product(n_dims), -+ dims[-1])) -+ arr = N.empty(n_dims, dtype=object) - for i in range(0, n_dims[-1]): - arr[...,i] = self.chars_to_str(str_arr[i]) - else: # return string -@@ -241,9 +241,9 @@ - if getter.mat_dtype is not None: - arr = arr.astype(getter.mat_dtype) - if self.squeeze_me: -- arr = squeeze(arr) -+ arr = N.squeeze(arr) - if not arr.size: -- arr = array([]) -+ arr = N.array([]) - elif not arr.shape: # 0d coverted to scalar - arr = arr.item() - return arr -@@ -251,8 +251,8 @@ - - def chars_to_str(self, str_arr): - ''' Convert string array to string ''' -- dt = dtype('U' + str(small_product(str_arr.shape))) -- return ndarray(shape=(), -+ dt = N.dtype('U' + str(small_product(str_arr.shape))) -+ return N.ndarray(shape=(), - dtype = dt, - buffer = str_arr.copy()).item() - -@@ -354,7 +354,7 @@ - - def arr_dtype_number(self, num): - ''' Return dtype for given number of items per element''' -- return dtype(self.arr.dtype.str[:2] + str(num)) -+ return N.dtype(self.arr.dtype.str[:2] + str(num)) - - def arr_to_chars(self): - ''' Convert string array to char array ''' -@@ -362,7 +362,7 @@ - if not dims: - dims = [1] - dims.append(int(self.arr.dtype.str[2:])) -- self.arr = ndarray(shape=dims, -+ self.arr = N.ndarray(shape=dims, - dtype=self.arr_dtype_number(1), - buffer=self.arr) - -diff -Nur Lib/io.orig/mio.py Lib/io/mio.py ---- Lib/io.orig/mio.py 2007-06-06 14:56:05.610464000 +0100 -+++ Lib/io/mio.py 2007-06-06 14:56:17.015176750 +0100 -@@ -7,10 +7,10 @@ - import os - import sys - --from numpy import * -+from scipy.io.mio4 import MatFile4Reader, MatFile4Writer -+from scipy.io.mio5 import MatFile5Reader, MatFile5Writer - --from mio4 import MatFile4Reader, MatFile4Writer --from mio5 import MatFile5Reader, MatFile5Writer -+__all__ = ['find_mat_file','mat_reader_factory','loadmat', 'savemat'] - - def find_mat_file(file_name, appendmat=True): - ''' Try to find .mat file on system path diff --git a/sci-libs/scipy/files/scipy-0.5.2-umfpack.patch b/sci-libs/scipy/files/scipy-0.5.2-umfpack.patch deleted file mode 100644 index 21916b097ed9..000000000000 --- a/sci-libs/scipy/files/scipy-0.5.2-umfpack.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- Lib/linsolve/umfpack/umfpack.i.orig 2007-06-06 14:53:42.261505250 +0100 -+++ Lib/linsolve/umfpack/umfpack.i 2007-06-06 14:54:12.167374250 +0100 -@@ -114,6 +114,7 @@ - return NULL; \ - } \ - $1 = (double *) obj->data; \ -+ Py_DECREF( obj ); \ - }; - - /*! -@@ -127,7 +128,7 @@ - }; \ - %typemap( python, argout ) ttype* opaque_argout { \ - PyObject *obj; \ -- obj = SWIG_NewPointerObj( (ttype) (*$1), $*1_descriptor, 1 ); \ -+ obj = SWIG_NewPointerObj( (ttype) (*$1), $*1_descriptor, 0 ); \ - $result = helper_appendToTuple( $result, obj ); \ - }; - -@@ -143,7 +144,7 @@ - }; \ - %typemap( python, argout ) ttype* opaque_arginout { \ - PyObject *obj; \ -- obj = SWIG_NewPointerObj( (ttype) (*$1), $*1_descriptor, 1 ); \ -+ obj = SWIG_NewPointerObj( (ttype) (*$1), $*1_descriptor, 0 ); \ - $result = helper_appendToTuple( $result, obj ); \ - }; - diff --git a/sci-libs/scipy/scipy-0.5.2.1.ebuild b/sci-libs/scipy/scipy-0.5.2.1.ebuild index 8e0d861f2e27..c5dca7e416e4 100644 --- a/sci-libs/scipy/scipy-0.5.2.1.ebuild +++ b/sci-libs/scipy/scipy-0.5.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.5.2.1.ebuild,v 1.3 2007/09/09 14:27:39 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.5.2.1.ebuild,v 1.4 2007/09/11 17:32:38 bicatali Exp $ NEED_PYTHON=2.3 @@ -61,6 +61,7 @@ scipy_fortran_setup() { # see numpy ebuild about unsetting LDFLAGS LDFLAGS_sav="${LDFLAGS}" unset LDFLAGS + pkg_setup() { [[ -n "${LDFLAGS_sav}" ]] && einfo "Ignoring LDFLAGS=${LDFLAGS_sav}" if use umfpack && ! built_with_use dev-lang/swig python; then @@ -90,6 +91,7 @@ src_unpack() { epatch "${FILESDIR}"/${TP}-minpack.patch epatch "${FILESDIR}"/${TP}-bspline.patch epatch "${FILESDIR}"/${TP}-nonexisting.patch + epatch "${FILESDIR}"/${TP}-cdf.patch use sandbox && cp "${FILESDIR}"/enabled_packages.txt Lib/sandbox/ } |