summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2013-08-27 18:29:10 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2013-08-27 18:29:10 +0000
commitfd689a20c325b7c600a729e6d13c1a41f5fcc81d (patch)
treea887ede8fd9963a9ca2b18424a902b06104d6df3 /dev-python/numpy
parentfixed oops where I applied the new patch to the ebuild with stable keywords (diff)
downloadgentoo-2-fd689a20c325b7c600a729e6d13c1a41f5fcc81d.tar.gz
gentoo-2-fd689a20c325b7c600a729e6d13c1a41f5fcc81d.tar.bz2
gentoo-2-fd689a20c325b7c600a729e6d13c1a41f5fcc81d.zip
Remove trailing spaces from pkg-config calls (bug #444104), fix shared lib extension (upstream patch) for python-3 (bug #470946), remove old
(Portage version: 2.2.01.22288-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/ChangeLog8
-rw-r--r--dev-python/numpy/files/numpy-1.7.1-distutils-python33.patch540
-rw-r--r--dev-python/numpy/numpy-1.7.0.ebuild145
-rw-r--r--dev-python/numpy/numpy-1.7.1.ebuild18
4 files changed, 556 insertions, 155 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog
index 530e1ce524e1..8561cf3dd8af 100644
--- a/dev-python/numpy/ChangeLog
+++ b/dev-python/numpy/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/numpy
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.202 2013/04/16 08:58:35 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.203 2013/08/27 18:29:10 bicatali Exp $
+
+ 27 Aug 2013; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/numpy-1.7.1-distutils-python33.patch, -numpy-1.7.0.ebuild,
+ numpy-1.7.1.ebuild:
+ Remove trailing spaces from pkg-config calls (bug #444104), fix shared lib
+ extension (upstream patch) for python-3 (bug #470946), remove old
*numpy-1.7.1 (16 Apr 2013)
diff --git a/dev-python/numpy/files/numpy-1.7.1-distutils-python33.patch b/dev-python/numpy/files/numpy-1.7.1-distutils-python33.patch
new file mode 100644
index 000000000000..879a75572e2d
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.7.1-distutils-python33.patch
@@ -0,0 +1,540 @@
+--- numpy/distutils/misc_util.py.orig 2013-04-06 22:04:05.000000000 -0700
++++ numpy/distutils/misc_util.py 2013-08-27 11:11:50.970945380 -0700
+@@ -1,3 +1,5 @@
++from __future__ import division, absolute_import, print_function
++
+ import os
+ import re
+ import sys
+@@ -165,7 +167,7 @@
+ fid = open(config_file)
+ mathlibs = []
+ s = '#define MATHLIB'
+- for line in fid.readlines():
++ for line in fid:
+ if line.startswith(s):
+ value = line[len(s):].strip()
+ if value:
+@@ -218,8 +220,8 @@
+ else:
+ if include_non_existing:
+ new_paths.append(n)
+- print('could not resolve pattern in %r: %r' \
+- % (local_path,n))
++ print('could not resolve pattern in %r: %r' %
++ (local_path,n))
+ else:
+ n2 = njoin(local_path,n)
+ if os.path.exists(n2):
+@@ -230,8 +232,8 @@
+ elif include_non_existing:
+ new_paths.append(n)
+ if not os.path.exists(n):
+- print('non-existing path in %r: %r' \
+- % (local_path,n))
++ print('non-existing path in %r: %r' %
++ (local_path,n))
+
+ elif is_sequence(n):
+ new_paths.extend(_fix_paths(n,local_path,include_non_existing))
+@@ -249,11 +251,9 @@
+
+ _temporary_directory = None
+ def clean_up_temporary_directory():
+- from numpy.distutils import log
+ global _temporary_directory
+ if not _temporary_directory:
+ return
+- log.debug('removing %s', _temporary_directory)
+ try:
+ shutil.rmtree(_temporary_directory)
+ except OSError:
+@@ -394,8 +394,7 @@
+ return []
+ modules = []
+ f = open(source,'r')
+- f_readlines = getattr(f,'xreadlines',f.readlines)
+- for line in f_readlines():
++ for line in f:
+ m = f90_module_name_match(line)
+ if m:
+ name = m.group('name')
+@@ -557,7 +556,7 @@
+ def get_ext_source_files(ext):
+ # Get sources and any include files in the same directory.
+ filenames = []
+- sources = filter(is_string, ext.sources)
++ sources = [_m for _m in ext.sources if is_string(_m)]
+ filenames.extend(sources)
+ filenames.extend(get_dependencies(sources))
+ for d in ext.depends:
+@@ -568,13 +567,13 @@
+ return filenames
+
+ def get_script_files(scripts):
+- scripts = filter(is_string, scripts)
++ scripts = [_m for _m in scripts if is_string(_m)]
+ return scripts
+
+ def get_lib_source_files(lib):
+ filenames = []
+ sources = lib[1].get('sources',[])
+- sources = filter(is_string, sources)
++ sources = [_m for _m in sources if is_string(_m)]
+ filenames.extend(sources)
+ filenames.extend(get_dependencies(sources))
+ depends = lib[1].get('depends',[])
+@@ -606,11 +605,29 @@
+ Linux, but not on OS X.
+
+ """
+- so_ext = distutils.sysconfig.get_config_var('SO') or ''
+- # fix long extension for Python >=3.2, see PEP 3149.
+- if (not is_python_ext) and 'SOABI' in distutils.sysconfig.get_config_vars():
+- # Does nothing unless SOABI config var exists
+- so_ext = so_ext.replace('.' + distutils.sysconfig.get_config_var('SOABI'), '', 1)
++ confvars = distutils.sysconfig.get_config_vars()
++ # SO is deprecated in 3.3.1, use EXT_SUFFIX instead
++ so_ext = confvars.get('EXT_SUFFIX', None)
++ if so_ext is None:
++ so_ext = confvars.get('SO', '')
++
++ if not is_python_ext:
++ # hardcode known values, config vars (including SHLIB_SUFFIX) are
++ # unreliable (see #3182)
++ # darwin, windows and debug linux are wrong in 3.3.1 and older
++ if (sys.platform.startswith('linux') or
++ sys.platform.startswith('gnukfreebsd')):
++ so_ext = '.so'
++ elif sys.platform.startswith('darwin'):
++ so_ext = '.dylib'
++ elif sys.platform.startswith('win'):
++ so_ext = '.dll'
++ else:
++ # fall back to config vars for unknown platforms
++ # fix long extension for Python >=3.2, see PEP 3149.
++ if 'SOABI' in confvars:
++ # Does nothing unless SOABI config var exists
++ so_ext = so_ext.replace('.' + confvars.get('SOABI'), '', 1)
+
+ return so_ext
+
+@@ -628,7 +645,7 @@
+ if os.path.isfile(s):
+ filenames.append(s)
+ else:
+- print('Not existing data file:',s)
++ print('Not existing data file:', s)
+ else:
+ raise TypeError(repr(s))
+ return filenames
+@@ -647,56 +664,13 @@
+ frame = frame.f_back
+ return frame
+
+-class SconsInfo(object):
+- """
+- Container object holding build info for building a package with scons.
+-
+- Parameters
+- ----------
+- scons_path : str or None
+- Path to scons script, relative to the directory of setup.py.
+- If None, no scons script is specified. This can be useful to add only
+- pre- and post-hooks to a configuration.
+- parent_name : str or None
+- Name of the parent package (for example "numpy").
+- pre_hook : sequence of callables or None
+- Callables that are executed before scons is invoked.
+- Each callable should be defined as ``callable(*args, **kw)``.
+- post_hook : sequence of callables or None
+- Callables that are executed after scons is invoked.
+- Each callable should be defined as ``callable(*args, **kw)``.
+- source_files : list of str or None
+- List of paths to source files, relative to the directory of setup.py.
+- pkg_path : str or None
+- Path to the package for which the `SconsInfo` instance holds the
+- build info, relative to the directory of setup.py.
+-
+- Notes
+- -----
+- All parameters are available as attributes of a `SconsInfo` instance.
+-
+- """
+- def __init__(self, scons_path, parent_name, pre_hook,
+- post_hook, source_files, pkg_path):
+- self.scons_path = scons_path
+- self.parent_name = parent_name
+- self.pre_hook = pre_hook
+- self.post_hook = post_hook
+- self.source_files = source_files
+- if pkg_path:
+- self.pkg_path = pkg_path
+- else:
+- if scons_path:
+- self.pkg_path = os.path.dirname(scons_path)
+- else:
+- self.pkg_path = ''
+
+ ######################
+
+ class Configuration(object):
+
+ _list_keys = ['packages', 'ext_modules', 'data_files', 'include_dirs',
+- 'libraries', 'headers', 'scripts', 'py_modules', 'scons_data',
++ 'libraries', 'headers', 'scripts', 'py_modules',
+ 'installed_libraries']
+ _dict_keys = ['package_dir', 'installed_pkg_config']
+ _extra_keys = ['name', 'version']
+@@ -853,7 +827,7 @@
+ caller_level = 1):
+ l = subpackage_name.split('.')
+ subpackage_path = njoin([self.local_path]+l)
+- dirs = filter(os.path.isdir,glob.glob(subpackage_path))
++ dirs = [_m for _m in glob.glob(subpackage_path) if os.path.isdir(_m)]
+ config_list = []
+ for d in dirs:
+ if not os.path.isfile(njoin(d,'__init__.py')):
+@@ -895,7 +869,7 @@
+ pn = dot_join(*([parent_name] + subpackage_name.split('.')[:-1]))
+ args = (pn,)
+ def fix_args_py2(args):
+- if setup_module.configuration.func_code.co_argcount > 1:
++ if setup_module.configuration.__code__.co_argcount > 1:
+ args = args + (self.top_path,)
+ return args
+ def fix_args_py3(args):
+@@ -922,14 +896,14 @@
+
+ Parameters
+ ----------
+- subpackage_name: str,None
++ subpackage_name : str or None
+ Name of the subpackage to get the configuration. '*' in
+ subpackage_name is handled as a wildcard.
+- subpackage_path: str
++ subpackage_path : str
+ If None, then the path is assumed to be the local path plus the
+ subpackage_name. If a setup.py file is not found in the
+ subpackage_path, then a default configuration is used.
+- parent_name: str
++ parent_name : str
+ Parent name.
+ """
+ if subpackage_name is None:
+@@ -985,13 +959,13 @@
+
+ Parameters
+ ----------
+- subpackage_name: str
++ subpackage_name : str
+ name of the subpackage
+- subpackage_path: str
++ subpackage_path : str
+ if given, the subpackage path such as the subpackage is in
+ subpackage_path / subpackage_name. If None,the subpackage is
+ assumed to be located in the local path / subpackage_name.
+- standalone: bool
++ standalone : bool
+ """
+
+ if standalone:
+@@ -1029,10 +1003,10 @@
+
+ Parameters
+ ----------
+- data_path: seq,str
++ data_path : seq or str
+ Argument can be either
+
+- * 2-sequence (<datadir suffix>,<path to data directory>)
++ * 2-sequence (<datadir suffix>, <path to data directory>)
+ * path to data directory where python datadir suffix defaults
+ to package dir.
+
+@@ -1091,14 +1065,14 @@
+ pattern_list = allpath(d).split(os.sep)
+ pattern_list.reverse()
+ # /a/*//b/ -> /a/*/b
+- rl = range(len(pattern_list)-1); rl.reverse()
++ rl = list(range(len(pattern_list)-1)); rl.reverse()
+ for i in rl:
+ if not pattern_list[i]:
+ del pattern_list[i]
+ #
+ for path in paths:
+ if not os.path.isdir(path):
+- print('Not a directory, skipping',path)
++ print('Not a directory, skipping', path)
+ continue
+ rpath = rel_path(path, self.local_path)
+ path_list = rpath.split(os.sep)
+@@ -1151,7 +1125,7 @@
+
+ Parameters
+ ----------
+- files: sequence
++ files : sequence
+ Argument(s) can be either
+
+ * 2-sequence (<datadir prefix>,<path to data file(s)>)
+@@ -1330,7 +1304,7 @@
+
+ Parameters
+ ----------
+- files: str, seq
++ files : str or seq
+ Argument(s) can be either:
+
+ * 2-sequence (<includedir suffix>,<path to header file(s)>)
+@@ -1385,9 +1359,9 @@
+
+ Parameters
+ ----------
+- name: str
++ name : str
+ name of the extension
+- sources: seq
++ sources : seq
+ list of the sources. The list of sources may contain functions
+ (called source generators) which must take an extension instance
+ and a build directory as inputs and return a source file or list of
+@@ -1395,28 +1369,28 @@
+ generated. If the Extension instance has no sources after
+ processing all source generators, then no extension module is
+ built.
+- include_dirs:
+- define_macros:
+- undef_macros:
+- library_dirs:
+- libraries:
+- runtime_library_dirs:
+- extra_objects:
+- extra_compile_args:
+- extra_link_args:
+- extra_f77_compile_args:
+- extra_f90_compile_args:
+- export_symbols:
+- swig_opts:
+- depends:
++ include_dirs :
++ define_macros :
++ undef_macros :
++ library_dirs :
++ libraries :
++ runtime_library_dirs :
++ extra_objects :
++ extra_compile_args :
++ extra_link_args :
++ extra_f77_compile_args :
++ extra_f90_compile_args :
++ export_symbols :
++ swig_opts :
++ depends :
+ The depends list contains paths to files or directories that the
+ sources of the extension module depend on. If any path in the
+ depends list is newer than the extension module, then the module
+ will be rebuilt.
+- language:
+- f2py_options:
+- module_dirs:
+- extra_info: dict,list
++ language :
++ f2py_options :
++ module_dirs :
++ extra_info : dict or list
+ dict or list of dict of keywords to be appended to keywords.
+
+ Notes
+@@ -1653,65 +1627,6 @@
+ self.installed_pkg_config[self.name] = [(template, install_dir,
+ subst_dict)]
+
+- def add_scons_installed_library(self, name, install_dir):
+- """
+- Add a scons-built installable library to distutils.
+-
+- Parameters
+- ----------
+- name : str
+- The name of the library.
+- install_dir : str
+- Path to install the library, relative to the current sub-package.
+-
+- """
+- install_dir = os.path.join(self.package_path, install_dir)
+- self.installed_libraries.append(InstallableLib(name, {}, install_dir))
+-
+- def add_sconscript(self, sconscript, subpackage_path=None,
+- standalone = False, pre_hook = None,
+- post_hook = None, source_files = None, package_path=None):
+- """Add a sconscript to configuration.
+-
+- pre_hook and post hook should be sequences of callable, which will be
+- use before and after executing scons. The callable should be defined as
+- callable(*args, **kw). It is ugly, but well, hooks are ugly anyway...
+-
+- sconscript can be None, which can be useful to add only post/pre
+- hooks."""
+- if standalone:
+- parent_name = None
+- else:
+- parent_name = self.name
+-
+- dist = self.get_distribution()
+- # Convert the sconscript name to a relative filename (relative from top
+- # setup.py's directory)
+- fullsconsname = self.paths(sconscript)[0]
+-
+- # XXX: Think about a way to automatically register source files from
+- # scons...
+- full_source_files = []
+- if source_files:
+- full_source_files.extend([self.paths(i)[0] for i in source_files])
+-
+- scons_info = SconsInfo(fullsconsname, parent_name,
+- pre_hook, post_hook,
+- full_source_files, package_path)
+- if dist is not None:
+- if dist.scons_data is None:
+- dist.scons_data = []
+- dist.scons_data.append(scons_info)
+- self.warn('distutils distribution has been initialized,'\
+- ' it may be too late to add a subpackage '+ subpackage_name)
+- # XXX: we add a fake extension, to correctly initialize some
+- # options in distutils command.
+- dist.add_extension('', sources = [])
+- else:
+- self.scons_data.append(scons_info)
+- # XXX: we add a fake extension, to correctly initialize some
+- # options in distutils command.
+- self.add_extension('', sources = [])
+
+ def add_scripts(self,*files):
+ """Add scripts to configuration.
+@@ -2086,11 +2001,6 @@
+ """
+ self.py_modules.append((self.name,name,generate_config_py))
+
+- def scons_make_config_py(self, name = '__config__'):
+- """Generate package __config__.py file containing system_info
+- information used during building the package.
+- """
+- self.py_modules.append((self.name, name, scons_generate_config_py))
+
+ def get_info(self,*names):
+ """Get resources information.
+@@ -2098,7 +2008,7 @@
+ Return information (from system_info.get_info) for all of the names in
+ the argument list in a single dictionary.
+ """
+- from system_info import get_info, dict_append
++ from .system_info import get_info, dict_append
+ info_dict = {}
+ for a in names:
+ dict_append(info_dict,**get_info(a))
+@@ -2233,57 +2143,18 @@
+ return info
+
+ def is_bootstrapping():
+- import __builtin__
++ if sys.version_info[0] >= 3:
++ import builtins
++ else:
++ import __builtin__ as builtins
++
+ try:
+- __builtin__.__NUMPY_SETUP__
++ builtins.__NUMPY_SETUP__
+ return True
+ except AttributeError:
+ return False
+ __NUMPY_SETUP__ = False
+
+-def scons_generate_config_py(target):
+- """generate config.py file containing system_info information
+- used during building the package.
+-
+- usage:
+- config['py_modules'].append((packagename, '__config__',generate_config_py))
+- """
+- from distutils.dir_util import mkpath
+- from numscons import get_scons_configres_dir, get_scons_configres_filename
+- d = {}
+- mkpath(os.path.dirname(target))
+- f = open(target, 'w')
+- f.write('# this file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
+- f.write('# it contains system_info results at the time of building this package.\n')
+- f.write('__all__ = ["show"]\n\n')
+- confdir = get_scons_configres_dir()
+- confilename = get_scons_configres_filename()
+- for root, dirs, files in os.walk(confdir):
+- if files:
+- file = os.path.join(root, confilename)
+- assert root.startswith(confdir)
+- pkg_name = '.'.join(root[len(confdir)+1:].split(os.sep))
+- fid = open(file, 'r')
+- try:
+- cnt = fid.read()
+- d[pkg_name] = eval(cnt)
+- finally:
+- fid.close()
+- # d is a dictionary whose keys are package names, and values the
+- # corresponding configuration. Each configuration is itself a dictionary
+- # (lib : libinfo)
+- f.write('_config = %s\n' % d)
+- f.write(r'''
+-def show():
+- for pkg, config in _config.items():
+- print("package %s configuration:" % pkg)
+- for lib, libc in config.items():
+- print(' %s' % lib)
+- for line in libc.split('\n'):
+- print('\t%s' % line)
+- ''')
+- f.close()
+- return target
+
+ #########################
+
+--- numpy/distutils/tests/test_misc_util.py.orig 2013-04-06 22:04:05.000000000 -0700
++++ numpy/distutils/tests/test_misc_util.py 2013-08-27 11:14:23.438843136 -0700
+@@ -1,7 +1,9 @@
+ #!/usr/bin/env python
++from __future__ import division, absolute_import, print_function
+
+ from numpy.testing import *
+-from numpy.distutils.misc_util import appendpath, minrelpath, gpaths, rel_path
++from numpy.distutils.misc_util import appendpath, minrelpath, \
++ gpaths, get_shared_lib_extension
+ from os.path import join, sep, dirname
+
+ ajoin = lambda *paths: join(*((sep,)+paths))
+@@ -49,10 +51,25 @@
+ def test_gpaths(self):
+ local_path = minrelpath(join(dirname(__file__),'..'))
+ ls = gpaths('command/*.py', local_path)
+- assert_(join(local_path,'command','build_src.py') in ls,`ls`)
++ assert_(join(local_path,'command','build_src.py') in ls,repr(ls))
+ f = gpaths('system_info.py', local_path)
+- assert_(join(local_path,'system_info.py')==f[0],`f`)
++ assert_(join(local_path,'system_info.py')==f[0],repr(f))
+
++class TestSharedExtension(TestCase):
++
++ def test_get_shared_lib_extension(self):
++ import sys
++ ext = get_shared_lib_extension(is_python_ext=False)
++ if sys.platform.startswith('linux'):
++ assert_equal(ext, '.so')
++ elif sys.platform.startswith('gnukfreebsd'):
++ assert_equal(ext, '.so')
++ elif sys.platform.startswith('darwin'):
++ assert_equal(ext, '.dylib')
++ elif sys.platform.startswith('win'):
++ assert_equal(ext, '.dll')
++ # just check for no crash
++ assert_(get_shared_lib_extension(is_python_ext=True))
+
+ if __name__ == "__main__":
+ run_module_suite()
diff --git a/dev-python/numpy/numpy-1.7.0.ebuild b/dev-python/numpy/numpy-1.7.0.ebuild
deleted file mode 100644
index 9d504d68ecca..000000000000
--- a/dev-python/numpy/numpy-1.7.0.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.7.0.ebuild,v 1.1 2013/02/19 20:17:28 bicatali Exp $
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} )
-
-FORTRAN_NEEDED=lapack
-
-inherit distutils-r1 eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator
-
-DOC_PV="${PV}"
-
-DESCRIPTION="Fast array and numerical python library"
-HOMEPAGE="http://numpy.scipy.org/"
-SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz
- doc? (
- http://docs.scipy.org/doc/${P}/${PN}-html-${DOC_PV}.zip
- http://docs.scipy.org/doc/${P}/${PN}-ref-${DOC_PV}.pdf
- http://docs.scipy.org/doc/${P}/${PN}-user-${DOC_PV}.pdf
- )"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc lapack test"
-
-RDEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- lapack? ( virtual/cblas virtual/lapack )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- lapack? ( virtual/pkgconfig )
- test? ( >=dev-python/nose-0.10[${PYTHON_USEDEP}] )"
-
-# Uses distutils.command.config.
-DISTUTILS_IN_SOURCE_BUILD=1
-
-src_unpack() {
- unpack ${P}.tar.gz
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-pc_incdir() {
- $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
- sed -e 's/^-I//' -e 's/[ ]*-I/:/g'
-}
-
-pc_libdir() {
- $(tc-getPKG_CONFIG) --libs-only-L $@ | \
- sed -e 's/^-L//' -e 's/[ ]*-L/:/g'
-}
-
-pc_libs() {
- $(tc-getPKG_CONFIG) --libs-only-l $@ | \
- sed -e 's/[ ]-l*\(pthread\|m\)[ ]*//g' \
- -e 's/^-l//' -e 's/[ ]*-l/,/g'
-}
-
-python_prepare_all() {
- epatch "${FILESDIR}"/${PN}-1.7.0-atlas.patch
-
- if use lapack; then
- append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
- local libdir="${EPREFIX}"/usr/$(get_libdir)
- # make sure _dotblas.so gets built
- sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
- cat >> site.cfg <<-EOF
- [blas]
- include_dirs = $(pc_incdir cblas)
- library_dirs = $(pc_libdir cblas blas):${libdir}
- blas_libs = $(pc_libs cblas blas)
- [lapack]
- library_dirs = $(pc_libdir lapack):${libdir}
- lapack_libs = $(pc_libs lapack)
- EOF
- else
- export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
- fi
-
- export CC="$(tc-getCC) ${CFLAGS}"
-
- append-flags -fno-strict-aliasing
-
- # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
- # with the subtle difference that we don't want to break Darwin where
- # -shared is not a valid linker argument
- if [[ ${CHOST} != *-darwin* ]]; then
- append-ldflags -shared
- fi
-
- # only one fortran to link with:
- # linking with cblas and lapack library will force
- # autodetecting and linking to all available fortran compilers
- if use lapack; then
- append-fflags -fPIC
- NUMPY_FCONFIG="config_fc --noopt --noarch"
- # workaround bug 335908
- [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
- fi
-
- # don't version f2py, we will handle it.
- sed -i -e '/f2py_exe/s:+os\.path.*$::' numpy/f2py/setup.py || die
-
- distutils-r1_python_prepare_all
-}
-
-python_compile() {
- distutils-r1_python_compile ${NUMPY_FCONFIG}
-}
-
-python_test() {
- distutils_install_for_testing ${NUMPY_FCONFIG}
-
- cd "${TMPDIR}" || die
- "${PYTHON}" -c "
-import numpy, sys
-r = numpy.test()
-sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
-}
-
-python_install() {
- distutils-r1_python_install ${NUMPY_FCONFIG}
-
- rm -f "${D}"$(python_get_sitedir)/numpy/*.txt
-}
-
-python_install_all() {
- distutils-r1_python_install_all
-
- dodoc COMPATIBILITY DEV_README.txt THANKS.txt
-
- docinto f2py
- dodoc numpy/f2py/docs/*.txt
- doman numpy/f2py/f2py.1
-
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r "${WORKDIR}"/html
- doins "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf
- fi
-}
diff --git a/dev-python/numpy/numpy-1.7.1.ebuild b/dev-python/numpy/numpy-1.7.1.ebuild
index 0f7fef7c1aa5..60faf1d3ee9e 100644
--- a/dev-python/numpy/numpy-1.7.1.ebuild
+++ b/dev-python/numpy/numpy-1.7.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.7.1.ebuild,v 1.1 2013/04/16 08:58:35 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.7.1.ebuild,v 1.2 2013/08/27 18:29:10 bicatali Exp $
EAPI=5
@@ -48,22 +48,24 @@ src_unpack() {
pc_incdir() {
$(tc-getPKG_CONFIG) --cflags-only-I $@ | \
- sed -e 's/^-I//' -e 's/[ ]*-I/:/g'
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//'
}
pc_libdir() {
$(tc-getPKG_CONFIG) --libs-only-L $@ | \
- sed -e 's/^-L//' -e 's/[ ]*-L/:/g'
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//'
}
pc_libs() {
$(tc-getPKG_CONFIG) --libs-only-l $@ | \
sed -e 's/[ ]-l*\(pthread\|m\)[ ]*//g' \
- -e 's/^-l//' -e 's/[ ]*-l/,/g'
+ -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//'
}
python_prepare_all() {
epatch "${FILESDIR}"/${PN}-1.7.0-atlas.patch
+ # applied upstream
+ epatch "${FILESDIR}"/${PN}-1.7.1-distutils-python33.patch
if use lapack; then
append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
@@ -118,16 +120,14 @@ python_test() {
distutils_install_for_testing ${NUMPY_FCONFIG}
cd "${TMPDIR}" || die
- "${PYTHON}" -c "
+ ${EPYTHON} -c "
import numpy, sys
-r = numpy.test()
+r = numpy.test(verbose=3)
sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
}
python_install() {
distutils-r1_python_install ${NUMPY_FCONFIG}
-
- rm -f "${D}"$(python_get_sitedir)/numpy/*.txt
}
python_install_all() {
@@ -140,8 +140,8 @@ python_install_all() {
doman numpy/f2py/f2py.1
if use doc; then
+ dohtml -r "${WORKDIR}"/html/*
insinto /usr/share/doc/${PF}
- doins -r "${WORKDIR}"/html
doins "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf
fi
}