summaryrefslogtreecommitdiffstats
path: root/packaging/macosx/ports/python
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:16:36 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:16:36 +0000
commit913372144fbee834867176885a5526d70243e4e0 (patch)
treea28957014d44a50067932243cc919f522efac898 /packaging/macosx/ports/python
parentupdate to trunk (diff)
parentLatvian translation update (diff)
downloadinkscape-913372144fbee834867176885a5526d70243e4e0.tar.gz
inkscape-913372144fbee834867176885a5526d70243e4e0.zip
update to trunk
(bzr r13682.1.23)
Diffstat (limited to 'packaging/macosx/ports/python')
-rw-r--r--packaging/macosx/ports/python/py-gobject/Portfile77
-rw-r--r--packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch316
-rw-r--r--packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch28
-rw-r--r--packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch50
-rw-r--r--packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff28
-rw-r--r--packaging/macosx/ports/python/py-numpy/Portfile214
-rw-r--r--packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff39
-rw-r--r--packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff15
-rw-r--r--packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff34
-rw-r--r--packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff20
-rwxr-xr-xpackaging/macosx/ports/python/py-numpy/files/wrapper-template143
-rw-r--r--packaging/macosx/ports/python/py26-cython/Portfile85
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython242
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython252
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython262
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython272
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython312
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython322
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython332
-rw-r--r--packaging/macosx/ports/python/py26-cython/files/cython342
-rw-r--r--packaging/macosx/ports/python/py26-lxml/Portfile52
-rw-r--r--packaging/macosx/ports/python/py26-nose/Portfile87
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests241
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests251
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests261
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests271
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests311
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests321
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests331
-rw-r--r--packaging/macosx/ports/python/py26-nose/files/nosetests341
-rw-r--r--packaging/macosx/ports/python/py26-numpy/Portfile214
-rw-r--r--packaging/macosx/ports/python/py26-numpy/files/patch-f2py_setup.py.diff39
-rw-r--r--packaging/macosx/ports/python/py26-numpy/files/patch-fcompiler_g95.diff15
-rw-r--r--packaging/macosx/ports/python/py26-numpy/files/patch-numpy_core_setup.py.diff34
-rw-r--r--packaging/macosx/ports/python/py26-numpy/files/patch-numpy_linalg_setup.py.diff20
-rw-r--r--packaging/macosx/ports/python/py26-numpy/files/wrapper-template143
-rw-r--r--packaging/macosx/ports/python/py26-setuptools/Portfile61
37 files changed, 1738 insertions, 0 deletions
diff --git a/packaging/macosx/ports/python/py-gobject/Portfile b/packaging/macosx/ports/python/py-gobject/Portfile
new file mode 100644
index 000000000..3503ef1db
--- /dev/null
+++ b/packaging/macosx/ports/python/py-gobject/Portfile
@@ -0,0 +1,77 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup python 1.0
+
+name py-gobject
+set my_name pygobject
+version 2.28.6
+revision 101
+epoch 20110613
+set branch [join [lrange [split ${version} .] 0 1] .]
+categories-append gnome
+license LGPL-2.1+
+maintainers jwa openmaintainer
+platforms darwin
+python.versions 26 27 33 34
+
+description Python bindings for GObject.
+
+long_description \
+ PyGObject provides a convenient wrapper for the GObject+ library \
+ for use in Python programs, and takes care of many of the boring details \
+ such as managing memory and type casting. \
+ When combined with PyGTK, PyORBit and gnome-python, \
+ it can be used to write full featured Gnome applications.
+
+homepage http://www.pygtk.org/
+master_sites gnome:sources/${my_name}/${branch}/
+distname ${my_name}-${version}
+use_xz yes
+
+checksums rmd160 4bc5e8546a5029d3d6b154629ab3fa4023d96bef \
+ sha256 fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8
+
+if {$subport ne $name} {
+ depends_build-append port:pkgconfig
+ depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \
+ port:libffi \
+ port:py${python.version}-cairo \
+ port:gobject-introspection
+
+ patch.pre_args -p1
+ patchfiles patch-pygi-info.c-p1.diff \
+ 00git_class_init.patch \
+ 00git_fix_qdata_warning.patch \
+ 00git_gio_flag_type.patch
+
+ use_configure yes
+ configure.python ${python.bin}
+ configure.env-append PKG_CONFIG_PATH='${python.prefix}/lib/pkgconfig'
+ configure.pre_args --prefix='${python.prefix}'
+ configure.args-append --disable-glibtest \
+ --enable-introspection=no
+ configure.cppflags-append \
+ -I${python.prefix}/include \
+ -I${prefix}/include/cairo
+ build.cmd [portbuild::build_getmaketype]
+ build.target
+
+ destroot.cmd ${build.cmd}
+ destroot.target install
+ destroot.destdir DESTDIR=${destroot}
+
+ test.run yes
+ test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
+ test.target check
+
+ post-destroot {
+ set docdir ${prefix}/share/doc/${subport}
+ xinstall -d ${destroot}${docdir}
+ xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
+ ${destroot}${docdir}
+ }
+}
+
+livecheck.type none
diff --git a/packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch b/packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch
new file mode 100644
index 000000000..01f79d6ce
--- /dev/null
+++ b/packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch
@@ -0,0 +1,316 @@
+From 9456ba70fdb98b3a4eb7ee2f630182387a54ca00 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martinpitt@gnome.org>
+Date: Tue, 19 Feb 2013 15:39:56 +0100
+Subject: [PATCH] Move property and signal creation into _class_init()
+
+We must not add class interfaces after g_type_class_ref() has been called the
+first time. Move signal and property creation from pyg_type_register() into
+pyg_object_class_init(), and drop the hack of registering interfaces twice.
+
+This is a backport of commit efcb0f9fd for 2.28.x. This allows old pygtk
+applications to work with pygobject 2.28.x and glib 2.35.x.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=694108
+Bug-Ubuntu: https://launchpad.net/bugs/1129309
+---
+ gobject/gobjectmodule.c | 177 +++++++++++++++++++-----------------------------
+ 1 file changed, 70 insertions(+), 107 deletions(-)
+
+diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
+index 2a84606..91f7315 100644
+--- a/gobject/gobjectmodule.c
++++ b/gobject/gobjectmodule.c
+@@ -312,13 +312,6 @@ pyg_object_get_property (GObject *object, guint property_id,
+ pyglib_gil_state_release(state);
+ }
+
+-static void
+-pyg_object_class_init(GObjectClass *class, PyObject *py_class)
+-{
+- class->set_property = pyg_object_set_property;
+- class->get_property = pyg_object_get_property;
+-}
+-
+ typedef struct _PyGSignalAccumulatorData {
+ PyObject *callable;
+ PyObject *user_data;
+@@ -484,15 +477,14 @@ override_signal(GType instance_type, const gchar *signal_name)
+ }
+
+ static PyObject *
+-add_signals (GType instance_type, PyObject *signals)
++add_signals (GObjectClass *klass, PyObject *signals)
+ {
+ gboolean ret = TRUE;
+- GObjectClass *oclass;
+ Py_ssize_t pos = 0;
+ PyObject *key, *value, *overridden_signals = NULL;
++ GType instance_type = G_OBJECT_CLASS_TYPE (klass);
+
+ overridden_signals = PyDict_New();
+- oclass = g_type_class_ref(instance_type);
+ while (PyDict_Next(signals, &pos, &key, &value)) {
+ const gchar *signal_name;
+ gchar *signal_name_canon, *c;
+@@ -530,7 +522,6 @@ add_signals (GType instance_type, PyObject *signals)
+ if (!ret)
+ break;
+ }
+- g_type_class_unref(oclass);
+ if (ret)
+ return overridden_signals;
+ else {
+@@ -800,14 +791,12 @@ pyg_param_spec_from_object (PyObject *tuple)
+ }
+
+ static gboolean
+-add_properties (GType instance_type, PyObject *properties)
++add_properties (GObjectClass *klass, PyObject *properties)
+ {
+ gboolean ret = TRUE;
+- GObjectClass *oclass;
+ Py_ssize_t pos = 0;
+ PyObject *key, *value;
+
+- oclass = g_type_class_ref(instance_type);
+ while (PyDict_Next(properties, &pos, &key, &value)) {
+ const gchar *prop_name;
+ GType prop_type;
+@@ -873,7 +862,7 @@ add_properties (GType instance_type, PyObject *properties)
+ Py_DECREF(slice);
+
+ if (pspec) {
+- g_object_class_install_property(oclass, 1, pspec);
++ g_object_class_install_property(klass, 1, pspec);
+ } else {
+ PyObject *type, *value, *traceback;
+ ret = FALSE;
+@@ -883,7 +872,7 @@ add_properties (GType instance_type, PyObject *properties)
+ g_snprintf(msg, 256,
+ "%s (while registering property '%s' for GType '%s')",
+ PYGLIB_PyUnicode_AsString(value),
+- prop_name, g_type_name(instance_type));
++ prop_name, G_OBJECT_CLASS_NAME(klass));
+ Py_DECREF(value);
+ value = PYGLIB_PyUnicode_FromString(msg);
+ }
+@@ -892,11 +881,63 @@ add_properties (GType instance_type, PyObject *properties)
+ }
+ }
+
+- g_type_class_unref(oclass);
+ return ret;
+ }
+
+ static void
++pyg_object_class_init(GObjectClass *class, PyObject *py_class)
++{
++ PyObject *gproperties, *gsignals, *overridden_signals;
++ PyObject *class_dict = ((PyTypeObject*) py_class)->tp_dict;
++
++ class->set_property = pyg_object_set_property;
++ class->get_property = pyg_object_get_property;
++
++ /* install signals */
++ /* we look this up in the instance dictionary, so we don't
++ * accidentally get a parent type's __gsignals__ attribute. */
++ gsignals = PyDict_GetItemString(class_dict, "__gsignals__");
++ if (gsignals) {
++ if (!PyDict_Check(gsignals)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__gsignals__ attribute not a dict!");
++ return;
++ }
++ if (!(overridden_signals = add_signals(class, gsignals))) {
++ return;
++ }
++ if (PyDict_SetItemString(class_dict, "__gsignals__",
++ overridden_signals)) {
++ return;
++ }
++ Py_DECREF(overridden_signals);
++
++ PyDict_DelItemString(class_dict, "__gsignals__");
++ } else {
++ PyErr_Clear();
++ }
++
++ /* install properties */
++ /* we look this up in the instance dictionary, so we don't
++ * accidentally get a parent type's __gproperties__ attribute. */
++ gproperties = PyDict_GetItemString(class_dict, "__gproperties__");
++ if (gproperties) {
++ if (!PyDict_Check(gproperties)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__gproperties__ attribute not a dict!");
++ return;
++ }
++ if (!add_properties(class, gproperties)) {
++ return;
++ }
++ PyDict_DelItemString(class_dict, "__gproperties__");
++ /* Borrowed reference. Py_DECREF(gproperties); */
++ } else {
++ PyErr_Clear();
++ }
++}
++
++static void
+ pyg_register_class_init(GType gtype, PyGClassInitFunc class_init)
+ {
+ GSList *list;
+@@ -1068,7 +1109,7 @@ pygobject__g_instance_init(GTypeInstance *instance,
+ */
+ static void
+ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type,
+- PyObject *bases, gboolean new_interfaces,
++ PyObject *bases,
+ GType *parent_interfaces, guint n_parent_interfaces)
+ {
+ int i;
+@@ -1082,7 +1123,6 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type,
+ guint k;
+ PyObject *base = PyTuple_GET_ITEM(bases, i);
+ GType itype;
+- gboolean is_new = TRUE;
+ const GInterfaceInfo *iinfo;
+ GInterfaceInfo iinfo_copy;
+
+@@ -1099,16 +1139,6 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type,
+ if (!G_TYPE_IS_INTERFACE(itype))
+ continue;
+
+- for (k = 0; k < n_parent_interfaces; ++k) {
+- if (parent_interfaces[k] == itype) {
+- is_new = FALSE;
+- break;
+- }
+- }
+-
+- if ((new_interfaces && !is_new) || (!new_interfaces && is_new))
+- continue;
+-
+ iinfo = pyg_lookup_interface_info(itype);
+ if (!iinfo) {
+ gchar *error;
+@@ -1129,7 +1159,7 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type,
+ int
+ pyg_type_register(PyTypeObject *class, const char *type_name)
+ {
+- PyObject *gtype, *gsignals, *gproperties, *overridden_signals;
++ PyObject *gtype;
+ GType parent_type, instance_type;
+ GType *parent_interfaces;
+ guint n_parent_interfaces;
+@@ -1216,88 +1246,22 @@ pyg_type_register(PyTypeObject *class, const char *type_name)
+ }
+
+ /*
+- * Note: Interfaces to be implemented are searched twice. First
+- * we register interfaces that are already implemented by a parent
+- * type. The second time, the remaining interfaces are
+- * registered, i.e. the ones that are not implemented by a parent
+- * type. In between these two loops, properties and signals are
+- * registered. It has to be done this way, in two steps,
+- * otherwise glib will complain. If registering all interfaces
+- * always before properties, you get an error like:
+- *
+- * ../gobject:121: Warning: Object class
+- * test_interface+MyObject doesn't implement property
+- * 'some-property' from interface 'TestInterface'
+- *
+- * If, on the other hand, you register interfaces after
+- * registering the properties, you get something like:
+- *
+- * ../gobject:121: Warning: cannot add interface type
+- * `TestInterface' to type `test_interface+MyUnknown', since
+- * type `test_interface+MyUnknown' already conforms to
+- * interface
+- *
+- * This looks like a GLib quirk, but no bug has been filed
+- * upstream. However we have a unit test for this particular
+- * problem, which can be found in test_interfaces.py, class
+- * TestInterfaceImpl.
++ * Note, all interfaces need to be registered before the first
++ * g_type_class_ref(), see bug #686149.
+ *
+ * See also comment above pyg_type_add_interfaces().
+ */
+- pyg_type_add_interfaces(class, instance_type, class->tp_bases, FALSE,
++ pyg_type_add_interfaces(class, instance_type, class->tp_bases,
+ parent_interfaces, n_parent_interfaces);
+
+- /* we look this up in the instance dictionary, so we don't
+- * accidentally get a parent type's __gsignals__ attribute. */
+- gsignals = PyDict_GetItemString(class->tp_dict, "__gsignals__");
+- if (gsignals) {
+- if (!PyDict_Check(gsignals)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__gsignals__ attribute not a dict!");
+- g_free(parent_interfaces);
+- return -1;
+- }
+- if (!(overridden_signals = add_signals(instance_type, gsignals))) {
+- g_free(parent_interfaces);
+- return -1;
+- }
+- if (PyDict_SetItemString(class->tp_dict, "__gsignals__",
+- overridden_signals)) {
+- g_free(parent_interfaces);
+- return -1;
+- }
+- Py_DECREF(overridden_signals);
+- } else {
+- PyErr_Clear();
+- }
+
+- /* we look this up in the instance dictionary, so we don't
+- * accidentally get a parent type's __gsignals__ attribute. */
+- gproperties = PyDict_GetItemString(class->tp_dict, "__gproperties__");
+- if (gproperties) {
+- if (!PyDict_Check(gproperties)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__gproperties__ attribute not a dict!");
+- g_free(parent_interfaces);
+- return -1;
+- }
+- if (!add_properties(instance_type, gproperties)) {
+- g_free(parent_interfaces);
+- return -1;
+- }
+- PyDict_DelItemString(class->tp_dict, "__gproperties__");
+- /* Borrowed reference. Py_DECREF(gproperties); */
+- } else {
+- PyErr_Clear();
++ gclass = g_type_class_ref(instance_type);
++ if (PyErr_Occurred() != NULL) {
++ g_type_class_unref(gclass);
++ g_free(parent_interfaces);
++ return -1;
+ }
+
+- /* Register new interfaces, that are _not_ already defined by
+- * the parent type. FIXME: See above.
+- */
+- pyg_type_add_interfaces(class, instance_type, class->tp_bases, TRUE,
+- parent_interfaces, n_parent_interfaces);
+-
+- gclass = g_type_class_ref(instance_type);
+ if (pyg_run_class_init(instance_type, gclass, class)) {
+ g_type_class_unref(gclass);
+ g_free(parent_interfaces);
+@@ -1306,9 +1270,8 @@ pyg_type_register(PyTypeObject *class, const char *type_name)
+ g_type_class_unref(gclass);
+ g_free(parent_interfaces);
+
+- if (gsignals)
+- PyDict_DelItemString(class->tp_dict, "__gsignals__");
+-
++ if (PyErr_Occurred() != NULL)
++ return -1;
+ return 0;
+ }
+
+--
+1.8.1.2
+
diff --git a/packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch b/packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch
new file mode 100644
index 000000000..ed4b5d2b9
--- /dev/null
+++ b/packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch
@@ -0,0 +1,28 @@
+From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001
+From: Ivan Stankovic <ivan.stankovic@avl.com>
+Date: Tue, 21 Feb 2012 12:24:58 +0100
+Subject: [PATCH 1/2] Fix set_qdata warning on accessing NULL gobject property
+
+https://bugzilla.gnome.org/show_bug.cgi?id=661155
+---
+ gobject/pygobject.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/gobject/pygobject.c b/gobject/pygobject.c
+index 6c2f06c..70dc89a 100644
+--- a/gobject/pygobject.c
++++ b/gobject/pygobject.c
+@@ -991,7 +991,9 @@ pygobject_new(GObject *obj)
+ PyObject *
+ pygobject_new_sunk(GObject *obj)
+ {
+- g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
++ if (obj)
++ g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
++
+ return pygobject_new_full(obj, TRUE, NULL);
+ }
+
+--
+1.7.9.1
+
diff --git a/packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch b/packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch
new file mode 100644
index 000000000..78e7ddfd5
--- /dev/null
+++ b/packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch
@@ -0,0 +1,50 @@
+From 42d01f060c5d764baa881d13c103d68897163a49 Mon Sep 17 00:00:00 2001
+From: Ryan Lortie <desrt@desrt.ca>
+Date: Mon, 12 Mar 2012 16:44:14 -0400
+Subject: gio-types.defs: change some enums to flags
+
+These flags types were originally incorrectly handled in glib as being
+enums. That bug was fixed, but they're still enums here, leading to
+warnings about the mismatch.
+
+Change them to flags.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=668522
+---
+ gio/gio-types.defs | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gio-types.defs b/gio/gio-types.defs
+index 331e0bc..7eee5c8 100644
+--- a/gio/gio-types.defs
++++ b/gio/gio-types.defs
+@@ -526,7 +526,7 @@
+ )
+ )
+
+-(define-enum MountMountFlags
++(define-flags MountMountFlags
+ (in-module "gio")
+ (c-name "GMountMountFlags")
+ (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
+@@ -545,7 +545,7 @@
+ )
+ )
+
+-(define-enum DriveStartFlags
++(define-flags DriveStartFlags
+ (in-module "gio")
+ (c-name "GDriveStartFlags")
+ (gtype-id "G_TYPE_DRIVE_START_FLAGS")
+@@ -770,7 +770,7 @@
+ )
+ )
+
+-(define-enum SocketMsgFlags
++(define-flags SocketMsgFlags
+ (in-module "gio")
+ (c-name "GSocketMsgFlags")
+ (gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
+--
+1.7.9.1
+
diff --git a/packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff b/packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff
new file mode 100644
index 000000000..b5a3d519d
--- /dev/null
+++ b/packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff
@@ -0,0 +1,28 @@
+--- a/gi/pygi-info.c.orig 2014-01-15 09:16:11.000000000 +0200
++++ b/gi/pygi-info.c 2014-01-15 09:16:52.000000000 +0200
+@@ -162,9 +162,6 @@
+ case GI_INFO_TYPE_CONSTANT:
+ type = &PyGIConstantInfo_Type;
+ break;
+- case GI_INFO_TYPE_ERROR_DOMAIN:
+- type = &PyGIErrorDomainInfo_Type;
+- break;
+ case GI_INFO_TYPE_UNION:
+ type = &PyGIUnionInfo_Type;
+ break;
+@@ -481,7 +478,6 @@
+ case GI_INFO_TYPE_INVALID:
+ case GI_INFO_TYPE_FUNCTION:
+ case GI_INFO_TYPE_CONSTANT:
+- case GI_INFO_TYPE_ERROR_DOMAIN:
+ case GI_INFO_TYPE_VALUE:
+ case GI_INFO_TYPE_SIGNAL:
+ case GI_INFO_TYPE_PROPERTY:
+@@ -860,7 +856,6 @@
+ case GI_INFO_TYPE_INVALID:
+ case GI_INFO_TYPE_FUNCTION:
+ case GI_INFO_TYPE_CONSTANT:
+- case GI_INFO_TYPE_ERROR_DOMAIN:
+ case GI_INFO_TYPE_VALUE:
+ case GI_INFO_TYPE_SIGNAL:
+ case GI_INFO_TYPE_PROPERTY:
diff --git a/packaging/macosx/ports/python/py-numpy/Portfile b/packaging/macosx/ports/python/py-numpy/Portfile
new file mode 100644
index 000000000..0a325c8ba
--- /dev/null
+++ b/packaging/macosx/ports/python/py-numpy/Portfile
@@ -0,0 +1,214 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id: Portfile 127764 2014-11-03 14:01:21Z michaelld@macports.org $
+
+PortSystem 1.0
+PortGroup python 1.0
+PortGroup github 1.0
+
+github.setup numpy numpy 1.9.1 v
+name py-numpy
+categories-append math
+license BSD
+platforms darwin
+maintainers dh michaelld openmaintainer
+description The core utilities for the scientific library scipy for Python
+long_description ${description}
+
+checksums rmd160 c043ce0045166762e36c513458abc499d36bbcf5 \
+ sha256 504b7cbc3b47df592d683e0f3b992cfa4d29338f8d23fca07f040164018b607f
+
+python.versions 27 32 33 34
+
+if {${name} ne ${subport}} {
+
+ revision 100
+
+ patchfiles patch-f2py_setup.py.diff \
+ patch-fcompiler_g95.diff \
+ patch-numpy_core_setup.py.diff
+
+ depends_lib-append port:fftw-3 \
+ port:py${python.version}-nose \
+ port:py${python.version}-cython
+
+ # http://trac.macports.org/ticket/34562
+ destroot.env-append \
+ CC="${configure.cc}" \
+ CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+ CXX="${configure.cxx}" \
+ CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
+ OBJC="${configure.objc}" \
+ OBJCFLAGS="${configure.objcflags} [get_canonical_archflags objc]" \
+ LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
+
+ build.env-append ARCHFLAGS="[get_canonical_archflags ld]"
+ destroot.env-append ARCHFLAGS="[get_canonical_archflags ld]"
+
+ variant atlas description {Use the MacPorts' ATLAS libraries \
+ instead of Apple's Accelerate framework} {
+ depends_lib-append port:atlas
+
+ if {[variant_isset universal]} {
+ python.set_compiler no
+ }
+ }
+
+ # when using ATLAS (whether by default or specified by the user via
+ # the +atlas variant) ...
+ set gcc_version ""
+ if {[variant_isset atlas]} {
+
+ # see if the user has set -gcc4X to disable using MacPorts'
+ # compiler; if not, either use what the user set (as +gcc4X) or
+ # default to gcc48.
+
+ variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 \
+ description {Use the gcc43 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.3
+ }
+
+ variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 \
+ description {Use the gcc44 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.4
+ }
+
+ variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 \
+ description {Use the gcc45 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.5
+ }
+
+ variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 \
+ description {Use the gcc46 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.6
+ }
+
+ variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 \
+ description {Use the gcc47 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.7
+ }
+
+ variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 \
+ description {Use the gcc48 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.8
+ }
+
+ if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
+ default_variants +gcc48
+ }
+
+ if {[variant_isset gcc43]} {
+ set gcc_version "4.3"
+ } elseif {[variant_isset gcc44]} {
+ set gcc_version "4.4"
+ } elseif {[variant_isset gcc45]} {
+ set gcc_version "4.5"
+ } elseif {[variant_isset gcc46]} {
+ set gcc_version "4.6"
+ } elseif {[variant_isset gcc47]} {
+ set gcc_version "4.7"
+ } elseif {[variant_isset gcc48]} {
+ set gcc_version "4.8"
+ }
+
+ # when using non-Apple GCC for universal install, it can
+ # create binaries only for the native OS architecture, at
+ # either 32 or 64 bits. Restrict the supported archs
+ # accordingly.
+ if {${os.arch} eq "i386"} {
+ supported_archs i386 x86_64
+ } elseif {${os.arch} eq "powerpc"} {
+ supported_archs ppc ppc64
+ }
+
+ # include all the correct GCC4X port
+ depends_lib-append port:gcc[join [split ${gcc_version} "."] ""]
+
+ # force LDFLAGS for correct linking of the linalg module
+ # for non-Apple GCC compilers
+ patchfiles-append patch-numpy_linalg_setup.py.diff
+
+ if {${gcc_version} == ""} {
+ # user specified -gcc4X but +atlas (either as default or
+ # explicitly); do not allow since it might lead to
+ # undetermined runtime execution.
+ return -code error \
+"\n\nWhen using the +atlas variant (either as the default or setting
+explicitly), one of the +gcc4X variants must be selected.\n"
+ }
+ }
+
+ post-patch {
+ reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \
+ ${worksrcpath}/numpy/f2py/setup.py
+
+ if {[variant_isset universal] && [variant_isset atlas]} {
+ # Prepare wrappers
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/c-wrapper
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/f-wrapper
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/cxx-wrapper
+
+ reinplace "s|@@@|${configure.cc}|" ${worksrcpath}/c-wrapper
+ reinplace "s|---|\\\\.c|" ${worksrcpath}/c-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/c-wrapper
+
+ reinplace "s|@@@|${configure.cxx}|" ${worksrcpath}/cxx-wrapper
+ reinplace "s#---#(\\\\.C|\\\\.cpp|\\\\.cc)#" \
+ ${worksrcpath}/cxx-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/cxx-wrapper
+
+ reinplace "s|@@@|${configure.f90}|" ${worksrcpath}/f-wrapper
+ reinplace "s|---|\\\\.f|" ${worksrcpath}/f-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/f-wrapper
+
+ build.env-append CC="${worksrcpath}/c-wrapper" \
+ CXX="${worksrcpath}/cxx-wrapper" \
+ F77="${worksrcpath}/f-wrapper" \
+ F90="${worksrcpath}/f-wrapper"
+
+ destroot.env-append CC="${worksrcpath}/c-wrapper" \
+ CXX="${worksrcpath}/cxx-wrapper" \
+ F77="${worksrcpath}/f-wrapper" \
+ F90="${worksrcpath}/f-wrapper"
+ }
+
+ if {[variant_isset atlas]} {
+ # We must link against libSatlas or libTatlas, not libAtlas
+ if {[file exists ${prefix}/lib/libtatlas.dylib]} {
+ reinplace -E \
+ "s|_lib_atlas = \\\['atlas'\\\]|_lib_atlas = \\\['tatlas'\\\]|" \
+ ${worksrcpath}/numpy/distutils/system_info.py
+ } elseif {[file exists ${prefix}/lib/libsatlas.dylib]} {
+ reinplace -E \
+ "s|_lib_atlas = \\\['atlas'\\\]|_lib_atlas = \\\['satlas'\\\]|" \
+ ${worksrcpath}/numpy/distutils/system_info.py
+ } else {
+ return -code error "Unable to find Atlas dylibs. Bailing out."
+ }
+ }
+ }
+
+ livecheck.type none
+
+ if {[variant_isset atlas]} {
+ build.env-append ATLAS=${prefix}/lib \
+ LAPACK=${prefix}/lib \
+ BLAS=${prefix}/lib
+ destroot.env-append ATLAS=${prefix}/lib \
+ LAPACK=${prefix}/lib \
+ BLAS=${prefix}/lib
+ } else {
+ build.env-append ATLAS=None \
+ LAPACK=/usr/lib \
+ BLAS=/usr/lib
+ destroot.env-append ATLAS=None \
+ LAPACK=/usr/lib \
+ BLAS=/usr/lib
+ }
+
+} else {
+ livecheck none
+ #livecheck.regex archive/[join ${github.tag_prefix} ""](\[\\d+(?:\\.\\d+)*"\]+)${extract.suffix}"
+}
diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff b/packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff
new file mode 100644
index 000000000..1e3164e73
--- /dev/null
+++ b/packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff
@@ -0,0 +1,39 @@
+--- numpy/f2py/setup.py
++++ numpy/f2py/setup.py
+@@ -41,21 +41,21 @@ def configuration(parent_package='',top_
+ )
+
+ config.make_svn_version_py()
+
+ def generate_f2py_py(build_dir):
+- f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:]
++ f2py_exe = 'f2py'
+ if f2py_exe[-4:]=='.exe':
+ f2py_exe = f2py_exe[:-4] + '.py'
+ if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
+ f2py_exe = f2py_exe + '.py'
+ target = os.path.join(build_dir, f2py_exe)
+ if newer(__file__, target):
+ log.info('Creating %s', target)
+ f = open(target, 'w')
+ f.write('''\
+-#!%s
++#!@@MPORTS_PYTHON@@
+ # See http://cens.ioc.ee/projects/f2py2e/
+ import os, sys
+ for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
+ try:
+ i=sys.argv.index("--"+mode)
+@@ -75,11 +75,11 @@ elif mode=="2e-numpy":
+ from numpy.f2py import main
+ else:
+ sys.stderr.write("Unknown mode: " + repr(mode) + "\\n")
+ sys.exit(1)
+ main()
+-'''%(sys.executable))
++''')
+ f.close()
+ return target
+
+ config.add_scripts(generate_f2py_py)
+
diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff b/packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff
new file mode 100644
index 000000000..b95a2609a
--- /dev/null
+++ b/packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff
@@ -0,0 +1,15 @@
+--- numpy/distutils/fcompiler/__init__.py
++++ numpy/distutils/fcompiler/__init__.py
+@@ -708,11 +708,11 @@
+ ('win32', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95',
+ 'intelvem', 'intelem')),
+ ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')),
+ ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq',
+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95')),
+- ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')),
++ ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'pg')),
+ ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')),
+ ('irix.*', ('mips', 'gnu', 'gnu95',)),
+ ('aix.*', ('ibm', 'gnu', 'gnu95',)),
+ # os.name mappings
+ ('posix', ('gnu', 'gnu95',)),
diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff
new file mode 100644
index 000000000..1c9a09c34
--- /dev/null
+++ b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff
@@ -0,0 +1,34 @@
+--- numpy/core/setup.py.orig 2014-03-25 19:03:06.000000000 -0400
++++ numpy/core/setup.py 2014-03-25 19:03:26.000000000 -0400
+@@ -485,7 +485,14 @@
+ if isinstance(d, str):
+ target_f.write('#define %s\n' % (d))
+ else:
+- target_f.write('#define %s %s\n' % (d[0], d[1]))
++ if d[0]!='SIZEOF_LONG' and d[0]!='SIZEOF_PY_INTPTR_T':
++ target_f.write('#define %s %s\n' % (d[0], d[1]))
++ else:
++ target_f.write('#ifdef __LP64__\n')
++ target_f.write('#define %s %s\n' % (d[0], 8))
++ target_f.write('#else\n')
++ target_f.write('#define %s %s\n' % (d[0], 4))
++ target_f.write('#endif\n')
+
+ # define inline to our keyword, or nothing
+ target_f.write('#ifndef __cplusplus\n')
+@@ -585,7 +592,14 @@
+ if isinstance(d, str):
+ target_f.write('#define %s\n' % (d))
+ else:
+- target_f.write('#define %s %s\n' % (d[0], d[1]))
++ if d[0]!='NPY_SIZEOF_LONG' and d[0]!='NPY_SIZEOF_PY_INTPTR_T':
++ target_f.write('#define %s %s\n' % (d[0], d[1]))
++ else:
++ target_f.write('#ifdef __LP64__\n')
++ target_f.write('#define %s %s\n' % (d[0], 8))
++ target_f.write('#else\n')
++ target_f.write('#define %s %s\n' % (d[0], 4))
++ target_f.write('#endif\n')
+
+ # Define __STDC_FORMAT_MACROS
+ target_f.write("""
diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff
new file mode 100644
index 000000000..848d46186
--- /dev/null
+++ b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff
@@ -0,0 +1,20 @@
+--- numpy/linalg/setup.py.orig 2013-11-16 08:30:31.000000000 -0500
++++ numpy/linalg/setup.py 2013-11-16 08:39:27.000000000 -0500
+@@ -37,7 +37,8 @@
+ config.add_extension('lapack_lite',
+ sources = [get_lapack_lite_sources],
+ depends = ['lapack_litemodule.c'] + lapack_lite_src,
+- extra_info = lapack_info
++ extra_info = lapack_info,
++ extra_link_args=['-undefined dynamic_lookup -bundle']
+ )
+
+ # umath_linalg module
+@@ -47,6 +48,7 @@
+ depends = ['umath_linalg.c.src'] + lapack_lite_src,
+ extra_info = lapack_info,
+ libraries = ['npymath'],
++ extra_link_args=['-undefined dynamic_lookup -bundle']
+ )
+
+ return config
diff --git a/packaging/macosx/ports/python/py-numpy/files/wrapper-template b/packaging/macosx/ports/python/py-numpy/files/wrapper-template
new file mode 100755
index 000000000..48936d107
--- /dev/null
+++ b/packaging/macosx/ports/python/py-numpy/files/wrapper-template
@@ -0,0 +1,143 @@
+#!/bin/sh
+COMPILER='@@@'
+SUFFIX='---'
+PREFIX='&&&'
+OUTPUT_O='NO'
+OUTPUT=''
+NAMED_OUTPUT=''
+LASTFILE=''
+INTEL='NO'
+SIZE32='NO'
+SIZE64='NO'
+NEWARGS=''
+
+SKIP='NO'
+
+for arg in $@
+do
+ if [ $SKIP = 'ARCH' ]; then
+ # intercept -arch option and set SIZEXX
+ SKIP='NO'
+ if [ $arg = 'x86_64' ] || [ $arg = 'ppc64' ]; then
+ SIZE64='YES'
+ else
+ SIZE32='YES'
+ fi
+
+ # which architecture are we compiling for?
+ if [ $arg = 'x86_64' ] || [ $arg = 'i386' ]; then
+ INTEL='YES'
+ fi
+
+ elif [ $arg = '-arch' ]; then
+ SKIP='ARCH'
+
+ elif [ $arg = '--version' ]; then
+ ${COMPILER} --version
+ exit 0
+
+ else
+ NEWARGS+="$arg "
+
+ # if the -c option is given, the output is .o
+ if [ $arg = '-c' ]; then
+ OUTPUT_O='YES'
+ fi
+
+ # if the output file is given by a -o option, record it
+ if [ $SKIP = 'O' ]; then
+ SKIP='NO'
+ NAMED_OUTPUT=$arg
+ fi
+
+ if [ $arg = '-o' ]; then
+ SKIP='O'
+ fi
+
+ # Note each file ending by ${SUFFIX} and remember the last one
+ # Transform them in .o
+ if `echo $arg | grep -q "${SUFFIX}$"`; then
+ LASTFILE=$arg
+ OUTPUT+=`echo $arg | sed "s/${SUFFIX}/\.o/"`
+ OUTPUT+=' '
+ fi
+ fi
+done
+
+# What is the output?
+
+if [ ${NAMED_OUTPUT}"X" != "X" ]; then
+ OUTPUT=$NAMED_OUTPUT
+
+elif [ $OUTPUT_O = 'NO' ]; then
+ # It is an executable whose is name is the LASTFILE without suffix
+ OUTPUT=`echo ${LASTFILE} | sed "s/${SUFFIX}//"`
+fi
+
+# Othewise, the output is just the ${OUTPUT} variable as computed before
+
+# For some reason, -dynamiclib and -lpython2.6 are missing when linking
+# .so files. Add them, except if -bundle is set (incompatible switches)
+if [ `echo $OUTPUT | sed -E 's|.*\.||'` = "so" ] && \
+ ! `echo $NEWARGS | grep -q bundle`; then
+ NEWARGS="${NEWARGS} ${PREFIX}/lib/libpython2.6.dylib -dynamiclib"
+fi
+
+# Now, compile
+
+if [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'NO' ]; then
+ # No size indication given, just proceed with default
+ if `${COMPILER} $NEWARGS`; then
+ exit 0
+ else
+ exit 1
+ fi
+
+elif [ $SIZE32 = 'YES' ] && [ $SIZE64 = 'NO' ]; then
+ # 32-bit
+ if `${COMPILER} -m32 $NEWARGS`; then
+ exit 0
+ else
+ exit 1
+ fi
+
+elif [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'YES' ]; then
+ # 64-bit
+ if `${COMPILER} -m64 $NEWARGS`; then
+ exit 0
+ else
+ exit 1
+ fi
+
+else
+ # Universal case
+ if `${COMPILER} -m32 $NEWARGS`; then
+ for filename in ${OUTPUT}
+ do
+ mv ${filename} ${filename}.32
+ done
+
+ if `${COMPILER} -m64 $NEWARGS`; then
+ for filename in ${OUTPUT}
+ do
+ mv ${filename} ${filename}.64
+ if [ $INTEL = 'YES' ]; then
+ lipo -create -arch x86_64 ${filename}.64 \
+ -arch i386 ${filename}.32 \
+ -output ${filename}
+ else
+ lipo -create -arch ppc64 ${filename}.64 \
+ -arch ppc ${filename}.32 \
+ -output ${filename}
+ fi
+
+ rm -f ${filename}.32 ${filename}.64
+ done
+ else
+ exit 1
+ fi
+ else
+ exit 1
+ fi
+fi
+exit 0
diff --git a/packaging/macosx/ports/python/py26-cython/Portfile b/packaging/macosx/ports/python/py26-cython/Portfile
new file mode 100644
index 000000000..9497f5e7e
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/Portfile
@@ -0,0 +1,85 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 125247 2014-09-11 17:01:30Z stromnov@macports.org $
+
+PortSystem 1.0
+PortGroup python 1.0
+PortGroup select 1.0
+
+name py26-cython
+version 0.21
+revision 0
+categories-append devel
+platforms darwin
+license Apache-2
+
+python.versions 26
+python.version 26
+
+maintainers stromnov openmaintainer
+
+description A language for writing C extension modules for Python.
+
+long_description Cython is a language that makes writing C extensions for \
+ the Python language as easy as Python itself. Cython is \
+ based on the well-known Pyrex, but supports more cutting \
+ edge functionality and optimizations
+
+homepage http://www.cython.org/
+master_sites ${homepage}release/ \
+ http://pypi.python.org/packages/source/C/Cython/
+
+distname Cython-${version}
+
+checksums rmd160 f5944014c1e4dccb8ec23af96efc05c137917371 \
+ sha256 0cd5787fb3f1eaf8326b21bdfcb90aabd3eca7c214c5b7b503fbb82da97bbaa0
+
+if {${name} eq ${subport}} {
+
+ revision 100
+
+ # Cython 0.21 requires Python 2.6+ or 3.3+
+ if {[lsearch {24 25 31 32} ${python.version}] != -1} {
+ version 0.20.2
+ revision 0
+ distname Cython-${version}
+ checksums rmd160 e78f1779077d6c8e266c9b42b85c8e9031a342d2 \
+ sha256 ed13b606a2aeb5bd6c235f8ed6c9988c99d01a033d0d21d56137c13d5c7be63f
+ }
+
+ post-destroot {
+ if {${subport} eq "py24-cython" || ${subport} eq "py25-cython"} {
+ xinstall -m 644 -W ${worksrcpath}/Doc About.html FAQ.html \
+ extension_types.html index.html overview.html primes.c sharing.html \
+ special_methods.html ${destroot}${prefix}/share/doc/${subport}
+ xinstall -m 644 -W ${worksrcpath} INSTALL.txt README.txt \
+ ToDo.txt USAGE.txt ${destroot}${prefix}/share/doc/${subport}
+ } else {
+ xinstall -m 755 -d ${destroot}${python.prefix}/share/doc/cython
+ xinstall -m 644 -W ${worksrcpath}/Doc About.html FAQ.html \
+ extension_types.html index.html overview.html primes.c sharing.html \
+ special_methods.html ${destroot}${python.prefix}/share/doc/cython
+ xinstall -m 644 -W ${worksrcpath} INSTALL.txt README.txt\
+ ToDo.txt USAGE.txt ${destroot}${python.prefix}/share/doc/cython
+ }
+ }
+
+ depends_run port:cython_select
+ test.run no
+
+ select.group cython
+ select.file ${filespath}/cython${python.version}
+
+ notes "
+To make the Python ${python.branch} version of Cython the one that is run\
+when you execute the commands without a version suffix, e.g. 'cython', run:
+
+port select --set ${select.group} [file tail ${select.file}]
+"
+
+ livecheck.type none
+} else {
+ #livecheck.type regex
+ #livecheck.url [lindex ${master_sites} 0]
+ #livecheck.regex {Cython-(\d+(?:\.\d+)*)\.[tz]}
+ livecheck.type none
+}
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython24 b/packaging/macosx/ports/python/py26-cython/files/cython24
new file mode 100644
index 000000000..6fa8a8026
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython24
@@ -0,0 +1,2 @@
+bin/cython-2.4
+-
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython25 b/packaging/macosx/ports/python/py26-cython/files/cython25
new file mode 100644
index 000000000..294a43303
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython25
@@ -0,0 +1,2 @@
+bin/cython-2.5
+-
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython26 b/packaging/macosx/ports/python/py26-cython/files/cython26
new file mode 100644
index 000000000..48523983b
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython26
@@ -0,0 +1,2 @@
+${frameworks_dir}/Python.framework/Versions/2.6/bin/cython
+${frameworks_dir}/Python.framework/Versions/2.6/bin/cygdb
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython27 b/packaging/macosx/ports/python/py26-cython/files/cython27
new file mode 100644
index 000000000..91f8cb8fd
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython27
@@ -0,0 +1,2 @@
+${frameworks_dir}/Python.framework/Versions/2.7/bin/cython
+${frameworks_dir}/Python.framework/Versions/2.7/bin/cygdb
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython31 b/packaging/macosx/ports/python/py26-cython/files/cython31
new file mode 100644
index 000000000..96c9b1b4e
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython31
@@ -0,0 +1,2 @@
+${frameworks_dir}/Python.framework/Versions/3.1/bin/cython
+${frameworks_dir}/Python.framework/Versions/3.1/bin/cygdb
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython32 b/packaging/macosx/ports/python/py26-cython/files/cython32
new file mode 100644
index 000000000..b31fc1fc5
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython32
@@ -0,0 +1,2 @@
+${frameworks_dir}/Python.framework/Versions/3.2/bin/cython
+${frameworks_dir}/Python.framework/Versions/3.2/bin/cygdb
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython33 b/packaging/macosx/ports/python/py26-cython/files/cython33
new file mode 100644
index 000000000..d19afec09
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython33
@@ -0,0 +1,2 @@
+${frameworks_dir}/Python.framework/Versions/3.3/bin/cython
+${frameworks_dir}/Python.framework/Versions/3.3/bin/cygdb
diff --git a/packaging/macosx/ports/python/py26-cython/files/cython34 b/packaging/macosx/ports/python/py26-cython/files/cython34
new file mode 100644
index 000000000..487ad3299
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-cython/files/cython34
@@ -0,0 +1,2 @@
+${frameworks_dir}/Python.framework/Versions/3.4/bin/cython
+${frameworks_dir}/Python.framework/Versions/3.4/bin/cygdb
diff --git a/packaging/macosx/ports/python/py26-lxml/Portfile b/packaging/macosx/ports/python/py26-lxml/Portfile
new file mode 100644
index 000000000..4d9f59690
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-lxml/Portfile
@@ -0,0 +1,52 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 121661 2014-07-03 17:50:11Z mf2k@macports.org $
+
+PortSystem 1.0
+PortGroup python 1.0
+
+name py26-lxml
+version 3.3.5
+revision 0
+categories-append devel
+platforms darwin
+license BSD
+
+python.versions 26
+python.version 26
+
+maintainers gmail.com:dbraband openmaintainer
+
+description Powerful and Pythonic XML processing library
+
+long_description lxml is a Pythonic binding for the libxml2 and \
+ libxslt libraries. It is unique in that it \
+ combines the speed and feature completeness of \
+ these libraries with the simplicity of a native \
+ Python API, mostly compatible but superior to \
+ the well-known ElementTree API.
+
+homepage http://lxml.de/
+master_sites http://pypi.python.org/packages/source/l/lxml/
+
+checksums rmd160 c7ccece50f8d20f5fac44ac1bf8dc0d8a85aa0f9 \
+ sha256 6ad6949dc7eea744a30fba77a968dd5910f545220e58bcc813b9df5c793e318a
+
+distname lxml-${version}
+
+if {${name} eq ${subport}} {
+
+ revision 100
+
+ depends_build-append \
+ port:py${python.version}-setuptools
+
+ depends_lib-append port:zlib \
+ port:libxml2 \
+ port:libxslt
+
+ livecheck.type none
+#} else {
+# livecheck.type regex
+# livecheck.url ${master_sites}
+# livecheck.regex "lxml-(\\d+(?:\\.\\d+)*)${extract.suffix}"
+}
diff --git a/packaging/macosx/ports/python/py26-nose/Portfile b/packaging/macosx/ports/python/py26-nose/Portfile
new file mode 100644
index 000000000..03c74a44d
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/Portfile
@@ -0,0 +1,87 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 121661 2014-07-03 17:50:11Z mf2k@macports.org $
+
+PortSystem 1.0
+PortGroup python 1.0
+PortGroup select 1.0
+
+set my_name nose
+name py26-${my_name}
+version 1.3.1
+categories-append www
+license LGPL-2+
+maintainers mcalhoun openmaintainer
+description A Python unittest extension.
+long_description \
+ A unittest extension offering automatic test \
+ suite discovery, simplified test authoring, \
+ and output capture. Nose provides an alternate \
+ test discovery and running process for \
+ unittest, one that is intended to mimic the \
+ behavior of py.test as much as is reasonably \
+ possible without resorting to magic.
+
+platforms darwin
+supported_archs noarch
+
+homepage http://somethingaboutorange.com/mrl/projects/${my_name}
+master_sites http://pypi.python.org/packages/source/n/${my_name}/
+distname ${my_name}-${version}
+
+checksums md5 672398801ddf5ba745c55c6eed79c5aa \
+ rmd160 7bf311d3d54f2ccb372dea331708c475b992ccec \
+ sha256 85273b87ab3db9307e3b1452b071e25c1db1cc812bc337d2a97ea0b0cf2ab6ba
+
+python.versions 26
+python.version 26
+
+# already installs version-suffixed executables
+python.link_binaries no
+python.move_binaries no
+
+depends_run-append port:nosetests_select
+if {${name} eq ${subport}} {
+
+ revision 100
+
+ select.group nosetests
+ select.file ${filespath}/nosetests${python.version}
+
+ depends_lib port:py${python.version}-setuptools
+
+ post-patch {
+ reinplace "s|man/man|share/man/man|" ${worksrcpath}/setup.py
+
+ # One of the tests fails if this directory does not exist
+ file mkdir ${worksrcpath}/functional_tests/support/empty
+ }
+
+ post-destroot {
+ if {${python.version} == "24" || ${python.version} == "25"} {
+ move ${destroot}${prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1
+ delete ${destroot}${prefix}/bin/nosetests
+ } else {
+ ln -s ${python.prefix}/bin/nosetests-${python.branch} ${destroot}${prefix}/bin/
+ ln -s ${python.prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1
+ }
+
+ xinstall -m 644 -W ${worksrcpath} \
+ AUTHORS CHANGELOG NEWS README.txt \
+ ${destroot}${prefix}/share/doc/${subport}
+
+ file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${subport}/html
+
+ file delete ${destroot}${prefix}/share/doc/${subport}/examples
+ file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport}
+ }
+
+ test.run yes
+ test.cmd ${python.bin} setup.py test
+
+ livecheck.type none
+
+#} else {
+# livecheck.type regex
+# livecheck.url ${master_sites}
+# livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
+}
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests24 b/packaging/macosx/ports/python/py26-nose/files/nosetests24
new file mode 100644
index 000000000..d9a8f4034
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests24
@@ -0,0 +1 @@
+bin/nosetests-2.4
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests25 b/packaging/macosx/ports/python/py26-nose/files/nosetests25
new file mode 100644
index 000000000..95864c283
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests25
@@ -0,0 +1 @@
+bin/nosetests-2.5
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests26 b/packaging/macosx/ports/python/py26-nose/files/nosetests26
new file mode 100644
index 000000000..bb670776f
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests26
@@ -0,0 +1 @@
+bin/nosetests-2.6
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests27 b/packaging/macosx/ports/python/py26-nose/files/nosetests27
new file mode 100644
index 000000000..28c7bfe8c
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests27
@@ -0,0 +1 @@
+bin/nosetests-2.7
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests31 b/packaging/macosx/ports/python/py26-nose/files/nosetests31
new file mode 100644
index 000000000..5ba27a4d5
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests31
@@ -0,0 +1 @@
+bin/nosetests-3.1
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests32 b/packaging/macosx/ports/python/py26-nose/files/nosetests32
new file mode 100644
index 000000000..07bfb86a1
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests32
@@ -0,0 +1 @@
+bin/nosetests-3.2
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests33 b/packaging/macosx/ports/python/py26-nose/files/nosetests33
new file mode 100644
index 000000000..b750d806b
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests33
@@ -0,0 +1 @@
+bin/nosetests-3.3
diff --git a/packaging/macosx/ports/python/py26-nose/files/nosetests34 b/packaging/macosx/ports/python/py26-nose/files/nosetests34
new file mode 100644
index 000000000..542ffc949
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-nose/files/nosetests34
@@ -0,0 +1 @@
+bin/nosetests-3.4
diff --git a/packaging/macosx/ports/python/py26-numpy/Portfile b/packaging/macosx/ports/python/py26-numpy/Portfile
new file mode 100644
index 000000000..db4a511aa
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-numpy/Portfile
@@ -0,0 +1,214 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id: Portfile 125483 2014-09-18 14:34:29Z michaelld@macports.org $
+
+PortSystem 1.0
+PortGroup python 1.0
+PortGroup github 1.0
+
+github.setup numpy numpy 1.9.0 v
+name py26-numpy
+categories-append math
+license BSD
+platforms darwin
+maintainers dh michaelld openmaintainer
+description The core utilities for the scientific library scipy for Python
+long_description ${description}
+
+checksums rmd160 836bcd7ef0f37129f06ea73b3cc27ec31035bfe0 \
+ sha256 33e33768307b5f92cb098e93359e4fe97dfb9783df591ffbd44809bab7e50c0f
+
+python.versions 26
+python.version 26
+
+if {${name} eq ${subport}} {
+
+ revision 100
+
+ patchfiles patch-f2py_setup.py.diff \
+ patch-fcompiler_g95.diff \
+ patch-numpy_core_setup.py.diff
+
+ depends_lib-append port:fftw-3 \
+ port:py${python.version}-nose \
+ port:py${python.version}-cython
+
+ # http://trac.macports.org/ticket/34562
+ destroot.env-append \
+ CC="${configure.cc}" \
+ CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+ CXX="${configure.cxx}" \
+ CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
+ OBJC="${configure.objc}" \
+ OBJCFLAGS="${configure.objcflags} [get_canonical_archflags objc]" \
+ LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
+
+ build.env-append ARCHFLAGS="[get_canonical_archflags ld]"
+ destroot.env-append ARCHFLAGS="[get_canonical_archflags ld]"
+
+ variant atlas description {Use the MacPorts' ATLAS libraries \
+ instead of Apple's Accelerate framework} {
+ depends_lib-append port:atlas
+
+ if {[variant_isset universal]} {
+ python.set_compiler no
+ }
+ }
+
+ # when using ATLAS (whether by default or specified by the user via
+ # the +atlas variant) ...
+ set gcc_version ""
+ if {[variant_isset atlas]} {
+
+ # see if the user has set -gcc4X to disable using MacPorts'
+ # compiler; if not, either use what the user set (as +gcc4X) or
+ # default to gcc48.
+
+ variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 \
+ description {Use the gcc43 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.3
+ }
+
+ variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 \
+ description {Use the gcc44 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.4
+ }
+
+ variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 \
+ description {Use the gcc45 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.5
+ }
+
+ variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 \
+ description {Use the gcc46 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.6
+ }
+
+ variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 \
+ description {Use the gcc47 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.7
+ }
+
+ variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 \
+ description {Use the gcc48 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.8
+ }
+
+ if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
+ default_variants +gcc48
+ }
+
+ if {[variant_isset gcc43]} {
+ set gcc_version "4.3"
+ } elseif {[variant_isset gcc44]} {
+ set gcc_version "4.4"
+ } elseif {[variant_isset gcc45]} {
+ set gcc_version "4.5"
+ } elseif {[variant_isset gcc46]} {
+ set gcc_version "4.6"
+ } elseif {[variant_isset gcc47]} {
+ set gcc_version "4.7"
+ } elseif {[variant_isset gcc48]} {
+ set gcc_version "4.8"
+ }
+
+ # when using non-Apple GCC for universal install, it can
+ # create binaries only for the native OS architecture, at
+ # either 32 or 64 bits. Restrict the supported archs
+ # accordingly.
+ if {${os.arch} eq "i386"} {
+ supported_archs i386 x86_64
+ } elseif {${os.arch} eq "powerpc"} {
+ supported_archs ppc ppc64
+ }
+
+ # include all the correct GCC4X port
+ depends_lib-append port:gcc[join [split ${gcc_version} "."] ""]
+
+ # force LDFLAGS for correct linking of the linalg module
+ # for non-Apple GCC compilers
+ patchfiles-append patch-numpy_linalg_setup.py.diff
+
+ if {${gcc_version} == ""} {
+ # user specified -gcc4X but +atlas (either as default or
+ # explicitly); do not allow since it might lead to
+ # undetermined runtime execution.
+ return -code error \
+"\n\nWhen using the +atlas variant (either as the default or setting
+explicitly), one of the +gcc4X variants must be selected.\n"
+ }
+ }
+
+ post-patch {
+ reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \
+ ${worksrcpath}/numpy/f2py/setup.py
+
+ if {[variant_isset universal] && [variant_isset atlas]} {
+ # Prepare wrappers
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/c-wrapper
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/f-wrapper
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/cxx-wrapper
+
+ reinplace "s|@@@|${configure.cc}|" ${worksrcpath}/c-wrapper
+ reinplace "s|---|\\\\.c|" ${worksrcpath}/c-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/c-wrapper
+
+ reinplace "s|@@@|${configure.cxx}|" ${worksrcpath}/cxx-wrapper
+ reinplace "s#---#(\\\\.C|\\\\.cpp|\\\\.cc)#" \
+ ${worksrcpath}/cxx-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/cxx-wrapper
+
+ reinplace "s|@@@|${configure.f90}|" ${worksrcpath}/f-wrapper
+ reinplace "s|---|\\\\.f|" ${worksrcpath}/f-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/f-wrapper
+
+ build.env-append CC="${worksrcpath}/c-wrapper" \
+ CXX="${worksrcpath}/cxx-wrapper" \
+ F77="${worksrcpath}/f-wrapper" \
+ F90="${worksrcpath}/f-wrapper"
+
+ destroot.env-append CC="${worksrcpath}/c-wrapper" \
+ CXX="${worksrcpath}/cxx-wrapper" \
+ F77="${worksrcpath}/f-wrapper" \
+ F90="${worksrcpath}/f-wrapper"
+ }
+
+ if {[variant_isset atlas]} {
+ # We must link against libSatlas or libTatlas, not libAtlas
+ if {[file exists ${prefix}/lib/libtatlas.dylib]} {
+ reinplace -E \
+ "s|_lib_atlas = \\\['atlas'\\\]|_lib_atlas = \\\['tatlas'\\\]|" \
+ ${worksrcpath}/numpy/distutils/system_info.py
+ } elseif {[file exists ${prefix}/lib/libsatlas.dylib]} {
+ reinplace -E \
+ "s|_lib_atlas = \\\['atlas'\\\]|_lib_atlas = \\\['satlas'\\\]|" \
+ ${worksrcpath}/numpy/distutils/system_info.py
+ } else {
+ return -code error "Unable to find Atlas dylibs. Bailing out."
+ }
+ }
+ }
+
+ livecheck.type none
+
+ if {[variant_isset atlas]} {
+ build.env-append ATLAS=${prefix}/lib \
+ LAPACK=${prefix}/lib \
+ BLAS=${prefix}/lib
+ destroot.env-append ATLAS=${prefix}/lib \
+ LAPACK=${prefix}/lib \
+ BLAS=${prefix}/lib
+ } else {
+ build.env-append ATLAS=None \
+ LAPACK=/usr/lib \
+ BLAS=/usr/lib
+ destroot.env-append ATLAS=None \
+ LAPACK=/usr/lib \
+ BLAS=/usr/lib
+ }
+
+#} else {
+# livecheck.regex archive/[join ${github.tag_prefix} ""](\[\\d+(?:\\.\\d+)*"\]+)${extract.suffix}"
+}
diff --git a/packaging/macosx/ports/python/py26-numpy/files/patch-f2py_setup.py.diff b/packaging/macosx/ports/python/py26-numpy/files/patch-f2py_setup.py.diff
new file mode 100644
index 000000000..1e3164e73
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-numpy/files/patch-f2py_setup.py.diff
@@ -0,0 +1,39 @@
+--- numpy/f2py/setup.py
++++ numpy/f2py/setup.py
+@@ -41,21 +41,21 @@ def configuration(parent_package='',top_
+ )
+
+ config.make_svn_version_py()
+
+ def generate_f2py_py(build_dir):
+- f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:]
++ f2py_exe = 'f2py'
+ if f2py_exe[-4:]=='.exe':
+ f2py_exe = f2py_exe[:-4] + '.py'
+ if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
+ f2py_exe = f2py_exe + '.py'
+ target = os.path.join(build_dir, f2py_exe)
+ if newer(__file__, target):
+ log.info('Creating %s', target)
+ f = open(target, 'w')
+ f.write('''\
+-#!%s
++#!@@MPORTS_PYTHON@@
+ # See http://cens.ioc.ee/projects/f2py2e/
+ import os, sys
+ for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
+ try:
+ i=sys.argv.index("--"+mode)
+@@ -75,11 +75,11 @@ elif mode=="2e-numpy":
+ from numpy.f2py import main
+ else:
+ sys.stderr.write("Unknown mode: " + repr(mode) + "\\n")
+ sys.exit(1)
+ main()
+-'''%(sys.executable))
++''')
+ f.close()
+ return target
+
+ config.add_scripts(generate_f2py_py)
+
diff --git a/packaging/macosx/ports/python/py26-numpy/files/patch-fcompiler_g95.diff b/packaging/macosx/ports/python/py26-numpy/files/patch-fcompiler_g95.diff
new file mode 100644
index 000000000..b95a2609a
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-numpy/files/patch-fcompiler_g95.diff
@@ -0,0 +1,15 @@
+--- numpy/distutils/fcompiler/__init__.py
++++ numpy/distutils/fcompiler/__init__.py
+@@ -708,11 +708,11 @@
+ ('win32', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95',
+ 'intelvem', 'intelem')),
+ ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')),
+ ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq',
+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95')),
+- ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')),
++ ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'pg')),
+ ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')),
+ ('irix.*', ('mips', 'gnu', 'gnu95',)),
+ ('aix.*', ('ibm', 'gnu', 'gnu95',)),
+ # os.name mappings
+ ('posix', ('gnu', 'gnu95',)),
diff --git a/packaging/macosx/ports/python/py26-numpy/files/patch-numpy_core_setup.py.diff b/packaging/macosx/ports/python/py26-numpy/files/patch-numpy_core_setup.py.diff
new file mode 100644
index 000000000..3aed3b18c
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-numpy/files/patch-numpy_core_setup.py.diff
@@ -0,0 +1,34 @@
+--- numpy/core/setup.py.orig 2014-03-25 19:03:06.000000000 -0400
++++ numpy/core/setup.py 2014-03-25 19:03:26.000000000 -0400
+@@ -481,7 +481,14 @@
+ if isinstance(d, str):
+ target_f.write('#define %s\n' % (d))
+ else:
+- target_f.write('#define %s %s\n' % (d[0], d[1]))
++ if d[0]!='SIZEOF_LONG' and d[0]!='SIZEOF_PY_INTPTR_T':
++ target_f.write('#define %s %s\n' % (d[0], d[1]))
++ else:
++ target_f.write('#ifdef __LP64__\n')
++ target_f.write('#define %s %s\n' % (d[0], 8))
++ target_f.write('#else\n')
++ target_f.write('#define %s %s\n' % (d[0], 4))
++ target_f.write('#endif\n')
+
+ # define inline to our keyword, or nothing
+ target_f.write('#ifndef __cplusplus\n')
+@@ -581,7 +588,14 @@
+ if isinstance(d, str):
+ target_f.write('#define %s\n' % (d))
+ else:
+- target_f.write('#define %s %s\n' % (d[0], d[1]))
++ if d[0]!='NPY_SIZEOF_LONG' and d[0]!='NPY_SIZEOF_PY_INTPTR_T':
++ target_f.write('#define %s %s\n' % (d[0], d[1]))
++ else:
++ target_f.write('#ifdef __LP64__\n')
++ target_f.write('#define %s %s\n' % (d[0], 8))
++ target_f.write('#else\n')
++ target_f.write('#define %s %s\n' % (d[0], 4))
++ target_f.write('#endif\n')
+
+ # Define __STDC_FORMAT_MACROS
+ target_f.write("""
diff --git a/packaging/macosx/ports/python/py26-numpy/files/patch-numpy_linalg_setup.py.diff b/packaging/macosx/ports/python/py26-numpy/files/patch-numpy_linalg_setup.py.diff
new file mode 100644
index 000000000..848d46186
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-numpy/files/patch-numpy_linalg_setup.py.diff
@@ -0,0 +1,20 @@
+--- numpy/linalg/setup.py.orig 2013-11-16 08:30:31.000000000 -0500
++++ numpy/linalg/setup.py 2013-11-16 08:39:27.000000000 -0500
+@@ -37,7 +37,8 @@
+ config.add_extension('lapack_lite',
+ sources = [get_lapack_lite_sources],
+ depends = ['lapack_litemodule.c'] + lapack_lite_src,
+- extra_info = lapack_info
++ extra_info = lapack_info,
++ extra_link_args=['-undefined dynamic_lookup -bundle']
+ )
+
+ # umath_linalg module
+@@ -47,6 +48,7 @@
+ depends = ['umath_linalg.c.src'] + lapack_lite_src,
+ extra_info = lapack_info,
+ libraries = ['npymath'],
++ extra_link_args=['-undefined dynamic_lookup -bundle']
+ )
+
+ return config
diff --git a/packaging/macosx/ports/python/py26-numpy/files/wrapper-template b/packaging/macosx/ports/python/py26-numpy/files/wrapper-template
new file mode 100644
index 000000000..48936d107
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-numpy/files/wrapper-template
@@ -0,0 +1,143 @@
+#!/bin/sh
+COMPILER='@@@'
+SUFFIX='---'
+PREFIX='&&&'
+OUTPUT_O='NO'
+OUTPUT=''
+NAMED_OUTPUT=''
+LASTFILE=''
+INTEL='NO'
+SIZE32='NO'
+SIZE64='NO'
+NEWARGS=''
+
+SKIP='NO'
+
+for arg in $@
+do
+ if [ $SKIP = 'ARCH' ]; then
+ # intercept -arch option and set SIZEXX
+ SKIP='NO'
+ if [ $arg = 'x86_64' ] || [ $arg = 'ppc64' ]; then
+ SIZE64='YES'
+ else
+ SIZE32='YES'
+ fi
+
+ # which architecture are we compiling for?
+ if [ $arg = 'x86_64' ] || [ $arg = 'i386' ]; then
+ INTEL='YES'
+ fi
+
+ elif [ $arg = '-arch' ]; then
+ SKIP='ARCH'
+
+ elif [ $arg = '--version' ]; then
+ ${COMPILER} --version
+ exit 0
+
+ else
+ NEWARGS+="$arg "
+
+ # if the -c option is given, the output is .o
+ if [ $arg = '-c' ]; then
+ OUTPUT_O='YES'
+ fi
+
+ # if the output file is given by a -o option, record it
+ if [ $SKIP = 'O' ]; then
+ SKIP='NO'
+ NAMED_OUTPUT=$arg
+ fi
+
+ if [ $arg = '-o' ]; then
+ SKIP='O'
+ fi
+
+ # Note each file ending by ${SUFFIX} and remember the last one
+ # Transform them in .o
+ if `echo $arg | grep -q "${SUFFIX}$"`; then
+ LASTFILE=$arg
+ OUTPUT+=`echo $arg | sed "s/${SUFFIX}/\.o/"`
+ OUTPUT+=' '
+ fi
+ fi
+done
+
+# What is the output?
+
+if [ ${NAMED_OUTPUT}"X" != "X" ]; then
+ OUTPUT=$NAMED_OUTPUT
+
+elif [ $OUTPUT_O = 'NO' ]; then
+ # It is an executable whose is name is the LASTFILE without suffix
+ OUTPUT=`echo ${LASTFILE} | sed "s/${SUFFIX}//"`
+fi
+
+# Othewise, the output is just the ${OUTPUT} variable as computed before
+
+# For some reason, -dynamiclib and -lpython2.6 are missing when linking
+# .so files. Add them, except if -bundle is set (incompatible switches)
+if [ `echo $OUTPUT | sed -E 's|.*\.||'` = "so" ] && \
+ ! `echo $NEWARGS | grep -q bundle`; then
+ NEWARGS="${NEWARGS} ${PREFIX}/lib/libpython2.6.dylib -dynamiclib"
+fi
+
+# Now, compile
+
+if [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'NO' ]; then
+ # No size indication given, just proceed with default
+ if `${COMPILER} $NEWARGS`; then
+ exit 0
+ else
+ exit 1
+ fi
+
+elif [ $SIZE32 = 'YES' ] && [ $SIZE64 = 'NO' ]; then
+ # 32-bit
+ if `${COMPILER} -m32 $NEWARGS`; then
+ exit 0
+ else
+ exit 1
+ fi
+
+elif [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'YES' ]; then
+ # 64-bit
+ if `${COMPILER} -m64 $NEWARGS`; then
+ exit 0
+ else
+ exit 1
+ fi
+
+else
+ # Universal case
+ if `${COMPILER} -m32 $NEWARGS`; then
+ for filename in ${OUTPUT}
+ do
+ mv ${filename} ${filename}.32
+ done
+
+ if `${COMPILER} -m64 $NEWARGS`; then
+ for filename in ${OUTPUT}
+ do
+ mv ${filename} ${filename}.64
+ if [ $INTEL = 'YES' ]; then
+ lipo -create -arch x86_64 ${filename}.64 \
+ -arch i386 ${filename}.32 \
+ -output ${filename}
+ else
+ lipo -create -arch ppc64 ${filename}.64 \
+ -arch ppc ${filename}.32 \
+ -output ${filename}
+ fi
+
+ rm -f ${filename}.32 ${filename}.64
+ done
+ else
+ exit 1
+ fi
+ else
+ exit 1
+ fi
+fi
+exit 0
diff --git a/packaging/macosx/ports/python/py26-setuptools/Portfile b/packaging/macosx/ports/python/py26-setuptools/Portfile
new file mode 100644
index 000000000..b9893a4cb
--- /dev/null
+++ b/packaging/macosx/ports/python/py26-setuptools/Portfile
@@ -0,0 +1,61 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 125953 2014-09-30 10:58:10Z jmr@macports.org $
+
+PortSystem 1.0
+PortGroup python 1.0
+
+name py26-setuptools
+version 6.0.2
+categories-append devel
+license {PSF ZPL}
+maintainers jmr openmaintainer
+description distutils enhancement for build and distribution
+long_description \
+ setuptools is a collection of enhancements to the Python distutils that \
+ allow you to more easily build and distribute Python packages, \
+ especially ones that have dependencies on other packages.
+
+platforms darwin
+supported_archs noarch
+
+homepage https://pypi.python.org/pypi/setuptools/
+master_sites https://pypi.python.org/packages/source/s/setuptools/
+distname setuptools-${version}
+
+checksums md5 b79fab610e362fe8e3a9cb92fb9d95ef \
+ rmd160 5040f99a8ee3cd5b4040dc1e0a4d7cd9d5e7f7b1 \
+ sha256 7029f6ca93e6a78112f1f621f79cab1a611901697a4c131bc5ef2f7a429825f7
+
+python.versions 26
+python.version 26
+python.link_binaries no
+python.move_binaries no
+
+if {$subport eq $name} {
+
+ revision 100
+
+ if {${python.version} <= 25} {
+ version 1.4.2
+ distname setuptools-${version}
+ checksums md5 13951be6711438073fbe50843e7f141f \
+ rmd160 b48086a2aae718fe433a8c882d2d9209aa157b0a \
+ sha256 263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd
+ }
+
+ post-destroot {
+ xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
+ xinstall -m 644 -W ${worksrcpath} CHANGES.txt \
+ DEVGUIDE.txt README.txt ${destroot}${prefix}/share/doc/${subport}
+ if {${python.version} <= 25} {
+ delete "${destroot}${prefix}/bin/easy_install"
+ } else {
+ ln -s "${python.prefix}/bin/easy_install-${python.branch}" "${destroot}${prefix}/bin/"
+ }
+ }
+ livecheck.type none
+#} else {
+# livecheck.type regex
+# livecheck.url ${homepage}
+# livecheck.regex setuptools/(\\d+(\\.\\d+)+)
+}