[Python-modules-commits] [pyudev] 02/08: Import pyudev_0.19.0.orig.tar.gz
Felix Geyer
fgeyer at moszumanska.debian.org
Tue Apr 26 19:26:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
fgeyer pushed a commit to branch master
in repository pyudev.
commit bac06affebd2eb0a37ea9a8d6a4b357d5c9772b7
Author: Felix Geyer <fgeyer at debian.org>
Date: Tue Apr 26 20:45:44 2016 +0200
Import pyudev_0.19.0.orig.tar.gz
---
.../pbr/tests/testpackage/test-requirements.txt | 1 +
.../pbr/tests/testpackage/test-requirements.txt | 1 +
CHANGES.rst | 58 +-
MANIFEST.in | 4 +-
PKG-INFO | 13 +-
README.rst | 11 +-
build_bindings.py | 406 ----------
doc/_templates/info.html | 2 -
doc/api/index.rst | 1 +
doc/api/pyudev.glib.rst | 34 +-
doc/api/pyudev.pyqt4.rst | 36 +-
doc/api/pyudev.pyqt5.rst | 37 +
doc/api/pyudev.pyside.rst | 36 +-
doc/api/pyudev.rst | 23 +
doc/api/pyudev.wx.rst | 73 +-
doc/conf.py | 19 +-
doc/endorsements.rst | 11 +
doc/guide.rst | 30 +-
doc/index.rst | 25 +-
doc/tests/plugins.rst | 195 +----
doc/tests/running.rst | 66 +-
pyudev.egg-info/SOURCES.txt | 57 --
pyudev/_qt_base.py | 76 --
pyudev/pyqt4.py | 87 ---
pyudev/pyside.py | 88 ---
reproducers/1255191.c | 32 +
reproducers/1263351.c | 47 ++
reproducers/1263351a.c | 48 ++
reproducers/1265315.c | 62 ++
reproducers/1265315.py | 45 ++
reproducers/1297512.c | 51 ++
reproducers/1297512.py | 34 +
reproducers/1302359.c | 54 ++
requirements.txt | 5 +-
setup.py | 21 +-
{pyudev.egg-info => src/pyudev.egg-info}/PKG-INFO | 13 +-
src/pyudev.egg-info/SOURCES.txt | 99 +++
.../pyudev.egg-info}/dependency_links.txt | 0
src/pyudev.egg-info/requires.txt | 1 +
.../pyudev.egg-info}/top_level.txt | 0
{pyudev => src/pyudev}/__init__.py | 5 +-
{pyudev => src/pyudev}/_compat.py | 0
.../pyudev/_ctypeslib/__init__.py | 30 +-
src/pyudev/_ctypeslib/_errorcheckers.py | 106 +++
src/pyudev/_ctypeslib/libc.py | 73 ++
.../pyudev/_ctypeslib/libudev.py | 191 ++---
pyudev/_compat.py => src/pyudev/_os/__init__.py | 30 +-
src/pyudev/_os/pipe.py | 157 ++++
src/pyudev/_os/poll.py | 119 +++
.../_compat.py => src/pyudev/_parsing/__init__.py | 35 +-
src/pyudev/_parsing/_devlink.py | 101 +++
src/pyudev/_parsing/_id_path.py | 171 +++++
src/pyudev/_parsing/_pci_address.py | 60 ++
src/pyudev/_parsing/_shared.py | 118 +++
src/pyudev/_qt_base.py | 207 ++++++
{pyudev => src/pyudev}/_util.py | 81 +-
{pyudev => src/pyudev}/core.py | 119 ++-
pyudev/_compat.py => src/pyudev/device/__init__.py | 49 +-
pyudev/device.py => src/pyudev/device/_device.py | 821 +++++++++++----------
src/pyudev/device/_errors.py | 187 +++++
src/pyudev/discover.py | 397 ++++++++++
{pyudev => src/pyudev}/glib.py | 136 ++--
{pyudev => src/pyudev}/monitor.py | 137 ++--
src/pyudev/pyqt4.py | 64 ++
src/pyudev/pyqt5.py | 49 ++
src/pyudev/pyside.py | 63 ++
pyudev/_compat.py => src/pyudev/version.py | 31 +-
{pyudev => src/pyudev}/wx.py | 78 +-
tests/__init__.py | 0
tests/_constants.py | 64 ++
.../_compat.py => tests/_device_tests/__init__.py | 29 +-
tests/_device_tests/_attributes_tests.py | 158 ++++
tests/_device_tests/_device_tests.py | 481 ++++++++++++
tests/_device_tests/_devices_tests.py | 243 ++++++
tests/_device_tests/_tags_tests.py | 101 +++
tests/conftest.py | 55 +-
tests/plugins/fake_monitor.py | 5 +-
tests/plugins/mock_libudev.py | 41 +-
pyudev/_compat.py => tests/plugins/travis.py | 43 +-
tests/test_core.py | 34 +-
tests/test_device.py | 612 ++-------------
tests/test_discover.py | 203 +++++
tests/test_enumerate.py | 124 +++-
tests/test_libudev.py | 76 +-
tests/test_monitor.py | 170 +++--
tests/test_observer.py | 125 +---
...est_observer.py => test_observer_deprecated.py} | 57 +-
tests/test_parsing.py | 143 ++++
tests/test_pypi.py | 119 ++-
tests/test_util.py | 85 ++-
pyudev/_compat.py => tests/utils/__init__.py | 30 +-
tests/utils/journal.py | 55 ++
tests/{plugins => utils}/libudev.py | 44 +-
pyudev/_compat.py => tests/utils/misc.py | 32 +-
tests/{plugins/udev_database.py => utils/udev.py} | 165 +++--
tox.ini | 21 +-
96 files changed, 5911 insertions(+), 2921 deletions(-)
diff --git a/.tox/py27/lib/python2.7/site-packages/pbr/tests/testpackage/test-requirements.txt b/.tox/py27/lib/python2.7/site-packages/pbr/tests/testpackage/test-requirements.txt
new file mode 100644
index 0000000..f283aff
--- /dev/null
+++ b/.tox/py27/lib/python2.7/site-packages/pbr/tests/testpackage/test-requirements.txt
@@ -0,0 +1 @@
+ordereddict;python_version=='2.6'
diff --git a/.tox/py27/lib64/python2.7/site-packages/pbr/tests/testpackage/test-requirements.txt b/.tox/py27/lib64/python2.7/site-packages/pbr/tests/testpackage/test-requirements.txt
new file mode 100644
index 0000000..f283aff
--- /dev/null
+++ b/.tox/py27/lib64/python2.7/site-packages/pbr/tests/testpackage/test-requirements.txt
@@ -0,0 +1 @@
+ordereddict;python_version=='2.6'
diff --git a/CHANGES.rst b/CHANGES.rst
index 8b6c936..9ad2449 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,4 +1,58 @@
-0.16.1 (Aug 08, 2012)
+0.19.0 (Feb 3, 2015)
+==================
+
+- Restore raising KeyError by Attributes.as* methods when attribute not found.
+- Explicitly require six module.
+- Never raise a DeviceNotFoundError when iterating over a device enumeration.
+- Device.subsystem() now returns None if device has no subsystem.
+- Add DeprecationWarnings to deprecated Device methods.
+- Replace "/" with "!" in Device.from_name() sys_name parameter.
+- Add some unstable classes for parsing some kinds of values.
+- Make version info more like Python's including micro numbers and levels.
+- Refactor some internal modules into subdirectories.
+- Work on tests and reproducers.
+
+0.18 (Dec 1, 2015)
+===================
+
+- DeviceNotFoundError is no longer a subtype of LookupError
+- Added support for pyqt5 monitor observer
+- Added discover module, which looks up a device on limited information
+- Attributes class no longer extends Mapping, extends object instead
+- Attributes class no longer inherits [] operator, Mapping methods
+- Attributes class objects are no longer iterable
+- Attributes.available_attributes property added
+- Attributes.get() method, with usual semantics, defined
+- Device.from_* methods are deprecated, uses Devices.from_* methods instead
+- Device.from_device_file() now raises DeviceNotFoundByFileError
+- Device.from_device_number() now raises DeviceNotFoundByNumberError
+- Devices.from_interface_index() method added
+- Devices.from_kernel_device() method added
+- Numerous testing infrastructure changes
+
+0.17 (Aug 26, 2015)
+=====================
+
+- #52: Remove global libudev object
+- #57: Really start the monitor on :meth:`pyudev.Monitor.poll()`
+- #60: Do not use :meth:`select.select` to avoid hitting its file descriptor
+ limit
+- #58: Force non-blocking IO in :class:`pyudev.Monitor` to avoid blocking on
+ receiving the device
+- #63: Set proper flags on pipe fds.
+- #65: Handle irregular polling events properly.
+- #50: Add :class:`pyudev.wx.MonitorObserver` and deprecate
+ :class:`pyudev.wx.WxUDevMonitorObserver`
+- #50: Add :class:`pyudev.glib.MonitorObserver` and deprecate
+ :class:`pyudev.glib.GUDevMonitorObserver`
+- #50: Add :class:`pyudev.pyqt4.MonitorObserver` and deprecate
+ :class:`pyudev.pyqt4.QUDevMonitorObserver`
+- #50: Add :class:`pyudev.pyside.MonitorObserver` and deprecate
+ :class:`pyudev.pyside.QUDevMonitorObserver`
+- Add a wrapper function to retry interruptible system calls.
+
+
+0.16.1 (Aug 02, 2012)
=====================
- #53: Fix source distribution
@@ -10,7 +64,7 @@
- Remove :meth:`pyudev.Monitor.from_socket`.
- Deprecate :meth:`pyudev.Device.traverse()` in favor of
- :attr:`pyudev.Device.ancestors`.
+ :attr:`pyudev.Device.ancestors`.
- #47: Deprecate :meth:`pyudev.Monitor.receive_device` in favor of
:attr:`pyudev.Monitor.poll`.
- #47: Deprecate :attr:`pyudev.Monitor.enable_receiving` in favor of
diff --git a/MANIFEST.in b/MANIFEST.in
index 0444518..89a8c74 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,7 @@
-recursive-include pyudev *.py
+recursive-include src/pyudev *.py
recursive-include doc *.rst *.py *.html
recursive-include tests *.py
-include build_bindings.py
+recursive-include reproducers *.c *.py
include tox.ini
global-include requirements.txt
include CHANGES.rst COPYING README.rst
diff --git a/PKG-INFO b/PKG-INFO
index 724d169..a86ba26 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pyudev
-Version: 0.16.1
+Version: 0.19.0
Summary: A libudev binding
Home-page: http://pyudev.readthedocs.org/
Author: Sebastian Wiesner
@@ -10,8 +10,8 @@ Description: ######
pyudev
######
- .. image:: https://secure.travis-ci.org/lunaryorn/pyudev.png?branch=master
- :target: http://travis-ci.org/lunaryorn/pyudev
+ .. image:: https://secure.travis-ci.org/pyudev/pyudev.png?branch=develop
+ :target: http://travis-ci.org/pyudev/pyudev
http://pyudev.readthedocs.org
@@ -47,11 +47,8 @@ Description: ######
Support
-------
- Please ask questions about pyudev on the mailing list at pyudev at librelist.com.
- To join this list, send a mail to pyudev at librelist.com and reply to the
- confirmation email.
-
- Please report issues to the issue tracker, but respect the following guidelines:
+ Please report issues and questions to the issue tracker, but respect the
+ following guidelines:
- Check that the issue has not already been reported.
- Check that the issue is not already fixed in the ``master`` branch.
diff --git a/README.rst b/README.rst
index ea4f096..b96e3bc 100644
--- a/README.rst
+++ b/README.rst
@@ -2,8 +2,8 @@
pyudev
######
-.. image:: https://secure.travis-ci.org/lunaryorn/pyudev.png?branch=master
- :target: http://travis-ci.org/lunaryorn/pyudev
+.. image:: https://secure.travis-ci.org/pyudev/pyudev.png?branch=develop
+ :target: http://travis-ci.org/pyudev/pyudev
http://pyudev.readthedocs.org
@@ -39,11 +39,8 @@ The website_ provides a detailed `user guide`_ and a complete `API reference`_.
Support
-------
-Please ask questions about pyudev on the mailing list at pyudev at librelist.com.
-To join this list, send a mail to pyudev at librelist.com and reply to the
-confirmation email.
-
-Please report issues to the issue tracker, but respect the following guidelines:
+Please report issues and questions to the issue tracker, but respect the
+following guidelines:
- Check that the issue has not already been reported.
- Check that the issue is not already fixed in the ``master`` branch.
diff --git a/build_bindings.py b/build_bindings.py
deleted file mode 100644
index 8a9863c..0000000
--- a/build_bindings.py
+++ /dev/null
@@ -1,406 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2012 Sebastian Wiesner <lunaryorn at gmail.com>
-
-# This library 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.1 of the License, or (at your
-# option) any later version.
-
-# This library 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 Lesser General Public License
-# for more details.
-
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-"""
- build_bindings
- ==============
-
- Script to build native bindings inside virtualenvs.
-
- This plugin builds pygobject, PyQt4.QtCore, PySide.QtCore and wxPython if
- these are not available.
-
- This feature is mainly intented for use with tox_, but can be used in
- normal virtualenvs, too.
-
- .. warning::
-
- The directory pointed to by ``os.path.join(sys.prefix, 'lib')`` must be
- contained in the load path of shared libraries, otherwise bindings may
- fail to load. The tox_ configuration of pyudev implicitly sets
- ``LD_LIBRARY_PATH`` accordingly, but in your own virtual environments
- you need to do this yourself. A convenient way to accomplish this is
- virtualenvwrapper_.
-
- .. _tox: http://tox.testrun.org
- .. _virtualenvwrapper: http://www.doughellmann.com/projects/virtualenvwrapper/
-
- .. moduleauthor:: Sebastian Wiesner <lunaryorn at gmail.com>
-"""
-
-from __future__ import (print_function, division, unicode_literals,
- absolute_import)
-
-import sys
-import platform
-import os
-import posixpath
-import errno
-from collections import defaultdict
-from subprocess import call, check_call
-try:
- from urlparse import urlparse
-except ImportError:
- from urllib.parse import urlparse
-
-import py.path
-
-
-IS_CPYTHON = platform.python_implementation() == 'CPython'
-
-
-class MissingDependencyError(Exception):
- pass
-
-
-class MissingProgramError(KeyError):
- pass
-
-
-def ensure_directory(directory):
- try:
- os.makedirs(directory)
- except EnvironmentError as error:
- if error.errno != errno.EEXIST:
- raise
-
-
-class Programs(defaultdict):
-
- def __missing__(self, key):
- path = py.path.local.sysfind(key)
- if not path:
- raise MissingProgramError(key)
- return str(path)
-
-
-class Environment(object):
-
- def __init__(self, download_directory, build_directory):
- self.download_directory = download_directory
- self.build_directory = build_directory
- self.programs = Programs()
- # a basic build environment
- self.environ = dict(os.environ)
- self.environ['LD_LIBRARY_PATH'] = os.path.join(
- sys.prefix, 'lib')
- self.environ['PKG_CONFIG_PATH'] = os.path.join(
- sys.prefix, 'lib', 'pkgconfig')
-
- def prepare(self):
- ensure_directory(self.download_directory)
- ensure_directory(self.build_directory)
-
- def build(self, binding, force=False):
- binding(self, force=force).install()
-
- def build_all(self, bindings, force=False):
- for binding in bindings:
- self.build(binding, force=force)
-
-
-def have_module(modname):
- try:
- __import__(modname)
- return True
- except ImportError:
- return False
-
-
-class Binding(object):
-
- DEPENDS = []
-
- def __init__(self, env, force=False):
- self.env = env
- self.build_directory = os.path.join(env.build_directory, self.NAME)
- self.force = force
-
- @property
- def is_installed(self):
- raise NotImplementedError()
-
- @property
- def can_build(self):
- return IS_CPYTHON
-
- @property
- def source_archive(self):
- filename = posixpath.basename(urlparse(self.SOURCE_URL).path)
- return os.path.join(self.env.download_directory, filename)
-
- @property
- def build_environment(self):
- return dict(self.env.environ)
-
- @property
- def number_of_builds(self):
- # build on all cores if possible
- try:
- from multiprocessing import cpu_count
- return cpu_count()
- except (NotImplementedError, ImportError):
- return 1
-
- def have_pkg_config_package(self, package):
- command = [self.env.programs['pkg-config'], '--exists', package]
- return call(command, env=self.env.environ) == 0
-
- def find_dependencies(self):
- return
-
- def check_call(self, command):
- check_call(command, cwd=self.build_directory,
- env=self.build_environment)
-
- def download(self):
- call([self.env.programs['wget'], '-c',
- '-O', self.source_archive, self.SOURCE_URL])
-
- def extract(self):
- check_call([self.env.programs['tar'], 'xaf', self.source_archive,
- '-C', os.path.dirname(self.build_directory)])
-
- def prepare(self):
- self.download()
- self.extract()
- self.find_dependencies()
-
- def install(self):
- if self.is_installed and not self.force:
- return
- self.env.build_all(self.DEPENDS)
- if not self.can_build:
- return
- self.prepare()
- self.build()
-
- def build(self):
- raise NotImplementedError()
-
- def make(self, target=None):
- command = [self.env.programs['make'],
- '-j{0}'.format(self.number_of_builds)]
- if target:
- command.append(target)
- self.check_call(command)
-
- def make_build_and_install(self):
- self.make()
- self.make('install')
-
-
-class AutotoolsBinding(Binding):
-
- CONFIGURE_EXTRA_ARGS = []
-
- @property
- def build_environment(self):
- # tell autotools where to find the Python interpreter
- env = dict(self.env.environ)
- # autotools needs the flat name of the python interpreter to discover
- # the headers
- python = os.path.basename(sys.executable)
- # append version number if the interpreter executable doesn't have one,
- # to avoid ambiguities between virtualenv python and system python
- if not python[-1].isdigit():
- python += '{0}.{1}'.format(*sys.version_info)
- env['PYTHON'] = python
- return env
-
- def autotools_configure(self, extra_args):
- command = ['./configure', '--prefix', sys.prefix] + extra_args
- self.check_call(command)
-
- def build(self):
- self.autotools_configure(self.CONFIGURE_EXTRA_ARGS)
- self.make_build_and_install()
-
-
-class PyGObject(AutotoolsBinding):
- NAME = 'pygobject-2.28.6'
- SOURCE_URL = ('http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/'
- '{0}.tar.bz2'.format(NAME))
-
- CONFIGURE_EXTRA_ARGS = ['--disable-introspection']
-
- @property
- def is_installed(self):
- return have_module('glib') and have_module('gobject')
-
-
-RIVERBANK_DOWNLOADS = 'http://www.riverbankcomputing.com/static/Downloads'
-
-
-class Sip4(Binding):
- NAME = 'sip-4.13.3'
- SOURCE_URL = '{0}/sip4/{1}.tar.gz'.format(RIVERBANK_DOWNLOADS, NAME)
-
- @property
- def is_installed(self):
- return have_module('sip')
-
- def build(self):
- incdir = os.path.join(sys.prefix, 'include', 'sip')
- self.check_call([sys.executable, 'configure.py', '--incdir', incdir])
- self.make_build_and_install()
-
-
-class PyQt4QtCore(Binding):
- NAME = 'PyQt-x11-gpl-4.9.4'
- SOURCE_URL = '{0}/PyQt4/{1}.tar.gz'.format(RIVERBANK_DOWNLOADS, NAME)
-
- DEPENDS = [Sip4]
-
- @property
- def is_installed(self):
- return have_module('PyQt4.QtCore')
-
- def find_dependencies(self):
- try:
- self.qmake = self.env.programs['qmake-qt4']
- except KeyError:
- self.qmake = self.env.programs['qmake']
-
- def build(self):
- command = [sys.executable, 'configure.py', '--confirm-license',
- '--no-designer-plugin', '--no-sip-files', '--no-qsci-api',
- '--qmake', self.qmake, '--enable', 'QtCore']
- self.check_call(command)
- self.make_build_and_install()
-
-
-class CMakeBinding(Binding):
- CMAKE_EXTRA_ARGS = []
-
- def cmake_configure(self, extra_args):
- # cmake uses out of source builds
- self.build_directory = os.path.join(self.build_directory, 'build')
- ensure_directory(self.build_directory)
- command = [self.env.programs['cmake'],
- '-DBUILD_TESTS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo',
- '-DCMAKE_INSTALL_PREFIX={0}'.format(sys.prefix)]
- command += extra_args
- command += ['..']
- self.check_call(command)
-
- def build(self):
- self.cmake_configure(self.CMAKE_EXTRA_ARGS)
- self.make_build_and_install()
-
-
-PYSIDE_DOWNLOADS = 'http://www.pyside.org/files'
-
-
-class Shiboken(CMakeBinding):
- NAME = 'shiboken-1.1.1'
- SOURCE_URL = '{0}/{1}.tar.bz2'.format(PYSIDE_DOWNLOADS, NAME)
-
- CMAKE_EXTRA_ARGS = [
- '-DPython_ADDITIONAL_VERSIONS={0}.{1}'.format(*sys.version_info)
- ]
-
- if sys.version_info[0] == 3:
- CMAKE_EXTRA_ARGS += ['-DUSE_PYTHON3=ON']
-
- @property
- def is_installed(self):
- return self.have_pkg_config_package('shiboken')
-
-
-DISABLED_QT_MODULES = [
- 'QtGui', 'QtMultimedia', 'QtNetwork', 'QtOpenGL',
- 'QtScript', 'QtScriptTools', 'QtSql', 'QtSvg', 'QtWebKit',
- 'QtXml', 'QtXmlPatterns', 'QtDeclarative', 'phonon',
- 'QtUiTools', 'QtHelp', 'QtTest']
-
-
-class PySideQtCore(CMakeBinding):
- NAME = 'pyside-qt4.7+1.1.1'
- SOURCE_URL = '{0}/{1}.tar.bz2'.format(PYSIDE_DOWNLOADS, NAME)
-
- DEPENDS = [Shiboken]
-
- CMAKE_EXTRA_ARGS = ['-DDISABLE_{0}=ON'.format(mod)
- for mod in DISABLED_QT_MODULES]
-
- @property
- def is_installed(self):
- return have_module('PySide.QtCore')
-
-
-class WxPython(Binding):
- NAME = 'wxPython-src-2.8.12.1'
- SOURCE_URL = ('http://downloads.sourceforge.net/wxpython/'
- '{0}.tar.bz2'.format(NAME))
-
- @property
- def can_build(self):
- # wx doesn't support Python 3
- return IS_CPYTHON and sys.version_info[0] == 2
-
- @property
- def is_installed(self):
- return have_module('wx')
-
- def build(self):
- self.build_directory = os.path.join(
- self.build_directory, 'wxPython')
- cmd = [sys.executable, 'setup.py', 'WXPORT=gtk2', 'UNICODE=1',
- # need to invoke install commands individually, because
- # "install" invokes "install_headers" which insists on
- # installing headers to system directories despite of a
- # virtualenv prefix. Praise wx…
- 'build', 'install_lib', 'install_data']
- self.check_call(cmd)
-
-
-AVAILABLE_BINDINGS = {
- 'pyqt4': PyQt4QtCore,
- 'pyside': PySideQtCore,
- 'pygobject': PyGObject,
- 'wxpython': WxPython,
-}
-
-
-def main():
- from argparse import ArgumentParser
-
- parser = ArgumentParser()
- parser.add_argument('-d', '--download-directory',
- help='Download directory')
- parser.add_argument('-b', '--build-directory', help='Build directory')
- parser.add_argument('-f', '--force-build', action='store_true',
- help='Build even if the binding is already available')
- parser.add_argument('--binding', action='append', dest='bindings',
- help='Binding to build', choices=AVAILABLE_BINDINGS)
- parser.set_defaults(download_directory='/tmp/pyudev-build-bindings',
- build_directory='/tmp/pyudev-build-bindings')
-
- args = parser.parse_args()
- if not args.bindings:
- args.bindings = AVAILABLE_BINDINGS.keys()
-
- bindings = [AVAILABLE_BINDINGS[b] for b in args.bindings]
-
- env = Environment(args.download_directory, args.build_directory)
- env.prepare()
- env.build_all(bindings, force=args.force_build)
-
-
-if __name__ == '__main__':
- main()
diff --git a/doc/_templates/info.html b/doc/_templates/info.html
index 2098147..43f91ab 100644
--- a/doc/_templates/info.html
+++ b/doc/_templates/info.html
@@ -22,7 +22,5 @@
<h3>Support</h3>
<ul>
- <li>{{link('mailing list', 'mailto:pyudev at librelist.com')}}
- ({{link('archives', 'http://librelist.com/browser/pyudev')}})</li>
<li>{{link('issue tracker', 'https://github.com/lunaryorn/pyudev/issues')}}</li>
</ul>
diff --git a/doc/api/index.rst b/doc/api/index.rst
index c53158d..d53e1eb 100644
--- a/doc/api/index.rst
+++ b/doc/api/index.rst
@@ -9,6 +9,7 @@ This document provides API reference documentation for pyudev. Refer to the
pyudev
pyudev.pyqt4
+ pyudev.pyqt5
pyudev.pyside
pyudev.glib
pyudev.wx
diff --git a/doc/api/pyudev.glib.rst b/doc/api/pyudev.glib.rst
index 1ff1e83..f2f106b 100644
--- a/doc/api/pyudev.glib.rst
+++ b/doc/api/pyudev.glib.rst
@@ -5,6 +5,38 @@
:platform: Linux
:synopsis: Glib integration
+.. autoclass:: MonitorObserver
+
+ .. attribute:: monitor
+
+ The :class:`~pyudev.Monitor` observed by this object.
+
+ .. attribute:: event_source
+
+ The event source, which represents the watch on the :attr:`monitor`
+ (as returned by :func:`glib.io_add_watch`), or ``None``, if
+ :attr:`enabled` is ``False``.
+
+ .. autoattribute:: enabled
+
+ .. rubric:: Signals
+
+ This class emits the following GObject signal:
+
+ .. method:: device-event(observer, action, device)
+
+ Emitted upon any device event.
+
+ ``observer`` is the :class:`MonitorObserver`, which emitted the
+ signal. ``device`` is the :class:`~pyudev.Device`, which caused this
+ event.
+
+ Use :attr:`~pyudev.Device.action` to get the type of event.
+
+
+Deprecated API
+--------------
+
.. autoclass:: GUDevMonitorObserver
.. attribute:: monitor
@@ -21,7 +53,7 @@
.. rubric:: Signals
- This class defines the following GObject signals:
+ This class emits the following GObject signals:
.. method:: device-event(observer, action, device)
diff --git a/doc/api/pyudev.pyqt4.rst b/doc/api/pyudev.pyqt4.rst
index 8917b7b..707444f 100644
--- a/doc/api/pyudev.pyqt4.rst
+++ b/doc/api/pyudev.pyqt4.rst
@@ -5,6 +5,37 @@
:platform: Linux
:synopsis: PyQt4 integration
+.. autoclass:: MonitorObserver
+
+ .. automethod:: __init__
+
+ .. attribute:: monitor
+
+ The :class:`~pyudev.Monitor` observed by this object.
+
+ .. attribute:: notifier
+
+ The underlying :class:`QtCore.QSocketNotifier` used to watch the
+ :attr:`monitor`.
+
+ .. autoattribute:: enabled
+
+ .. rubric:: Signals
+
+ This class emits the following Qt signal:
+
+ .. method:: deviceEvent(device)
+
+ Emitted upon any device event.
+
+ ``device`` is the :class:`~pyudev.Device` object describing the device.
+
+ Use :attr:`~pyudev.Device.action` to get the type of event.
+
+
+Deprecated API
+--------------
+
.. autoclass:: QUDevMonitorObserver
.. automethod:: __init__
@@ -22,7 +53,7 @@
.. rubric:: Signals
- This class defines the following Qt signals:
+ This class emits the following Qt signals:
.. method:: deviceEvent(action, device)
@@ -52,6 +83,3 @@
Emitted if a :class:`~pyudev.Device` was renamed, moved or
re-parented.
-
-
-.. _PyQt4: http://riverbankcomputing.co.uk/software/pyqt/intro
diff --git a/doc/api/pyudev.pyqt5.rst b/doc/api/pyudev.pyqt5.rst
new file mode 100644
index 0000000..bc58891
--- /dev/null
+++ b/doc/api/pyudev.pyqt5.rst
@@ -0,0 +1,37 @@
+:mod:`pyudev.pyqt5` – PyQt5_ integration
+========================================
+
+.. automodule:: pyudev.pyqt5
+ :platform: Linux
+ :synopsis: PyQt5 integration
+
+.. autoclass:: MonitorObserver
+
+ .. automethod:: __init__
+
+ .. attribute:: monitor
+
+ The :class:`~pyudev.Monitor` observed by this object.
+
+ .. attribute:: notifier
+
+ The underlying :class:`QtCore.QSocketNotifier` used to watch the
+ :attr:`monitor`.
+
+ .. autoattribute:: enabled
+
+ .. rubric:: Signals
+
+ This class emits the following Qt signal:
+
+ .. method:: deviceEvent(device)
+
+ Emitted upon any device event.
+
+ ``device`` is the :class:`~pyudev.Device` object describing the device.
+
+ Use :attr:`~pyudev.Device.action` to get the type of event.
+
+
+
+.. _PyQt5: http://riverbankcomputing.co.uk/software/pyqt/intro
diff --git a/doc/api/pyudev.pyside.rst b/doc/api/pyudev.pyside.rst
index 77e6319..0f16df2 100644
--- a/doc/api/pyudev.pyside.rst
+++ b/doc/api/pyudev.pyside.rst
@@ -5,6 +5,37 @@
:platform: Linux
:synopsis: PySide integration
+.. autoclass:: MonitorObserver
+
+ .. automethod:: __init__
+
+ .. attribute:: monitor
+
+ The :class:`~pyudev.Monitor` observed by this object.
+
+ .. attribute:: notifier
+
+ The underlying :class:`QtCore.QSocketNotifier` used to watch the
+ :attr:`monitor`.
+
+ .. autoattribute:: enabled
+
+ .. rubric:: Signals
+
+ This class emits the following Qt signal:
+
+ .. method:: deviceEvent(device)
+
+ Emitted upon any device event.
+
+ ``device`` is the :class:`~pyudev.Device` object describing the device.
+
+ Use :attr:`~pyudev.Device.action` to get the type of event.
+
+
+Deprecated API
+--------------
+
.. autoclass:: QUDevMonitorObserver
.. automethod:: __init__
@@ -22,7 +53,7 @@
.. rubric:: Signals
- This class defines the following Qt signals:
+ This class emits the following Qt signals:
.. method:: deviceEvent(action, device)
@@ -52,6 +83,3 @@
Emitted if a :class:`~pyudev.Device` was renamed, moved or
re-parented.
-
-
-.. _PySide: http://www.pyside.org
diff --git a/doc/api/pyudev.rst b/doc/api/pyudev.rst
index 6d5281d..8956147 100644
--- a/doc/api/pyudev.rst
+++ b/doc/api/pyudev.rst
@@ -10,6 +10,7 @@
Context
Device
+ Devices
Monitor
MonitorObserver
@@ -82,6 +83,28 @@ Version information
.. automethod:: __iter__
+:class:`Devices` – constructing `Device` objects
+------------------------------------------------
+
+.. autoclass:: Devices()
+
+ .. rubric:: Construction of device objects
+
+ .. automethod:: from_path
+
+ .. automethod:: from_sys_path
+
+ .. automethod:: from_name
+
+ .. automethod:: from_device_number
+
+ .. automethod:: from_device_file
+
+ .. automethod:: from_environment
+
+ .. automethod:: METHODS
+
+
:class:`Device` – accessing device information
----------------------------------------------
diff --git a/doc/api/pyudev.wx.rst b/doc/api/pyudev.wx.rst
index 268df98..d43812a 100644
--- a/doc/api/pyudev.wx.rst
+++ b/doc/api/pyudev.wx.rst
@@ -5,7 +5,8 @@
:platform: Linux
:synopsis: wxWidgets integration
-.. autoclass:: WxUDevMonitorObserver
+
+.. autoclass:: MonitorObserver
.. attribute:: monitor
@@ -13,52 +14,81 @@
.. autoattribute:: enabled
+.. rubric:: Events
-.. rubric:: Event constants
-
-:class:`WxUDevMonitorObserver` exposes the following events:
+:class:`MonitorObserver` posts the following event:
.. data:: EVT_DEVICE_EVENT
Emitted upon any device event. Receivers get a :class:`DeviceEvent` object
as argument.
+.. class:: DeviceEvent
+
+ Argument object for :data:`EVT_DEVICE_EVENT`.
+
+ .. attribute:: device
+
+ The :class:`~pyudev.Device` object that caused this event.
+
+ Use :attr:`~pyudev.Device.action` to get the type of event.
+
+ .. rubric:: Deprecated members
... 10706 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pyudev.git
More information about the Python-modules-commits
mailing list