[51373] trunk/dports/python
jwa at macports.org
jwa at macports.org
Sat May 23 08:58:57 PDT 2009
Revision: 51373
http://trac.macports.org/changeset/51373
Author: jwa at macports.org
Date: 2009-05-23 08:58:57 -0700 (Sat, 23 May 2009)
Log Message:
-----------
Python bindings for Midgard2
Added Paths:
-----------
trunk/dports/python/py26-midgard2/
trunk/dports/python/py26-midgard2/Portfile
trunk/dports/python/py26-midgard2/files/
trunk/dports/python/py26-midgard2/files/setup.py.diff
Added: trunk/dports/python/py26-midgard2/Portfile
===================================================================
--- trunk/dports/python/py26-midgard2/Portfile (rev 0)
+++ trunk/dports/python/py26-midgard2/Portfile 2009-05-23 15:58:57 UTC (rev 51373)
@@ -0,0 +1,46 @@
+# -*- 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 47939 2009-03-10 18:14:30Z snc at macports.org $
+
+PortSystem 1.0
+PortGroup python26 1.0
+
+name py26-midgard2
+version 9.03.0
+categories-append www
+maintainers jwa
+description Python interface to the Midgard content repository
+long_description Python interface to the Midgard content repository
+
+homepage http://www.midgard-project.org/
+
+platforms darwin
+depends_lib port:midgard2-core
+
+master_sites http://www.midgard-project.org/midcom-serveattachmentguid-eb479be4349c11de8b49dbd1de0b93f793f7/
+distname python-midgard2-${version}
+#use_bzip2 yes
+
+checksums md5 9b9bf10778a325cd4156388bdb3f9f72 \
+ sha1 1e729e07d3c43324224c048122e81d658025ed42 \
+ rmd160 34882b46d75b83ce62607bbce18847293def0fd7
+
+patchfiles setup.py.diff
+use_configure no
+#build.env UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx/config:$env(PATH)"
+build.cmd ${prefix}/bin/python2.6 setup.py
+#build.target build
+
+#destroot.env UNICODE="1" WXPORT="mac" PATH="${python.prefix}/lib/wx/config:$env(PATH)"
+destroot.cmd ${build.cmd}
+destroot.destdir --prefix=${prefix} --root=${destroot}
+
+#post-destroot {
+# xinstall -d -m 755 ${destroot}${prefix}/share/doc/
+# file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
+# file copy ${worksrcpath}/samples \
+# ${destroot}${prefix}/share/doc/${name}/examples
+#}
+
+livecheck.check regex
+livecheck.url ${homepage}
+livecheck.regex (9\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+)
Added: trunk/dports/python/py26-midgard2/files/setup.py.diff
===================================================================
--- trunk/dports/python/py26-midgard2/files/setup.py.diff (rev 0)
+++ trunk/dports/python/py26-midgard2/files/setup.py.diff 2009-05-23 15:58:57 UTC (rev 51373)
@@ -0,0 +1,124 @@
+--- setup.py 2009-05-16 17:56:46.000000000 +0300
++++ setup.py 2009-05-16 18:01:54.000000000 +0300
+@@ -0,0 +1,121 @@
++#!/usr/bin/env python
++#ident "@(#) $Id: setup.py,v 1.28 2006/06/07 17:21:28 jwa Exp $"
++# vi:set sw=4 ts=8 showmode ai:
++#-----------------------------------------------------------------------+
++# Name: setup.py |
++# |
++# Synopsis: python setup.py build # Build the module. |
++# python setup.py install # Install the module. |
++# |
++# See http://www.python.org/sigs/distutils-sig/doc/ for |
++# more information on using distutils to install Python |
++# programs and modules. |
++# |
++# Description: Setup script (using the distutils framework) for |
++# Midgard2. |
++#=======================================================================|
++# Copyright 2009 by Jyrki Wahlstedt. |
++#
++# This program is free software; you can redistribute it and/or modify it
++# under the terms of the GNU Lesser General Public License as published
++# by the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++#=======================================================================|
++# People who have worked on this code. |
++# |
++# Ini Name |
++# --- ----------------------------------------------------------------- |
++# jwa Jyrki Wahlstedt <jwa at wahlstedt.fi> |
++#=======================================================================|
++# Revision History: |
++# |
++# Date Ini Description |
++# --------- --- ------------------------------------------------------ |
++# 2009-05-15 jwa Initial version created by Jyrki Wahlstedt. |
++#-----------------------------------------------------------------------+
++import os, os.path, sys
++
++from distutils.core import setup
++from distutils.extension import Extension
++
++__version__ = "9.03.0"
++
++# Define the runtime library path for this module. It starts out as None.
++
++def main():
++ # Default settings, may be overriden for specific platforms
++ pymidgard_rt_dirs = None
++ optional_libs = []
++ modname = "python-midgard2"
++
++ sources = ["midgardmodule.c", "py_midgard_object_attachment.c",
++ "py_midgard_blob.c", "py_midgard_object_class.c",
++ "py_midgard_collector.c", "py_midgard_object_parameter.c",
++ "py_midgard_config.c", "py_midgard_query_builder.c",
++ "py_midgard_connection.c", "py_midgard_reflection_property.c",
++ "py_midgard_dbobject.c", "py_midgard_replicator.c",
++ "py_midgard_dbus.c", "py_midgard_user.c",
++ "py_midgard_object.c"]
++
++ define_macros = [('MGD_HAVE_DBUS', None)]
++ include_dirs = os.popen("pkg-config --cflags-only-I midgard-2.0 | sed 's;-I;;g'").read().strip().split()
++ include_dirs.append("/opt/local/include/pygtk-2.0/")
++# include_dirs = [os.popen("pkg-config --cflags-only-I midgard-2.0").read().strip().split(), "/opt/local/include/pygtk-2.0/", "/opt/local/include/midgard-2.0/", "/opt/local/include/glib-2.0/", "/opt/local/lib/glib-2.0/include/", "/opt/local/include"]
++ library_dirs = [os.popen("pkg-config --libs midgard-2.0").read().strip()]
++
++ if sys.platform == "darwin": # Mac OS X
++ optional_libs += ["ssl", "crypto"]
++# elif sys.platform == "win32":
++# libraries[0] = libraries[0] + "/ms"
++# optional_libs = ["libpq", "wsock32", "advapi32"]
++# modname="pyPgSQL.libpq.libpq"
++
++ # patch distutils if it can't cope with the "classifiers" keyword
++ if sys.version < '2.2.3':
++ from distutils.dist import DistributionMetadata
++ DistributionMetadata.classifiers = None
++ DistributionMetadata.download_url = None
++
++ classifiers = [
++ "Development Status :: 5 - Production/Stable",
++ "Environment :: Other Environment",
++ "Intended Audience :: Developers",
++ "License :: OSI Approved :: LGPL",
++ "Natural Language :: English",
++ "Operating System :: POSIX",
++ "Programming Language :: C",
++ "Programming Language :: Python",
++ "Topic :: Content :: Front-Ends"]
++
++ setup (
++ name = "python-midgard2",
++ version = __version__,
++ description = \
++ "python-midgard2 - Python bindings to Midgard2.",
++ maintainer = "Midgard developers",
++ maintainer_email = "jwa at macports.org",
++ url = "http://www.midgard-project.org/",
++ license = "Python",
++# packages = ["python-midgard2"],
++ ext_modules = [Extension(
++ name = modname,
++ sources = sources,
++ define_macros = define_macros,
++ include_dirs = include_dirs,
++ library_dirs = library_dirs,
++ runtime_library_dirs = pymidgard_rt_dirs,
++ )],
++ classifiers = classifiers
++ )
++
++if __name__ == "__main__":
++ main()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090523/70b0ea90/attachment-0001.html>
More information about the macports-changes
mailing list