pywayland |travis| |coveralls|
==============================

PyWayland provides a wrapper to the ``libwayland`` library using the CFFI
library to provide access to the Wayland library calls and written in pure
Python.

Current Release
---------------

PyWayland is still in a developmental state.  An initial version ``0.0.1a.dev1``
is available on the `cheese shop`_.  Current development versions can be
obtained from the `git repository`_, feedback, as well as any bug reports or
fixes are highly appreciated.

.. _cheese shop: https://pypi.python.org/pypi/pywayland/
.. _git repository: https://github.com/flacjacket/pywayland/

Dependencies
------------

PyWayland requires six_ and cffi_ to run on Python >=3.4.  On lower Python
versions, enum34_ is required.  PyWayland is tested against Python 2.7, 3.2+,
PyPy, and PyPy3 (see `Running Tests`_).

.. _cffi: https://cffi.readthedocs.org/
.. _enum34: https://pypi.python.org/pypi/enum34/
.. _six: https://pythonhosted.org/six/

Building Wayland protocols
--------------------------

In order to run, you will need to generate the interfaces to the Wayland
protocol objects as defined in the wayland.xml file.  By default, this file
will be located in ``/usr/share/wayland/wayland.xml``.  In this case, the
protocol files can be generated by the scanner by simply running the script::

    $ python ./bin/pywayland-scanner.py

See the help for this script to use non-default locations for the input and
output of the scanner.

The scanner is installed as a script ``pywayland-scanner.py`` when PyWayland is
installed.

Running Tests
-------------

PyWayland implements a (currently limited) test-suite in ``./tests``.  The
tests can be run through ``py.test``.  Be sure you build the protocol files
(see `Building Wayland protocols`_) before running the tests.

.. |travis| image:: https://travis-ci.org/flacjacket/pywayland.svg?branch=master
    :alt: Build Status
    :target: https://travis-ci.org/flacjacket/pywayland
.. |coveralls| image:: https://coveralls.io/repos/flacjacket/pywayland/badge.png?branch=master
    :alt: Build Coverage
    :target: https://coveralls.io/r/flacjacket/pywayland
