summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/python-missingos/ChangeLog15
-rw-r--r--src/python-missingos/PKG-INFO10
-rw-r--r--src/python-missingos/README14
-rw-r--r--src/python-missingos/missingos.c119
-rw-r--r--src/python-missingos/setup.cfg7
-rwxr-xr-xsrc/python-missingos/setup.py23
6 files changed, 0 insertions, 188 deletions
diff --git a/src/python-missingos/ChangeLog b/src/python-missingos/ChangeLog
deleted file mode 100644
index 69c486c5e..000000000
--- a/src/python-missingos/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-
-python-missingos ChangeLog
-Jonathon D Nelson <jnelson@gentoo.org>
-2 April 2002
-
- 2 April 2002 14:15 jnelson
- * Add optional 'mode' parameter to mknod
- * Change from missingosmodule to missingos.
- * Add some __doc__ entries
- * Remove stupid hack for Python 1.5.2 support,
- 1.5.2 doesn't have Py_FileSystemDefaultEncoding anyway.
- * Return description of error when mode not p,b,c,u in mknod
-
- 2 April 2002 12:10 jnelson
- * Populate files
diff --git a/src/python-missingos/PKG-INFO b/src/python-missingos/PKG-INFO
deleted file mode 100644
index cb8087f4c..000000000
--- a/src/python-missingos/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: python-missingos
-Version: 0.2
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: Jonathon D Nelson
-Author-email: jnelson@gentoo.org
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/src/python-missingos/README b/src/python-missingos/README
deleted file mode 100644
index a1c0373f6..000000000
--- a/src/python-missingos/README
+++ /dev/null
@@ -1,14 +0,0 @@
-
-python-missingos
-Jonathon D Nelson <jnelson@gentoo.org>
-2 April 2002
-
-INTRO
-=====
-This module provides some missing file operations that don't
-seem to be provided by the standard os and posix modules.
-This list currently includes lchown and mknod.
-
-COPYRIGHT
-=========
-GPL
diff --git a/src/python-missingos/missingos.c b/src/python-missingos/missingos.c
deleted file mode 100644
index bd852a381..000000000
--- a/src/python-missingos/missingos.c
+++ /dev/null
@@ -1,119 +0,0 @@
-
-#include "Python.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-static char missingos_lchown__doc__[];
-static PyObject * missingos_lchown(PyObject *self, PyObject *args);
-static char missingos_mknod__doc__[];
-static PyObject * missingos_mknod(PyObject *self, PyObject *args);
-
-static char missingos__doc__[] = "Provide some operations that\
- are missing from the standard os / posix modules.";
-
-static PyMethodDef missingos_methods[] = {
- {"lchown", missingos_lchown, METH_VARARGS, missingos_lchown__doc__},
- {"mknod", missingos_mknod, METH_VARARGS, missingos_mknod__doc__},
- {NULL, NULL} /* sentinel */
-};
-
-static PyObject *
-posix_error_with_allocated_filename(char* name)
-{
- PyObject *rc = PyErr_SetFromErrnoWithFilename(PyExc_OSError, name);
- PyMem_Free(name);
- return rc;
-}
-
-static char missingos_lchown__doc__[] =
-"lchown(path, uid, gid) -> None\n\
-Change the owner and group id of path to the numeric uid and gid.";
-
-static PyObject *
-missingos_lchown(PyObject *self, PyObject *args) {
- char *path = NULL;
- int uid, gid;
- int res;
- if (!PyArg_ParseTuple(args, "etii:lchown",
- Py_FileSystemDefaultEncoding, &path,
- &uid, &gid))
- return NULL;
- res = lchown(path, (uid_t) uid, (gid_t) gid);
- if (res < 0)
- return posix_error_with_allocated_filename(path);
- PyMem_Free(path);
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-static char missingos_mknod__doc__[] =
-"mknod(path, type, major, minor [, mode=0600 ]) -> None\n\
-Create a special file. Mode fixed at 0600.\
-Note that for type 'p' major and minor are ignored.\
-";
-
-static PyObject *
-missingos_mknod(PyObject *self, PyObject *args) {
- char *path = NULL;
- char *type = NULL;
- int major = 0;
- int minor = 0;
- mode_t real_mode;
- dev_t real_dev;
- int mode = 0600;
-
- int res;
- if (!PyArg_ParseTuple(args, "etsii|i:mknod",
- Py_FileSystemDefaultEncoding, &path,
- &type, &major, &minor, &mode))
- return NULL;
- /* type can be *one* of b, c, u, p */
- /* major/minor are forbidden for p, reqd otherwise */
- if (!strcmp(type, "p")) {
- /* pipe */
- if (major != 0 || minor != 0) {
- return NULL;
- }
- real_mode = S_IFIFO;
- major = 0;
- minor = 0;
- } else if (!strcmp(type, "b")) {
- /* block */
- real_mode = S_IFBLK;
- } else if (!strcmp(type, "c")) {
- real_mode = S_IFCHR;
- /* char */
- } else if (!strcmp(type, "u")) {
- real_mode = S_IFCHR;
- /* unbuffered char */
- } else {
- /* error */
- PyErr_SetString(PyExc_ValueError, "type must be one of p,b,c,u");
- return NULL;
- }
-
- real_mode |= mode;
- real_dev = (major << 8) | minor;
-
- /* use mode to modify real_mode */
-
- res = mknod(path, real_mode, real_dev);
- if (res < 0)
- return posix_error_with_allocated_filename(path);
- PyMem_Free(path);
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-
-DL_EXPORT(void)
-initmissingos(void) {
- PyObject *m;
-
- m = Py_InitModule4("missingos", missingos_methods,
- missingos__doc__, (PyObject *)NULL,
- PYTHON_API_VERSION);
-}
diff --git a/src/python-missingos/setup.cfg b/src/python-missingos/setup.cfg
deleted file mode 100644
index 0867cf43c..000000000
--- a/src/python-missingos/setup.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-# python-missingos
-
-[bdist_rpm]
-release = 1
-doc_files = ChangeLog
- README
-python=python2
diff --git a/src/python-missingos/setup.py b/src/python-missingos/setup.py
deleted file mode 100755
index 3cc134583..000000000
--- a/src/python-missingos/setup.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-from os import chdir, stat
-from distutils.core import setup, Extension
-
-setup (# Distribution meta-data
- name = "python-missingos",
- version = "0.2",
- description = "",
- author = "Jonathon D Nelson",
- author_email = "jnelson@gentoo.org",
- license = "",
- long_description = \
- '''''',
- ext_modules = [ Extension(
- "missingos",
- ["missingos.c"],
- libraries=[],
- )
- ],
- url = "",
- )
-