[27085] trunk/dports/python

source_changes at macosforge.org source_changes at macosforge.org
Tue Jul 17 22:52:44 PDT 2007


Revision: 27085
          http://trac.macosforge.org/projects/macports/changeset/27085
Author:   yves at macports.org
Date:     2007-07-17 22:52:43 -0700 (Tue, 17 Jul 2007)

Log Message:
-----------
python25 ports for numeric, gobject, cairo, gtk, orbit and gnome

Added Paths:
-----------
    trunk/dports/python/py25-cairo/
    trunk/dports/python/py25-cairo/Portfile
    trunk/dports/python/py25-gnome/
    trunk/dports/python/py25-gnome/Portfile
    trunk/dports/python/py25-gobject/
    trunk/dports/python/py25-gobject/Portfile
    trunk/dports/python/py25-gobject/files/
    trunk/dports/python/py25-gobject/files/pygobject-init-v3.diff
    trunk/dports/python/py25-gtk/
    trunk/dports/python/py25-gtk/Portfile
    trunk/dports/python/py25-numeric/
    trunk/dports/python/py25-numeric/Portfile
    trunk/dports/python/py25-numeric/files/
    trunk/dports/python/py25-numeric/files/customize.py-macosx
    trunk/dports/python/py25-numeric/files/customize.py-puredarwin
    trunk/dports/python/py25-orbit/
    trunk/dports/python/py25-orbit/Portfile

Added: trunk/dports/python/py25-cairo/Portfile
===================================================================
--- trunk/dports/python/py25-cairo/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-cairo/Portfile	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,18 @@
+# $Id$
+
+PortSystem 1.0
+name               py25-cairo
+version            1.4.0
+categories         python x11
+maintainers        nomaintainer at macports.org
+description        Pycairo is set of Python bindings for the cairo graphics library
+long_description   ${description}
+
+homepage        http://cairographics.org/pycairo/
+master_sites    http://cairographics.org/releases/
+distname        pycairo-${version}
+checksums       md5 e26e77919b606113f565d70036c1f504
+
+depends_lib     port:cairo port:py25-numeric
+
+configure.env   PYTHON=python2.5


Property changes on: trunk/dports/python/py25-cairo/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/python/py25-gnome/Portfile
===================================================================
--- trunk/dports/python/py25-gnome/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-gnome/Portfile	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,31 @@
+# $Id$
+
+PortSystem 1.0
+
+name				py25-gnome
+version				2.18.2
+categories			python gnome
+platforms			darwin
+maintainers			pguyot at kallisys.net
+description			gnome-python is a set of python interfaces to gnome-libs.
+long_description	${description}
+
+homepage			http://www.pygtk.org/
+master_sites		gnome:sources/gnome-python/2.18/
+use_bzip2			yes
+distname			gnome-python-${version}
+checksums			md5 3df58e4354526d4e0be8524c0bf6ddb8 \
+					sha1 2da50cb7177b29aee23fc732c5e6884a120099c3 \
+					rmd160 2a45d9461ddb40cd2d49ae565189bc7f11e481f3
+
+depends_lib			port:libzvt \
+					port:py25-gtk2 \
+					port:py25-orbit
+
+build.args          PYTHON_LDFLAGS= PYTHON_LIBS=
+
+configure.env       PYTHON=python2.5
+
+livecheck.check	md5
+livecheck.url	ftp://ftp.gnome.org/pub/GNOME/sources/gnome-python/
+livecheck.md5	0cc88801d2019c3ec94f296cda5f57f9


Property changes on: trunk/dports/python/py25-gnome/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/python/py25-gobject/Portfile
===================================================================
--- trunk/dports/python/py25-gobject/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-gobject/Portfile	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,27 @@
+# $Id$
+
+PortSystem 1.0
+name               py25-gobject
+version		       2.12.3
+categories         python gnome
+maintainers        nomaintainer at macports.org
+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/pygobject/2.12/
+distname        pygobject-${version}
+use_bzip2       yes
+checksums       md5 009986021225b7ea6e0ba848707785af
+
+patchfiles      pygobject-init-v3.diff
+
+depends_lib     port:glib2 port:libxslt port:python25
+
+configure.env   PYTHON=python2.5
+


Property changes on: trunk/dports/python/py25-gobject/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/python/py25-gobject/files/pygobject-init-v3.diff
===================================================================
--- trunk/dports/python/py25-gobject/files/pygobject-init-v3.diff	                        (rev 0)
+++ trunk/dports/python/py25-gobject/files/pygobject-init-v3.diff	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,155 @@
+Index: gobject/pygobject.h
+===================================================================
+--- gobject/pygobject.h	(revision 639)
++++ gobject/pygobject.h	(working copy)
+@@ -274,53 +274,107 @@
+             PyEval_RestoreThread(_save);        \
+     } G_STMT_END
+ 
+-#define init_pygobject() G_STMT_START { \
+-    PyObject *gobject = PyImport_ImportModule("gobject"); \
+-    if (gobject != NULL) { \
+-        PyObject *mdict = PyModule_GetDict(gobject); \
+-        PyObject *cobject = PyDict_GetItemString(mdict, "_PyGObject_API"); \
+-        if (PyCObject_Check(cobject)) \
+-            _PyGObject_API = (struct _PyGObject_Functions *)PyCObject_AsVoidPtr(cobject); \
+-        else { \
+-            PyErr_SetString(PyExc_RuntimeError, \
+-                            "could not find _PyGObject_API object"); \
+-	    return; \
+-        } \
+-    } else { \
+-        PyErr_SetString(PyExc_ImportError, \
+-                        "could not import gobject"); \
+-        return; \
+-    } \
++
++/**
++ * pygobject_init:
++ * @req_major: minimum version major number, or -1
++ * @req_minor: minimum version minor number, or -1
++ * @req_micro: minimum version micro number, or -1
++ * 
++ * Imports and initializes the 'gobject' python module.  Can
++ * optionally check for a required minimum version if @req_major,
++ * @req_minor, and @req_micro are all different from -1.
++ * 
++ * Returns: a new reference to the gobject module on success, NULL in
++ * case of failure (and raises ImportError).
++ **/
++static inline PyObject *
++pygobject_init(int req_major, int req_minor, int req_micro)
++{
++    PyObject *gobject, *cobject;
++    
++    gobject = PyImport_ImportModule("gobject");
++    if (!gobject) {
++        if (PyErr_Occurred())
++        {
++            PyObject *type, *value, *traceback;
++            PyObject *py_orig_exc;
++            PyErr_Fetch(&type, &value, &traceback);
++            py_orig_exc = PyObject_Repr(value);
++            Py_XDECREF(type);
++            Py_XDECREF(value);
++            Py_XDECREF(traceback);
++            PyErr_Format(PyExc_ImportError,
++                         "could not import gobject (error was: %s)",
++                         PyString_AsString(py_orig_exc));
++            Py_DECREF(py_orig_exc);
++        } else {
++            PyErr_SetString(PyExc_ImportError,
++                            "could not import gobject (no error given)");
++        }
++        return NULL;
++    }
++
++    cobject = PyObject_GetAttrString(gobject, "_PyGObject_API");
++    if (cobject && PyCObject_Check(cobject))
++        _PyGObject_API = (struct _PyGObject_Functions *) PyCObject_AsVoidPtr(cobject);
++    else {
++        PyErr_SetString(PyExc_ImportError,
++                        "could not import gobject (could not find _PyGObject_API object)");
++        Py_DECREF(gobject);
++        return NULL;
++    }
++
++    if (req_major != -1)
++    {
++        int found_major, found_minor, found_micro;
++        PyObject *version;
++
++        version = PyObject_GetAttrString(gobject, "pygobject_version");
++        if (!version)
++            version = PyObject_GetAttrString(gobject, "pygtk_version");
++        if (!version) {
++            PyErr_SetString(PyExc_ImportError,
++                            "could not import gobject (version too old)");
++            Py_DECREF(gobject);
++            return NULL;
++        }
++        if (!PyArg_ParseTuple(version, "iii",
++                              &found_major, &found_minor, &found_micro)) {
++            PyErr_SetString(PyExc_ImportError,
++                            "could not import gobject (version has invalid format)");
++            Py_DECREF(version);
++            Py_DECREF(gobject);
++            return NULL;
++        }
++        Py_DECREF(version);
++        if (req_major != found_major ||
++            req_minor >  found_minor ||
++            (req_minor == found_minor && req_micro > found_micro)) {
++            PyErr_Format(PyExc_ImportError,
++                         "could not import gobject (version mismatch, %d.%d.%d is required, "
++                         "found %d.%d.%d)", req_major, req_minor, req_micro,
++                         found_major, found_minor, found_micro);
++            Py_DECREF(gobject);
++            return NULL;
++        }
++    }
++    return gobject;
++}
++
++/* deprecated macro, use pygobject_init() instead. */
++#define init_pygobject() G_STMT_START {         \
++    if (!pygobject_init(-1, -1, -1))            \
++        return;                                 \
+ } G_STMT_END
+ 
+-#define init_pygobject_check(req_major, req_minor, req_micro) G_STMT_START { \
+-    PyObject *gobject, *mdict, *version;                                     \
+-    int found_major, found_minor, found_micro;                               \
+-    init_pygobject();                                                        \
+-    gobject = PyImport_ImportModule("gobject");                              \
+-    mdict = PyModule_GetDict(gobject);                                       \
+-    version = PyDict_GetItemString(mdict, "pygobject_version");              \
+-    if (!version)                                                            \
+-        version = PyDict_GetItemString(mdict, "pygtk_version");              \
+-    if (!version) {                                                          \
+-        PyErr_SetString(PyExc_ImportError,                                   \
+-                         "PyGObject version too old");                       \
+-        return;                                                              \
+-    }                                                                        \
+-    if (!PyArg_ParseTuple(version, "iii",                                    \
+-                          &found_major, &found_minor, &found_micro))         \
+-        return;                                                              \
+-    if (req_major != found_major ||                                          \
+-        req_minor >  found_minor ||                                          \
+-        (req_minor == found_minor && req_micro > found_micro)) {	     \
+-        PyErr_Format(PyExc_ImportError,                                      \
+-                     "PyGObject version mismatch, %d.%d.%d is required, "    \
+-                     "found %d.%d.%d.", req_major, req_minor, req_micro,     \
+-                     found_major, found_minor, found_micro);                 \
+-        return;                                                              \
+-    }                                                                        \
++/* deprecated macro, use pygobject_init() instead. */
++#define init_pygobject_check(req_major, req_minor, req_micro) G_STMT_START {    \
++    if (!pygobject_init(req_major, req_minor, req_micro))                       \
++        return;                                                                 \
+ } G_STMT_END
+ 
++
+ #endif /* !_INSIDE_PYGOBJECT_ */
+ 
+ G_END_DECLS

Added: trunk/dports/python/py25-gtk/Portfile
===================================================================
--- trunk/dports/python/py25-gtk/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-gtk/Portfile	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,26 @@
+# $Id$
+
+PortSystem 1.0
+name               py25-gtk
+version			   2.10.4
+categories         python x11
+maintainers        nomaintainer at macports.org
+description        PyGTK is the Python binding to GTK+ 2.x
+long_description   \
+    PyGTK contains modules that allow you to use gtk in Python programs. \
+    At present, it is a fairly complete set of bindings.
+
+homepage        http://www.pygtk.org/
+master_sites    gnome:sources/pygtk/2.10/
+distname        pygtk-${version}
+use_bzip2       yes
+checksums       md5 89afe242275a3fce57b4ffb5fadc5888
+
+depends_lib     port:gtk2 port:libglade2 \
+                port:py25-cairo port:py25-gobject
+
+configure.env   PYTHON=python2.5
+
+platform darwin 7 {
+    configure.env   CFLAGS="-I${x11prefix}/include"
+}


Property changes on: trunk/dports/python/py25-gtk/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/python/py25-numeric/Portfile
===================================================================
--- trunk/dports/python/py25-numeric/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-numeric/Portfile	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,49 @@
+# $Id$
+
+PortSystem 1.0
+PortGroup python25 1.0
+
+name			py25-numeric
+version			24.2
+categories		python devel math
+maintainers		nomaintainer at macports.org
+platforms		darwin
+description		fast numerical array language for python
+long_description	Numerical Python adds a fast, compact, \
+				multidimensional array language facility to Python.
+
+homepage		http://www.pfdubois.com/numpy/
+master_sites	sourceforge:numpy freebsd sourceforge:numpy
+distname		Numeric-${version}
+checksums		md5 2ae672656e06716a149acb048cca3093
+
+platform macosx {
+	patch {
+		file copy -force ${filespath}/customize.py-macosx ${worksrcpath}/customize.py
+	}
+}
+
+platform puredarwin {
+	patch {
+		file copy -force ${filespath}/customize.py-puredarwin ${worksrcpath}/customize.py
+	}
+}
+
+test.run		yes
+test.env		PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
+test.cmd		${python.bin} Test/test.py
+test.target
+
+set doc			${destroot}${prefix}/share/doc/${name}
+post-destroot {
+	xinstall -d -m 755 ${doc}/dotblas ${doc}/MA ${doc}/RNG
+	xinstall -W ${worksrcpath} README changes.txt ${doc}
+	xinstall -m 644 ${worksrcpath}/Packages/dotblas/doc/README.html \
+		${doc}/dotblas
+	xinstall -m 644 -W ${worksrcpath}/Packages/MA Legal.htm changes.txt \
+		${doc}/MA
+	xinstall -m 644 ${worksrcpath}/Packages/RNG/Legal.htm ${doc}/RNG
+	file copy ${worksrcpath}/Demo ${doc}
+	file copy ${worksrcpath}/Packages/MA/Demo ${doc}/MA
+}
+


Property changes on: trunk/dports/python/py25-numeric/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/python/py25-numeric/files/customize.py-macosx
===================================================================
--- trunk/dports/python/py25-numeric/files/customize.py-macosx	                        (rev 0)
+++ trunk/dports/python/py25-numeric/files/customize.py-macosx	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,17 @@
+extra_compile_args = []
+extra_link_args = []
+include_dirs = []
+
+use_system_lapack = 1
+lapack_library_dirs = []
+lapack_libraries = []
+lapack_extra_link_args = ['-framework', 'vecLib']
+
+use_dotblas = 1
+use_system_blas = 1
+dotblas_include_dirs = []
+dotblas_cblas_header = '<vecLib/vBLAS.h>'
+dotblas_library_dirs = lapack_library_dirs
+dotblas_libraries = lapack_libraries
+dotblas_extra_link_args = ['-framework', 'vecLib']
+

Added: trunk/dports/python/py25-numeric/files/customize.py-puredarwin
===================================================================
--- trunk/dports/python/py25-numeric/files/customize.py-puredarwin	                        (rev 0)
+++ trunk/dports/python/py25-numeric/files/customize.py-puredarwin	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,17 @@
+extra_compile_args = []
+extra_link_args = []
+include_dirs = []
+
+use_system_lapack = 1
+lapack_library_dirs = []
+lapack_libraries = []
+lapack_extra_link_args = ['-framework', 'vecLib']
+
+use_dotblas = 0
+use_system_blas = 0
+dotblas_include_dirs = []
+dotblas_cblas_header = '<vecLib/vBLAS.h>'
+dotblas_library_dirs = lapack_library_dirs
+dotblas_libraries = lapack_libraries
+dotblas_extra_link_args = ['-framework', 'vecLib']
+

Added: trunk/dports/python/py25-orbit/Portfile
===================================================================
--- trunk/dports/python/py25-orbit/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-orbit/Portfile	2007-07-18 05:52:43 UTC (rev 27085)
@@ -0,0 +1,33 @@
+# $Id$
+
+PortSystem 1.0
+name				py25-orbit
+version		2.14.3
+categories			python gnome
+platforms			darwin
+maintainers			pguyot at kallisys.net
+description			Python binding for the ORBit2 CORBA ORB - Default branch.
+long_description	PyORBit is a Python binding for the ORBit2 CORBA ORB. It \
+					was developped to suit the needs of the bonobo bindings \
+					in GNOME-Python, but is usable for other purposes as well. \
+					It aims to follow the standard Python language mapping for \
+					CORBA. It can generate stubs at runtime from typelibs, IDL \
+					files, or by introspecting remote objects using ORBit2's \
+					IModule typelib capabilities.
+
+homepage			http://www.pygtk.org/
+master_sites		gnome:sources/pyorbit/2.14/
+use_bzip2			yes
+distname			pyorbit-${version}
+checksums			md5 3c4d42ae1a7303fd85071a842617043f
+
+depends_lib			port:python25 \
+					port:orbit2
+
+configure.env       PYTHON=python2.5
+
+build.args          PYTHON_LDFLAGS= PYTHON_LIBS=
+
+livecheck.check	md5
+livecheck.url	ftp://ftp.gnome.org/pub/GNOME/sources/pyorbit/
+livecheck.md5	c44aad7204b0cc64e524610a82b97340


Property changes on: trunk/dports/python/py25-orbit/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070717/36ff11c8/attachment.html


More information about the macports-changes mailing list