WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Move ptsname module under tools/python.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Move ptsname module under tools/python.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Mar 2007 11:31:00 -0800
Delivery-date: Wed, 07 Mar 2007 12:59:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173120866 0
# Node ID 7f0d8e3c538e47f94be4f13fe24b5ad29cf437c3
# Parent  53589c343d46c8e4ccdfae468eb041feea502913
Move ptsname module under tools/python.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/ptsname/Makefile         |   22 --------------------
 tools/ptsname/ptsname.c        |   44 -----------------------------------------
 tools/ptsname/setup.py         |   11 ----------
 tools/Makefile                 |    1 
 tools/python/ptsname/ptsname.c |   44 +++++++++++++++++++++++++++++++++++++++++
 tools/python/setup.py          |    9 +++++++-
 6 files changed, 52 insertions(+), 79 deletions(-)

diff -r 53589c343d46 -r 7f0d8e3c538e tools/Makefile
--- a/tools/Makefile    Mon Mar 05 18:10:41 2007 +0000
+++ b/tools/Makefile    Mon Mar 05 18:54:26 2007 +0000
@@ -26,7 +26,6 @@ ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_A
 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 SUBDIRS-y += python
 SUBDIRS-y += pygrub
-SUBDIRS-y += ptsname
 endif
 
 .PHONY: all
diff -r 53589c343d46 -r 7f0d8e3c538e tools/ptsname/Makefile
--- a/tools/ptsname/Makefile    Mon Mar 05 18:10:41 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-
-XEN_ROOT = ../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-.PHONY: all
-all: build
-.PHONY: build
-build:
-       CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
-
-.PHONY: install
-ifndef XEN_PYTHON_NATIVE_INSTALL
-install: all
-       CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install 
--home="$(DESTDIR)/usr" --prefix=""
-else
-install: all
-       CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install 
--root="$(DESTDIR)"
-endif
-
-.PHONY: clean
-clean:
-       rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out
diff -r 53589c343d46 -r 7f0d8e3c538e tools/ptsname/ptsname.c
--- a/tools/ptsname/ptsname.c   Mon Mar 05 18:10:41 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/******************************************************************************
- * ptsname.c
- * 
- * A python extension to expose the POSIX ptsname() function.
- * 
- * Copyright (C) 2007 XenSource Ltd
- */
-
-#include <Python.h>
-#include <stdlib.h>
-
-/* Needed for Python versions earlier than 2.3. */
-#ifndef PyMODINIT_FUNC
-#define PyMODINIT_FUNC DL_EXPORT(void)
-#endif
-
-static PyObject *do_ptsname(PyObject *self, PyObject *args)
-{
-    int fd;
-    char *path;
-
-    if (!PyArg_ParseTuple(args, "i", &fd))
-        return NULL;
-
-    path = ptsname(fd);
-
-    if (!path)
-    {
-        PyErr_SetFromErrno(PyExc_IOError);
-        return NULL;
-    } 
-
-    return PyString_FromString(path);
-}
-
-static PyMethodDef ptsname_methods[] = { 
-    { "ptsname", do_ptsname, METH_VARARGS }, 
-    { NULL }
-};
-
-PyMODINIT_FUNC initptsname(void)
-{
-    Py_InitModule("ptsname", ptsname_methods);
-}
diff -r 53589c343d46 -r 7f0d8e3c538e tools/ptsname/setup.py
--- a/tools/ptsname/setup.py    Mon Mar 05 18:10:41 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-from distutils.core import setup, Extension
-
-extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
-
-setup(name         = 'ptsname',
-      version      = '1.0',
-      description  = 'POSIX ptsname() function',
-      author       = 'Tim Deegan',
-      author_email = 'Tim.Deegan@xxxxxxxxxxxxx',
-      license      = 'GPL',
-      ext_modules  = [ Extension("ptsname", [ "ptsname.c" ]) ])
diff -r 53589c343d46 -r 7f0d8e3c538e tools/python/ptsname/ptsname.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/python/ptsname/ptsname.c    Mon Mar 05 18:54:26 2007 +0000
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * ptsname.c
+ * 
+ * A python extension to expose the POSIX ptsname() function.
+ * 
+ * Copyright (C) 2007 XenSource Ltd
+ */
+
+#include <Python.h>
+#include <stdlib.h>
+
+/* Needed for Python versions earlier than 2.3. */
+#ifndef PyMODINIT_FUNC
+#define PyMODINIT_FUNC DL_EXPORT(void)
+#endif
+
+static PyObject *do_ptsname(PyObject *self, PyObject *args)
+{
+    int fd;
+    char *path;
+
+    if (!PyArg_ParseTuple(args, "i", &fd))
+        return NULL;
+
+    path = ptsname(fd);
+
+    if (!path)
+    {
+        PyErr_SetFromErrno(PyExc_IOError);
+        return NULL;
+    } 
+
+    return PyString_FromString(path);
+}
+
+static PyMethodDef ptsname_methods[] = { 
+    { "ptsname", do_ptsname, METH_VARARGS }, 
+    { NULL }
+};
+
+PyMODINIT_FUNC initptsname(void)
+{
+    Py_InitModule("ptsname", ptsname_methods);
+}
diff -r 53589c343d46 -r 7f0d8e3c538e tools/python/setup.py
--- a/tools/python/setup.py     Mon Mar 05 18:10:41 2007 +0000
+++ b/tools/python/setup.py     Mon Mar 05 18:54:26 2007 +0000
@@ -44,7 +44,14 @@ acm = Extension("acm",
                libraries          = libraries,
                sources            = [ "xen/lowlevel/acm/acm.c" ])
 
-modules = [ xc, xs, acm ]
+ptsname = Extension("ptsname",
+               extra_compile_args = extra_compile_args,
+               include_dirs       = include_dirs + [ "ptsname" ],
+               library_dirs       = library_dirs,
+               libraries          = libraries,
+               sources            = [ "ptsname/ptsname.c" ])
+
+modules = [ xc, xs, acm, ptsname ]
 if os.uname()[0] == 'SunOS':
     modules.append(scf)
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Move ptsname module under tools/python., Xen patchbot-unstable <=