Hello community,

here is the log from the commit of package python-cups for openSUSE:Factory
checked in at Mon Aug 1 10:17:20 CEST 2011.



--------
--- python-cups/python-cups.changes     2011-06-09 16:39:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/python-cups/python-cups.changes        
2011-07-30 09:57:55.000000000 +0200
@@ -1,0 +2,7 @@
+Sat Jul 30 09:57:14 CEST 2011 - vu...@opensuse.org
+
+- Update to version 1.9.58:
+  + Add cups.Connection.adminExportSamba.
+  + Build fixes.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  pycups-1.9.57.tar.bz2

New:
----
  pycups-1.9.58.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cups.spec ++++++
--- /var/tmp/diff_new_pack.zxEGwR/_old  2011-08-01 10:16:09.000000000 +0200
+++ /var/tmp/diff_new_pack.zxEGwR/_new  2011-08-01 10:16:09.000000000 +0200
@@ -21,13 +21,13 @@
 Name:           python-cups
 %define _name   pycups
 BuildRequires:  cups-devel python-devel
-Version:        1.9.57
+Version:        1.9.58
 Release:        1
 Group:          Development/Libraries/Python
 License:        GPLv2+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Url:            http://cyberelk.net/tim/software/pycups/
-Source:         %{_name}-%{version}.tar.bz2
+Source:         http://cyberelk.net/tim/data/pycups/%{_name}-%{version}.tar.bz2
 Summary:        Python Bindings for CUPS
 %py_requires
 

++++++ pycups-1.9.57.tar.bz2 -> pycups-1.9.58.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/ChangeLog new/pycups-1.9.58/ChangeLog
--- old/pycups-1.9.57/ChangeLog 2011-06-09 14:25:49.000000000 +0200
+++ new/pycups-1.9.58/ChangeLog 2011-07-26 13:20:12.000000000 +0200
@@ -1,3 +1,30 @@
+2011-07-26  Tim Waugh  <twa...@redhat.com>
+
+       * setup.py: Version 1.9.58.
+
+2011-07-25  Tim Waugh  <twa...@redhat.com>
+
+       * MANIFEST.in: New file.
+       * Makefile: Use sdist for creating tarballs.
+
+       * setup.py: Added more information ready for PyPI.
+
+2011-07-18  Tim Waugh  <twa...@redhat.com>
+
+       * cupsconnection.c: Applied patch from Gowtham Narisipalli to
+       add adminExportSamba method.
+
+2011-06-27  Tim Waugh  <twa...@redhat.com>
+
+       * setup.py: Link against libiconv on darwin (trac #15).
+
+       * cupsppd.c: Fixed feature test for getline() (trac #15).
+
+2011-06-16  Tim Waugh  <twa...@redhat.com>
+
+       * postscriptdriver.prov: Increase timeout for dynamic driver
+       listing.
+
 2011-06-09  Tim Waugh  <twa...@redhat.com>
 
        * setup.py: Version 1.9.57.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/Makefile new/pycups-1.9.58/Makefile
--- old/pycups-1.9.57/Makefile  2011-02-23 12:18:53.000000000 +0100
+++ new/pycups-1.9.58/Makefile  2011-07-26 13:28:36.000000000 +0200
@@ -1,5 +1,6 @@
 NAME=pycups
 VERSION:=$(shell python setup.py --version)
+SDIST_ARGS=--formats=bztar -d.
 RPMCONFIGDIR:=$(shell rpm -E "%{_rpmconfigdir}" 2>/dev/null || :)
 
 SOURCES=cupsmodule.c cupsconnection.c cupsppd.c cupsipp.c setup.py \
@@ -10,23 +11,25 @@
        examples \
        COPYING NEWS README TODO ChangeLog
 
-cups.so: $(SOURCES)
+cups.so: force
        python setup.py build
-       ln -sf build/lib*/$@ .
+       mv build/lib*/$@ .
 
 doc:   cups.so
        rm -rf html
        epydoc -o html --html $<
 
+doczip:        doc
+       cd html && zip ../cups-html.zip *
+
 clean:
        -rm -rf build cups.so *.pyc *~
 
 dist:
-       rm -rf $(NAME)-$(VERSION)
-       mkdir $(NAME)-$(VERSION)
-       cp -a $(SOURCES) $(DIST) $(NAME)-$(VERSION)
-       tar jcf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
-       rm -rf $(NAME)-$(VERSION)
+       python setup.py sdist $(SDIST_ARGS)
+
+upload:
+       python setup.py sdist $(SDIST_ARGS) upload -s
 
 install:       install-rpmhook
        ROOT= ; \
@@ -41,5 +44,4 @@
                install -m0755 postscriptdriver.prov "$$RPMCONFIG"/ ; \
        fi
 
-.PHONY: doc clean dist install install-rpmhook
-
+.PHONY: doc doczip clean dist install install-rpmhook force
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/NEWS new/pycups-1.9.58/NEWS
--- old/pycups-1.9.57/NEWS      2011-06-09 14:26:38.000000000 +0200
+++ new/pycups-1.9.58/NEWS      2011-07-19 10:42:45.000000000 +0200
@@ -1,6 +1,10 @@
 NEWS
 ----
 
+New in 1.9.58:
+
+* cups.Connection.adminExportSamba
+
 New in 1.9.57:
 
 * Fixed rpm provides script for newer versions of rpm.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/PKG-INFO new/pycups-1.9.58/PKG-INFO
--- old/pycups-1.9.57/PKG-INFO  1970-01-01 01:00:00.000000000 +0100
+++ new/pycups-1.9.58/PKG-INFO  2011-07-26 13:29:19.000000000 +0200
@@ -0,0 +1,31 @@
+Metadata-Version: 1.0
+Name: pycups
+Version: 1.9.58
+Summary: Python bindings for libcups
+Home-page: http://cyberelk.net/tim/software/pycups/
+Author: Tim Waugh
+Author-email: twa...@redhat.com
+License: GPLv2+
+Download-URL: http://cyberelk.net/tim/data/pycups/
+Description: This is a set of Python bindings for the libcups library from the
+        CUPS project.
+        
+        >>> # Example of getting a list of printers
+        >>> import cups
+        >>> conn = cups.Connection ()
+        >>> printers = conn.getPrinters ()
+        >>> for printer in printers:
+        ...     print printer, printers[printer]["device-uri"]
+        ...
+        HP ipp://192.168.1.1:631/printers/HP
+        duplex ipp://192.168.1.1:631/printers/duplex
+        HP-LaserJet-6MP ipp://192.168.1.1:631/printers/HP-LaserJet-6MP
+        EPSON-Stylus-D78 usb://EPSON/Stylus%20D78
+        
+Platform: UNKNOWN
+Classifier: Intended Audience :: Developers
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Operating System :: Unix
+Classifier: Programming Language :: C
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/cupsconnection.c 
new/pycups-1.9.58/cupsconnection.c
--- old/pycups-1.9.57/cupsconnection.c  2011-05-24 12:22:04.000000000 +0200
+++ new/pycups-1.9.58/cupsconnection.c  2011-07-19 10:42:10.000000000 +0200
@@ -3749,6 +3749,77 @@
 }
 
 static PyObject *
+Connection_adminExportSamba (Connection *self, PyObject *args)
+{
+  int ret;
+  PyObject *nameobj;
+  char *name;
+  PyObject *serverobj;
+  char *server;
+  PyObject *userobj;
+  char  *user;
+  PyObject *passwordobj;
+  char *password;
+  char ppdfile[1024];
+  FILE *tmpfile(void);
+  FILE *tf;
+  char str[80];
+
+  if (!PyArg_ParseTuple (args, "OOOO", &nameobj, &serverobj, &userobj,
+                         &passwordobj))
+    return NULL;
+
+  if (UTF8_from_PyObj (&name, nameobj) == NULL ||
+      UTF8_from_PyObj (&server, serverobj) == NULL ||
+      UTF8_from_PyObj (&user, userobj) == NULL ||
+      UTF8_from_PyObj (&password, passwordobj) == NULL) {
+    free (name);
+    free (server);
+    free (user);
+    free (password);
+    PyErr_SetString(PyExc_RuntimeError,
+                    "name, samba_server, samba_username, samba_password "
+                    "must be specified");
+    return NULL;
+  }
+
+  if (!cupsAdminCreateWindowsPPD(self->http, name, ppdfile, sizeof(ppdfile))) {
+    PyErr_SetString(PyExc_RuntimeError,
+                    "No PPD file found for the printer");
+    return NULL;
+  }
+
+  debugprintf ("-> Connection_adminExportSamba()\n");
+  tf = tmpfile();
+  Connection_begin_allow_threads (self);
+  ret = cupsAdminExportSamba(name, ppdfile, server, user, password, tf);
+  Connection_end_allow_threads (self);
+
+  free (name);
+  free (server);
+  free (user);
+  free (password);
+  unlink (ppdfile);
+
+  if (!ret) {
+    rewind(tf);
+    // Read logfile line by line to get Exit status message on the last line.
+    while (fgets (str, sizeof(str), tf) != NULL) { }
+    fclose (tf);
+    if (str[strlen(str) -1] == '\n') {
+      str[strlen(str) -1] = '\0';
+    }
+    PyErr_SetString (PyExc_RuntimeError, str);
+    debugprintf ("<- Connection_adminExportSamba() EXCEPTION\n");
+    return NULL;
+  }
+  fclose (tf);
+  Py_INCREF (Py_None);
+  debugprintf ("<- Connection_adminExportSamba()\n");
+  return Py_None;
+}
+
+static PyObject *
 Connection_adminGetServerSettings (Connection *self)
 {
   PyObject *ret = PyDict_New ();
@@ -5032,6 +5103,21 @@
       "@keyword user: user to submit the job as\n"
       "@raise IPPError: IPP problem" },
 
+    { "adminExportSamba",
+      (PyCFunction) Connection_adminExportSamba, METH_VARARGS,
+      "adminExportSamba(name, samba_server, samba_username,\n"
+      "                 samba_password) -> None\n\n"
+      "Export a printer to Samba.\n\n"
+      "@type name: string\n"
+      "@param name: queue name\n"
+      "@type samba_server: string\n"
+      "@param samba_server: samba server\n"
+      "@type samba_username: string\n"
+      "@param samba_username: samba username\n"
+      "@type samba_password: string\n"
+      "@param samba_password: samba password\n"
+      "@raise IPPError: IPP problem" },
+
     { "adminGetServerSettings",
       (PyCFunction) Connection_adminGetServerSettings, METH_NOARGS,
       "adminGetServerSettings() -> dict\n\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/cupsppd.c new/pycups-1.9.58/cupsppd.c
--- old/pycups-1.9.57/cupsppd.c 2011-05-23 12:25:31.000000000 +0200
+++ new/pycups-1.9.58/cupsppd.c 2011-06-27 11:16:20.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * cups - Python bindings for CUPS
- * Copyright (C) 2002, 2005, 2006, 2007, 2008  Tim Waugh <twa...@redhat.com>
+ * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2011  Tim Waugh 
<twa...@redhat.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -507,7 +507,7 @@
   return PyBool_FromLong (nondefaults_marked);
 }
 
-#ifdef __SVR4
+#if !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
 /*
  * A rudimentary emulation of getline() for systems that dont support it
  * natively.  Since this is used for PPD file reading, it assumes (possibly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/postscriptdriver.prov 
new/pycups-1.9.58/postscriptdriver.prov
--- old/pycups-1.9.57/postscriptdriver.prov     2011-06-09 14:03:11.000000000 
+0200
+++ new/pycups-1.9.58/postscriptdriver.prov     2011-06-16 16:24:01.000000000 
+0200
@@ -142,7 +142,7 @@
         raise TimedOut
 
     def list (self):
-        signal.alarm (60)
+        signal.alarm (180)
         env = os.environ.copy ()
         if RPM_BUILD_ROOT:
             buildroot = RPM_BUILD_ROOT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycups-1.9.57/setup.py new/pycups-1.9.58/setup.py
--- old/pycups-1.9.57/setup.py  2011-06-09 14:25:25.000000000 +0200
+++ new/pycups-1.9.58/setup.py  2011-07-26 13:23:35.000000000 +0200
@@ -1,9 +1,65 @@
+#!/usr/bin/python
+
+## Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011  Red Hat, Inc
+##  Author: Tim Waugh <twa...@redhat.com>
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+"""This is a set of Python bindings for the libcups library from the
+CUPS project.
+
+>>> # Example of getting a list of printers
+>>> import cups
+>>> conn = cups.Connection ()
+>>> printers = conn.getPrinters ()
+>>> for printer in printers:
+...     print printer, printers[printer]["device-uri"]
+...
+HP ipp://192.168.1.1:631/printers/HP
+duplex ipp://192.168.1.1:631/printers/duplex
+HP-LaserJet-6MP ipp://192.168.1.1:631/printers/HP-LaserJet-6MP
+EPSON-Stylus-D78 usb://EPSON/Stylus%20D78
+"""
+
 from distutils.core import setup, Extension
-VERSION="1.9.57"
+import sys
+VERSION="1.9.58"
+libraries=["cups"]
+
+if sys.platform == "darwin":
+       libraries.append ("iconv")
+
 setup (name="pycups",
        version=VERSION,
+       description="Python bindings for libcups",
+       long_description=__doc__,
+       maintainer="Tim Waugh",
+       maintainer_email="twa...@redhat.com",
+       url="http://cyberelk.net/tim/software/pycups/";,
+       download_url="http://cyberelk.net/tim/data/pycups/";,
+       classifiers=[
+               "Intended Audience :: Developers",
+               "Topic :: Software Development :: Libraries :: Python Modules",
+               "License :: OSI Approved :: GNU General Public License (GPL)",
+               "Development Status :: 5 - Production/Stable",
+               "Operating System :: Unix",
+               "Programming Language :: C",
+               ],
+       license="GPLv2+",
        ext_modules=[Extension("cups",
                               ["cupsmodule.c", "cupsconnection.c",
                                "cupsppd.c", "cupsipp.c"],
-                              libraries=["cups"],
+                              libraries=libraries,
                               define_macros=[("VERSION", '"%s"' % VERSION)])])


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to