summaryrefslogtreecommitdiff
path: root/math/py-numexpr
diff options
context:
space:
mode:
authordrochner <drochner>2010-07-16 12:12:17 +0000
committerdrochner <drochner>2010-07-16 12:12:17 +0000
commit107f753e0b443df93d94aaa13676e69e1f35b5f3 (patch)
tree834be72d233ecf59f62d92c8aeaa91797d57f252 /math/py-numexpr
parent2621f69935fa32d53584807a395a4eb5cdc6735c (diff)
downloadpkgsrc-107f753e0b443df93d94aaa13676e69e1f35b5f3.tar.gz
add py-numexpr-1.3.1, a numerical expression evaluator for NumPy
Diffstat (limited to 'math/py-numexpr')
-rw-r--r--math/py-numexpr/DESCR3
-rw-r--r--math/py-numexpr/Makefile23
-rw-r--r--math/py-numexpr/PLIST29
-rw-r--r--math/py-numexpr/buildlink3.mk15
-rw-r--r--math/py-numexpr/distinfo7
-rw-r--r--math/py-numexpr/patches/patch-aa20
-rw-r--r--math/py-numexpr/patches/patch-ab44
7 files changed, 141 insertions, 0 deletions
diff --git a/math/py-numexpr/DESCR b/math/py-numexpr/DESCR
new file mode 100644
index 00000000000..f7ed12dd403
--- /dev/null
+++ b/math/py-numexpr/DESCR
@@ -0,0 +1,3 @@
+Numexpr is a fast numerical expression evaluator for NumPy. With it,
+expressions that operate on arrays (like "3*a+4*b") are accelerated
+and use less memory than doing the same calculation in Python.
diff --git a/math/py-numexpr/Makefile b/math/py-numexpr/Makefile
new file mode 100644
index 00000000000..ac261f70daa
--- /dev/null
+++ b/math/py-numexpr/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/07/16 12:12:17 drochner Exp $
+#
+
+DISTNAME= numexpr-1.3.1
+PKGNAME= ${PYPKGPREFIX}-numexpr-1.3.1
+CATEGORIES= math
+MASTER_SITES= http://numexpr.googlecode.com/files/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://numexpr.googlecode.com/
+COMMENT= Numerical expression evaluator for NumPy
+#LICENSE= # TODO: (see mk/license.mk)
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+PYDISTUTILSPKG= yes
+
+do-test:
+ ${PYTHONBIN} -c "import numexpr; numexpr.test()"
+
+.include "../../lang/python/extension.mk"
+.include "../../math/py-numpy/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/py-numexpr/PLIST b/math/py-numexpr/PLIST
new file mode 100644
index 00000000000..3b04a994fce
--- /dev/null
+++ b/math/py-numexpr/PLIST
@@ -0,0 +1,29 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/07/16 12:12:17 drochner Exp $
+${PYSITELIB}/numexpr/__config__.py
+${PYSITELIB}/numexpr/__config__.pyc
+${PYSITELIB}/numexpr/__config__.pyo
+${PYSITELIB}/numexpr/__init__.py
+${PYSITELIB}/numexpr/__init__.pyc
+${PYSITELIB}/numexpr/__init__.pyo
+${PYSITELIB}/numexpr/cpuinfo.py
+${PYSITELIB}/numexpr/cpuinfo.pyc
+${PYSITELIB}/numexpr/cpuinfo.pyo
+${PYSITELIB}/numexpr/expressions.py
+${PYSITELIB}/numexpr/expressions.pyc
+${PYSITELIB}/numexpr/expressions.pyo
+${PYSITELIB}/numexpr/interpreter.so
+${PYSITELIB}/numexpr/necompiler.py
+${PYSITELIB}/numexpr/necompiler.pyc
+${PYSITELIB}/numexpr/necompiler.pyo
+${PYSITELIB}/numexpr/tests/__init__.py
+${PYSITELIB}/numexpr/tests/__init__.pyc
+${PYSITELIB}/numexpr/tests/__init__.pyo
+${PYSITELIB}/numexpr/tests/test_numexpr.py
+${PYSITELIB}/numexpr/tests/test_numexpr.pyc
+${PYSITELIB}/numexpr/tests/test_numexpr.pyo
+${PYSITELIB}/numexpr/utils.py
+${PYSITELIB}/numexpr/utils.pyc
+${PYSITELIB}/numexpr/utils.pyo
+${PYSITELIB}/numexpr/version.py
+${PYSITELIB}/numexpr/version.pyc
+${PYSITELIB}/numexpr/version.pyo
diff --git a/math/py-numexpr/buildlink3.mk b/math/py-numexpr/buildlink3.mk
new file mode 100644
index 00000000000..6468303d8ed
--- /dev/null
+++ b/math/py-numexpr/buildlink3.mk
@@ -0,0 +1,15 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/07/16 12:12:17 drochner Exp $
+
+BUILDLINK_TREE+= pynumexpr
+
+.if !defined(PY_NUMEXPR_BUILDLINK3_MK)
+PY_NUMEXPR_BUILDLINK3_MK:=
+
+.include "../../lang/python/pyversion.mk"
+
+BUILDLINK_API_DEPENDS.pynumexpr+= ${PYPKGPREFIX}-numexpr>=1.3.1
+BUILDLINK_PKGSRCDIR.pynumexpr?= ../../math/py-numexpr
+
+.endif # PY_NUMEXPR_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -pynumexpr
diff --git a/math/py-numexpr/distinfo b/math/py-numexpr/distinfo
new file mode 100644
index 00000000000..b99dc433e47
--- /dev/null
+++ b/math/py-numexpr/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/07/16 12:12:17 drochner Exp $
+
+SHA1 (numexpr-1.3.1.tar.gz) = 2921531ece0eacb303b0c9a4978d0d050dcfd5d2
+RMD160 (numexpr-1.3.1.tar.gz) = 6cacbcf37581b5e19fe9fe674dd7b0722f1a19de
+Size (numexpr-1.3.1.tar.gz) = 56972 bytes
+SHA1 (patch-aa) = 6bcf00bc0150597e60f03dfe83c508e831fd2c5d
+SHA1 (patch-ab) = 8d7c58654228b9961169bde5c74cc9bd22ed7fa4
diff --git a/math/py-numexpr/patches/patch-aa b/math/py-numexpr/patches/patch-aa
new file mode 100644
index 00000000000..d4f3da86bbe
--- /dev/null
+++ b/math/py-numexpr/patches/patch-aa
@@ -0,0 +1,20 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/07/16 12:12:17 drochner Exp $
+
+--- setup.py.orig 2009-06-02 17:03:49.000000000 +0000
++++ setup.py
+@@ -5,10 +5,11 @@ import os.path as op
+ from distutils.command.clean import clean
+ from numpy.distutils.command.build_ext import build_ext as numpy_build_ext
+
+-try:
+- import setuptools
+-except ImportError:
+- setuptools = None
++#try:
++# import setuptools
++#except ImportError:
++# setuptools = None
++setuptools = None
+ extra_setup_opts = {}
+ if setuptools:
+ extra_setup_opts['zip_safe'] = False
diff --git a/math/py-numexpr/patches/patch-ab b/math/py-numexpr/patches/patch-ab
new file mode 100644
index 00000000000..ed977ee1e60
--- /dev/null
+++ b/math/py-numexpr/patches/patch-ab
@@ -0,0 +1,44 @@
+$NetBSD: patch-ab,v 1.1.1.1 2010/07/16 12:12:17 drochner Exp $
+
+--- numexpr/cpuinfo.py.orig 2009-06-23 08:39:40.000000000 +0000
++++ numexpr/cpuinfo.py
+@@ -390,6 +390,30 @@ class DarwinCPUInfo(CPUInfoBase):
+ def _is_ppc823(self): return self.__machine(823)
+ def _is_ppc860(self): return self.__machine(860)
+
++class NetBSDCPUInfo(CPUInfoBase):
++ info = None
++
++ def __init__(self):
++ if self.info is not None:
++ return
++ info = command_info(arch='arch', machine='machine')
++ info['sysctl_hw'] = key_value_from_command('sysctl hw', sep='=')
++ self.__class__.info = info
++
++ def _not_impl(self): pass
++
++ def _getNCPUs(self):
++ return int(self.info['sysctl_hw'].get('hw.ncpu', 1))
++
++ def _is_Intel(self):
++ if self.info['sysctl_hw'].get('hw.model', "")[0:5] == 'Intel':
++ return True
++ return False
++
++ def _is_AMD(self):
++ if self.info['sysctl_hw'].get('hw.model', "")[0:3] == 'AMD':
++ return True
++ return False
+
+ class SunOSCPUInfo(CPUInfoBase):
+
+@@ -648,6 +672,8 @@ elif sys.platform.startswith('irix'):
+ cpuinfo = IRIXCPUInfo
+ elif sys.platform == 'darwin':
+ cpuinfo = DarwinCPUInfo
++elif sys.platform[0:6] == 'netbsd':
++ cpuinfo = NetBSDCPUInfo
+ elif sys.platform.startswith('sunos'):
+ cpuinfo = SunOSCPUInfo
+ elif sys.platform.startswith('win32'):