Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-sane for openSUSE:Factory checked in at 2021-05-10 15:39:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sane (Old) and /work/SRC/openSUSE:Factory/.python-sane.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sane" Mon May 10 15:39:10 2021 rev:3 rq:891897 version:2.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sane/python-sane.changes 2018-05-11 09:18:51.457248950 +0200 +++ /work/SRC/openSUSE:Factory/.python-sane.new.2988/python-sane.changes 2021-05-10 15:41:55.416958695 +0200 @@ -1,0 +2,10 @@ +Sun May 9 17:14:26 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 2.9.1: + - Fix compatibility with python3.6+ + - Removed support for Python 2 + - Add a progress parameter for the snap, arr_snap, scan and arr_scan methods. + - Catch exceptions returned by self.device.snap + - Add __next__ to _SaneIterator for Python 3 + +------------------------------------------------------------------- Old: ---- v2.8.3.tar.gz New: ---- v2.9.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sane.spec ++++++ --- /var/tmp/diff_new_pack.ktSWQP/_old 2021-05-10 15:41:55.864956943 +0200 +++ /var/tmp/diff_new_pack.ktSWQP/_new 2021-05-10 15:41:55.864956943 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-sane # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,13 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global skip_python2 1 Name: python-sane -Version: 2.8.3 +Version: 2.9.1 Release: 0 Summary: A Python interface to the SANE scanner and frame grabber interface License: NTP ++++++ v2.8.3.tar.gz -> v2.9.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/.github/workflows/test.yml new/Sane-2.9.1/.github/workflows/test.yml --- old/Sane-2.8.3/.github/workflows/test.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/Sane-2.9.1/.github/workflows/test.yml 2021-01-05 13:44:54.000000000 +0100 @@ -0,0 +1,41 @@ +name: Test + +on: [push, pull_request] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + sudo apt-get install libsane-dev + + # No tests: just check it can build and install + - name: Test build and install + shell: bash + run: | + python setup.py build + python setup.py install + + - name: Lint + shell: bash + run: | + pip install pycodestyle pyflakes + pycodestyle --statistics --count . || true + pyflakes . | tee >(wc -l) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/.gitignore new/Sane-2.9.1/.gitignore --- old/Sane-2.8.3/.gitignore 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/.gitignore 2021-01-05 13:44:54.000000000 +0100 @@ -42,7 +42,7 @@ .cache nosetests.xml coverage.xml -*,cover +*.cover # Translations *.mo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/.travis.yml new/Sane-2.9.1/.travis.yml --- old/Sane-2.8.3/.travis.yml 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -language: python - -python: - - pypy - - pypy3 - - 2.6 - - 2.7 - - 3.2 - - 3.3 - - 3.4 - - 3.5 - -# Use container-based infrastructure -sudo: false - -addons: - apt: - packages: - - libsane-dev - -# No tests: just check it can build and install -script: - - python setup.py build - - python setup.py install - -after_script: - - pip install pep8 pyflakes - - pep8 --statistics --count . - - pyflakes . | tee >(wc -l) - -matrix: - fast_finish: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/CHANGES.rst new/Sane-2.9.1/CHANGES.rst --- old/Sane-2.8.3/CHANGES.rst 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/CHANGES.rst 2021-01-05 13:44:54.000000000 +0100 @@ -1,3 +1,23 @@ +Version 2.9.1 + +- _sane.c: + + - Fix compatibility with python3.6+ + +Version 2.9.0 +------------- + +- Removed support for Python 2 + +- _sane.c, sane.py: + + - Add a progress parameter for the snap, arr_snap, scan and arr_scan methods. + +- sane.py: + + - Catch exceptions returned by self.device.snap + - Add __next__ to _SaneIterator for Python 3 + Version 2.8.3 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/COPYING new/Sane-2.9.1/COPYING --- old/Sane-2.8.3/COPYING 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/COPYING 2021-01-05 13:44:54.000000000 +0100 @@ -1,6 +1,6 @@ (C) Copyright 2003 A.M. Kuchling. All Rights Reserved (C) Copyright 2004 A.M. Kuchling, Ralph Heinkel All Rights Reserved -(C) Copyright 2013-2017 Sandro Mani All Rights Reserved +(C) Copyright 2013-2021 Sandro Mani All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/README.rst new/Sane-2.9.1/README.rst --- old/Sane-2.8.3/README.rst 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/README.rst 2021-01-05 13:44:54.000000000 +0100 @@ -1,8 +1,8 @@ -Python SANE module 2.8.3 -======================== +Python SANE module 2.9 +====================== -.. image:: https://travis-ci.org/python-pillow/Sane.svg - :target: https://travis-ci.org/python-pillow/Sane +.. image:: https://github.com/python-pillow/Sane/workflows/Test/badge.svg + :target: https://github.com/python-pillow/Sane/actions Python SANE has been split from Python-Pillow as of version 2.7.0. @@ -29,4 +29,4 @@ Documentation ------------- -Available at http://python-sane.readthedocs.org/en/latest/ +Available at https://python-sane.readthedocs.io/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/_sane.c new/Sane-2.9.1/_sane.c --- old/Sane-2.8.3/_sane.c 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/_sane.c 2021-01-05 13:44:54.000000000 +0100 @@ -1,7 +1,7 @@ /*********************************************************** (C) Copyright 2003 A.M. Kuchling. All Rights Reserved (C) Copyright 2004 A.M. Kuchling, Ralph Heinkel All Rights Reserved -(C) Copyright 2013-2017 Sandro Mani All Rights Reserved +(C) Copyright 2013-2021 Sandro Mani All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, @@ -31,12 +31,6 @@ #include <sys/time.h> -#if PY_MAJOR_VERSION >= 3 - #define PyInt_AsLong PyLong_AsLong - #define PyInt_FromLong PyLong_FromLong - #define PyInt_Check PyLong_Check -#endif - #define RAISE_IF(test, message) \ if(test) \ { \ @@ -55,7 +49,6 @@ static int g_sane_initialized = 0; - /* Raise a SANE exception */ static PyObject * PySane_Error(SANE_Status st) @@ -132,7 +125,7 @@ SANE_Status st = sane_get_select_fd(self->h, &fd); if(st != SANE_STATUS_GOOD) return PySane_Error(st); - return PyInt_FromLong(fd); + return PyLong_FromLong(fd); } static PyObject * @@ -162,7 +155,9 @@ RAISE_IF(self->h == NULL, "SaneDev object is closed"); + Py_BEGIN_ALLOW_THREADS sane_cancel(self->h); + Py_END_ALLOW_THREADS Py_INCREF(Py_None); return Py_None; } @@ -214,7 +209,7 @@ if(d->type == SANE_TYPE_INT) for(j = 1; j <= d->constraint.word_list[0]; ++j) PyList_SetItem(constraint, j - 1, - PyInt_FromLong(d->constraint.word_list[j])); + PyLong_FromLong(d->constraint.word_list[j])); else if(d->type == SANE_TYPE_FIXED) for(j = 1; j <= d->constraint.word_list[0]; ++j) PyList_SetItem(constraint, j - 1, @@ -227,13 +222,9 @@ PyObject *item = NULL; for(j = 0; d->constraint.string_list[j] != NULL; j++) { -#if PY_MAJOR_VERSION >= 3 item = PyUnicode_DecodeLatin1(d->constraint.string_list[j], strlen(d->constraint.string_list[j]), NULL); -#else - item = PyString_FromString(d->constraint.string_list[j]); -#endif PyList_Append(constraint, item); Py_XDECREF(item); } @@ -286,13 +277,9 @@ value = Py_BuildValue("d", SANE_UNFIX((*((SANE_Fixed*)v))) ); break; case SANE_TYPE_STRING: -#if PY_MAJOR_VERSION >= 3 value = PyUnicode_DecodeLatin1((const char *) v, strlen((const char *) v), NULL); -#else - value = Py_BuildValue("s", v); -#endif break; case SANE_TYPE_BUTTON: case SANE_TYPE_GROUP: @@ -326,13 +313,13 @@ { case SANE_TYPE_BOOL: case SANE_TYPE_INT: - if(!PyInt_Check(value)) + if(!PyLong_Check(value)) { PyErr_SetString(PyExc_TypeError, "SANE_INT and SANE_BOOL require an integer"); free(v); return NULL; } - wordval = PyInt_AsLong(value); + wordval = PyLong_AsLong(value); memcpy(v, &wordval, sizeof(SANE_Word)); break; case SANE_TYPE_FIXED: @@ -346,7 +333,6 @@ memcpy(v, &wordval, sizeof(SANE_Word)); break; case SANE_TYPE_STRING: -#if PY_MAJOR_VERSION >= 3 if(!PyUnicode_Check(value)) { PyErr_SetString(PyExc_TypeError, "SANE_STRING requires a string"); @@ -363,16 +349,6 @@ strncpy(v, PyBytes_AsString(strobj), d->size - 1); ((char*)v)[d->size - 1] = 0; Py_DECREF(strobj); -#else - if(!PyString_Check(value)) - { - PyErr_SetString(PyExc_TypeError, "SANE_STRING requires a string"); - free(v); - return NULL; - } - strncpy(v, PyString_AsString(value), d->size - 1); - ((char*)v)[d->size - 1] = 0; -#endif break; case SANE_TYPE_BUTTON: case SANE_TYPE_GROUP: @@ -412,9 +388,15 @@ int noCancel = 0; int allow16bitsamples = 0; - if(!PyArg_ParseTuple(args, "|ii", &noCancel, &allow16bitsamples)) + PyObject *progress = NULL; + if(!PyArg_ParseTuple(args, "|iiO", &noCancel, &allow16bitsamples, &progress)) return NULL; + if(progress && progress != Py_None && !PyCallable_Check(progress)) + { + PyErr_SetString(PyExc_ValueError, "progress is not callable"); + return NULL; + } RAISE_IF(self->h == NULL, "SaneDev object is closed"); /* Get parameters, prepare buffers */ @@ -437,6 +419,7 @@ } int imgBufCurLine = 0; int imgBufLines = p.lines < 1 ? 1 : p.lines; + int imgPrioriLines = p.lines; const unsigned char bitMasks[8] = {128, 64, 32, 16, 8, 4, 2, 1}; SANE_Byte* imgBuf = (SANE_Byte*)malloc(imgBufLines * imgBytesPerLine); @@ -445,11 +428,10 @@ int i, j; /* Read data */ - Py_BEGIN_ALLOW_THREADS - st = SANE_STATUS_GOOD; while(st == SANE_STATUS_GOOD) { + Py_BEGIN_ALLOW_THREADS /* Read one line */ lineBufUsed = 0; while(lineBufUsed < imgBytesPerScanLine) @@ -462,7 +444,8 @@ break; lineBufUsed += nRead; } - + Py_END_ALLOW_THREADS + /* Check status, in particular if need to restart for the next frame */ if(st != SANE_STATUS_GOOD) { @@ -567,13 +550,28 @@ return NULL; } ++imgBufCurLine; - } + if(progress && progress != Py_None) + { + PyObject *progArgs = Py_BuildValue("ii", imgBufCurLine, imgPrioriLines); + PyObject *result = PyObject_Call(progress, progArgs, NULL); + Py_DECREF(result); + Py_DECREF(progArgs); + if(PyErr_Occurred()) + { + free(lineBuf); + free(imgBuf); + sane_cancel(self->h); + return NULL; + } + } + } /* noCancel is true for ADF scans, see _SaneIterator class in sane.py */ if(noCancel != 1) - sane_cancel(self->h); + { + sane_cancel(self->h); + } free(lineBuf); - Py_END_ALLOW_THREADS if(st != SANE_STATUS_EOF) { @@ -749,7 +747,7 @@ return NULL; SANE_Int cap = lg; - return PyInt_FromLong( SANE_OPTION_IS_ACTIVE(cap)); + return PyLong_FromLong( SANE_OPTION_IS_ACTIVE(cap)); } static PyObject * @@ -760,7 +758,7 @@ return NULL; SANE_Int cap = lg; - return PyInt_FromLong( SANE_OPTION_IS_SETTABLE(cap)); + return PyLong_FromLong( SANE_OPTION_IS_SETTABLE(cap)); } /* List of functions defined in the module */ @@ -778,14 +776,13 @@ static void insint(PyObject *d, char *name, int value) { - PyObject *v = PyInt_FromLong((long) value); + PyObject *v = PyLong_FromLong((long) value); if(!v || PyDict_SetItemString(d, name, v) == -1) PyErr_SetString(ErrorObject, "Can't initialize sane module"); Py_XDECREF(v); } -#if PY_MAJOR_VERSION >= 3 static struct PyModuleDef PySane_moduledef = { PyModuleDef_HEAD_INIT, "_sane", @@ -805,16 +802,6 @@ PyObject *m = PyModule_Create(&PySane_moduledef); if(!m) return NULL; -#else /* if PY_MAJOR_VERSION < 3 */ - -PyMODINIT_FUNC -init_sane(void) -{ - /* Create the module and add the functions */ - PyObject *m = Py_InitModule("_sane", PySane_methods); - if(!m) - return; -#endif /* Add some symbolic constants to the module */ PyObject *d = PyModule_GetDict(m); @@ -874,7 +861,5 @@ m = NULL; } -#if PY_MAJOR_VERSION >= 3 return m; -#endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/doc/conf.py new/Sane-2.9.1/doc/conf.py --- old/Sane-2.8.3/doc/conf.py 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/doc/conf.py 2021-01-05 13:44:54.000000000 +0100 @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # python-sane documentation build configuration file, created by # sphinx-quickstart on Sun Feb 15 18:59:52 2015. @@ -18,15 +17,7 @@ # -- Mock module for _sane try: - try: - # Python >= 3.3 - from unittest.mock import MagicMock - except: - try: - # Python < 3.3 - from mock import Mock as MagicMock - except: - raise ImportError + from unittest.mock import MagicMock class Mock(MagicMock): @classmethod @@ -70,8 +61,8 @@ master_doc = 'index' # General information about the project. -project = u'python-sane' -copyright = u'2003-2017, Andrew Kuchling, Ralph Heinkel, Sandro Mani' +project = 'python-sane' +copyright = '2003-2021, Andrew Kuchling, Ralph Heinkel, Sandro Mani' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -224,8 +215,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'python-sane.tex', u'python-sane Documentation', - u'Andrew Kuchling, Ralph Heinkel, Sandro Mani', 'manual'), + ('index', 'python-sane.tex', 'python-sane Documentation', + 'Andrew Kuchling, Ralph Heinkel, Sandro Mani', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -254,8 +245,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'python-sane', u'python-sane Documentation', - [u'Andrew Kuchling, Ralph Heinkel, Sandro Mani'], 1) + ('index', 'python-sane', 'python-sane Documentation', + ['Andrew Kuchling, Ralph Heinkel, Sandro Mani'], 1) ] # If true, show URL addresses after external links. @@ -268,8 +259,9 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'python-sane', u'python-sane Documentation', - u'Andrew Kuchling, Ralph Heinkel, Sandro Mani', 'python-sane', 'One line description of project.', + ('index', 'python-sane', 'python-sane Documentation', + 'Andrew Kuchling, Ralph Heinkel, Sandro Mani', 'python-sane', + 'Provides an interface to the SANE scanner and frame grabber interface for Linux', 'Miscellaneous'), ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/doc/index.rst new/Sane-2.9.1/doc/index.rst --- old/Sane-2.8.3/doc/index.rst 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/doc/index.rst 2021-01-05 13:44:54.000000000 +0100 @@ -2,7 +2,7 @@ python-sane documentation ************************* -The sane module is a Python interface to the SANE (Scanning is Now Easy) +The sane module is a Python interface to the SANE (Scanner Access Now Easy) library, which provides access to various raster scanning devices such as flatbed scanners and digital cameras. For more information about SANE, consult the SANE website at `www.sane-project.org <http://www.sane-project.org>`_. @@ -10,7 +10,7 @@ documentation, which you must also consult to get a complete understanding. This module has been originally developed by -`A.M. Kuchling <mailto:a...@erols.com>`_, it is currently maintained by +`A.M. Kuchling <http://amk.ca/>`_, it is currently maintained by `Sandro Mani <mailto:manisan...@gmail.com>`_. .. contents:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/example.py new/Sane-2.9.1/example.py --- old/Sane-2.8.3/example.py 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/example.py 2021-01-05 13:44:54.000000000 +0100 @@ -1,6 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function import sane import numpy from PIL import Image diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/sane.py new/Sane-2.9.1/sane.py --- old/Sane-2.8.3/sane.py 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/sane.py 2021-01-05 13:44:54.000000000 +0100 @@ -5,7 +5,7 @@ # of SANE, consult the documentation at the SANE home page: # http://www.sane-project.org/docs.html -__version__ = '2.8.3' +__version__ = '2.9.1' __author__ = ['Andrew Kuchling', 'Ralph Heinkel', 'Sandro Mani'] import _sane @@ -118,15 +118,15 @@ def __del__(self): self.device.cancel() - def next(self): + def __next__(self): try: self.device.start() + return self.device.snap(True) except Exception as e: if str(e) == 'Document feeder out of documents': raise StopIteration else: raise - return self.device.snap(True) class SaneDev: @@ -145,7 +145,7 @@ Furthermore, the scanner options are also exposed as attributes, which can be read and set:: - print scanner.mode + print(scanner.mode) scanner.mode = 'Color' An :class:`Option` object for a scanner option can be retrieved via @@ -278,7 +278,7 @@ """ self.dev.cancel() - def snap(self, no_cancel=False): + def snap(self, no_cancel=False, progress=None): """ Read image data and return a ``PIL.Image`` object. An RGB image is returned for multi-band images, an L image for single-band images. @@ -292,22 +292,23 @@ from PIL import Image except: raise RuntimeError("Cannot import PIL.Image") - (data, width, height, samples, sampleSize) = self.dev.snap(no_cancel) + result = self.dev.snap(no_cancel, False, progress) + data, width, height, samples, sampleSize = result if not data: raise RuntimeError("Scanner returned no data") mode = 'RGB' if samples == 3 else 'L' return Image.frombuffer(mode, (width, height), bytes(data), "raw", mode, 0, 1) - def scan(self): + def scan(self, progress=None): """ Convenience method which calls :func:`SaneDev.start` followed by :func:`SaneDev.snap`. """ self.start() - return self.snap() + return self.snap(progress=progress) - def arr_snap(self): + def arr_snap(self, progress=None): """ Read image data and return a 3d numpy array of the shape ``(width, height, nbands)``. @@ -320,7 +321,8 @@ import numpy except: raise RuntimeError("Cannot import numpy") - (data, width, height, samples, sampleSize) = self.dev.snap(False, True) + result = self.dev.snap(False, True, progress) + data, width, height, samples, sampleSize = result if not data: raise RuntimeError("Scanner returned no data") if sampleSize == 1: @@ -331,13 +333,13 @@ raise RuntimeError("Unexpected sample size: %d" % sampleSize) return numpy.reshape(np, (height, width, samples)) - def arr_scan(self): + def arr_scan(self, progress=None): """ Convenience method which calls :func:`SaneDev.start` followed by :func:`SaneDev.arr_snap`. """ self.start() - return self.arr_snap() + return self.arr_snap(progress=progress) def multi_scan(self): """ @@ -352,6 +354,12 @@ """ return self.dev.fileno() + def __enter__(self): + return self + + def __exit__(self, *args): + self.close() + def close(self): """ Close the scanning device. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/sanedoc.txt new/Sane-2.9.1/sanedoc.txt --- old/Sane-2.8.3/sanedoc.txt 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/sanedoc.txt 2021-01-05 13:44:54.000000000 +0100 @@ -2,7 +2,7 @@ python-sane documentation ************************* -The sane module is a Python interface to the SANE (Scanning is Now +The sane module is a Python interface to the SANE (Scanner Access Now Easy) library, which provides access to various raster scanning devices such as flatbed scanners and digital cameras. For more information about SANE, consult the SANE website at www.sane- @@ -102,7 +102,7 @@ Furthermore, the scanner options are also exposed as attributes, which can be read and set: - print scanner.mode + print(scanner.mode) scanner.mode = 'Color' An "Option" object for a scanner option can be retrieved via diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sane-2.8.3/setup.py new/Sane-2.9.1/setup.py --- old/Sane-2.8.3/setup.py 2017-01-02 12:53:07.000000000 +0100 +++ new/Sane-2.9.1/setup.py 2021-01-05 13:44:54.000000000 +0100 @@ -1,17 +1,31 @@ -from distutils.core import setup, Extension +import setuptools -sane = Extension('_sane', +sane = setuptools.Extension('_sane', include_dirs=[], libraries=['sane'], define_macros=[], extra_compile_args=[], sources=['_sane.c']) -setup(name='python-sane', - version='2.8.3', +setuptools.setup(name='python-sane', + version='2.9.1', description='This is the python-sane package', url='https://github.com/python-pillow/Sane', maintainer='Sandro Mani', maintainer_email='manisan...@gmail.com', + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Multimedia :: Graphics", + "Topic :: Multimedia :: Graphics :: Capture :: Scanners", + ], + python_requires=">=3.6", py_modules=['sane'], ext_modules=[sane])