Skip to content

Commit d8f2117

Browse files
Updated project details, such as homepage, download url, etc.
1 parent 4050103 commit d8f2117

7 files changed

Lines changed: 122 additions & 80 deletions

File tree

COPYING

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,3 +620,57 @@ Program, unless a warranty or assumption of liability accompanies a
620620
copy of the Program in return for a fee.
621621

622622
END OF TERMS AND CONDITIONS
623+
624+
How to Apply These Terms to Your New Programs
625+
626+
If you develop a new program, and you want it to be of the greatest
627+
possible use to the public, the best way to achieve this is to make it
628+
free software which everyone can redistribute and change under these terms.
629+
630+
To do so, attach the following notices to the program. It is safest
631+
to attach them to the start of each source file to most effectively
632+
state the exclusion of warranty; and each file should have at least
633+
the "copyright" line and a pointer to where the full notice is found.
634+
635+
<one line to give the program's name and a brief idea of what it does.>
636+
Copyright (C) <year> <name of author>
637+
638+
This program is free software: you can redistribute it and/or modify
639+
it under the terms of the GNU General Public License as published by
640+
the Free Software Foundation, either version 3 of the License, or
641+
(at your option) any later version.
642+
643+
This program is distributed in the hope that it will be useful,
644+
but WITHOUT ANY WARRANTY; without even the implied warranty of
645+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
646+
GNU General Public License for more details.
647+
648+
You should have received a copy of the GNU General Public License
649+
along with this program. If not, see <http://www.gnu.org/licenses/>.
650+
651+
Also add information on how to contact you by electronic and paper mail.
652+
653+
If the program does terminal interaction, make it output a short
654+
notice like this when it starts in an interactive mode:
655+
656+
<program> Copyright (C) <year> <name of author>
657+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
658+
This is free software, and you are welcome to redistribute it
659+
under certain conditions; type `show c' for details.
660+
661+
The hypothetical commands `show w' and `show c' should show the appropriate
662+
parts of the General Public License. Of course, your program's commands
663+
might be different; for a GUI interface, you would use an "about box".
664+
665+
You should also get your employer (if you work as a programmer) or school,
666+
if any, to sign a "copyright disclaimer" for the program, if necessary.
667+
For more information on this, and how to apply and follow the GNU GPL, see
668+
<http://www.gnu.org/licenses/>.
669+
670+
The GNU General Public License does not permit incorporating your program
671+
into proprietary programs. If your program is a subroutine library, you
672+
may consider it more useful to permit linking proprietary applications with
673+
the library. If this is what you want to do, use the GNU Lesser General
674+
Public License instead of this License. But first, please read
675+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
676+

NEWS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
0.4
22

3-
- Libsuinput is included in the distribution.
4-
- Licensed under GPLv3.
3+
- Updated project details, such as homepage, download url, etc.
54

65
0.3.3
76

README

Lines changed: 34 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
=======================================================
2-
python-uinput - Python API to the Linux uinput-system
3-
=======================================================
1+
===============
2+
python-uinput
3+
===============
44

5-
.. contents::
5+
Python API to the Linux uinput-system.
66

77
Description
88
===========
@@ -13,55 +13,38 @@ Python-uinput provides a simple and easy to use API to the Linux uinput-system.
1313
General information
1414
===================
1515

16-
- **Author**: `Tuomas Räsänen (tuos) <http://tuos.codegrove.org/>`_ <tuos@codegrove.org>
16+
- **Author**: Tuomas Räsänen (tuos) <tuos@codegrove.org>
1717
- **Homepage**: http://codegrove.org/projects/python-uinput/
18-
- **License**: GPLv3 (see COPYING for details)
18+
- **License**: GPLv3+ (see COPYING for details)
1919
- **Version**: 0.4
2020

21-
Requirements
22-
============
21+
Build requirements
22+
==================
2323

24-
- Python 2.5.x+ and development files for it:
24+
- Python 2.5 or 2.6.
25+
- Python development files.
26+
- Libsuinput development files.
2527

26-
- On Ubuntu (from Codegrove ppa)::
28+
Runtime requirements
29+
====================
2730

28-
sudo apt-get install python-dev
31+
- Libsuinput.
32+
- Uinput-module installed::
2933

30-
- libsuinput-dev
34+
# For the current run:
35+
sudo modprobe -i uinput
36+
# To load uinput at boot time:
37+
grep -q ^uinput /etc/modules || sudo sh -c 'echo uinput >> /etc/modules'
3138

32-
- On Ubuntu (from Codegrove ppa)::
33-
34-
sudo apt-get install libsuinput-dev
35-
36-
Example usage
37-
=============
38-
39-
Create and use a new uinput device with key-capabilities::
40-
41-
import uinput
42-
43-
device = uinput.Device()
44-
device.capabilities = {
45-
uinput.EV_KEY: (uinput.KEY_E, uinput.KEY_H, uinput.KEY_L, uinput.KEY_O),
46-
}
47-
48-
device.emit(uinput.EV_KEY, uinput.KEY_H, 1) # Press.
49-
device.emit(uinput.EV_KEY, uinput.KEY_H, 0) # Release.
50-
device.emit(uinput.EV_KEY, uinput.KEY_E, 1)
51-
device.emit(uinput.EV_KEY, uinput.KEY_E, 0)
52-
device.emit(uinput.EV_KEY, uinput.KEY_L, 1)
53-
device.emit(uinput.EV_KEY, uinput.KEY_L, 0)
54-
device.emit(uinput.EV_KEY, uinput.KEY_L, 1)
55-
device.emit(uinput.EV_KEY, uinput.KEY_L, 0)
56-
device.emit(uinput.EV_KEY, uinput.KEY_O, 1)
57-
device.emit(uinput.EV_KEY, uinput.KEY_O, 0)
39+
- Write permissions to /dev/uinput. Normally only root is permitted to
40+
write.
5841

5942
Downloading
6043
===========
6144

6245
- Ubuntu package: https://launchpad.net/~tuos/+archive/codegrove
63-
- Tarball is available at: http://pypi.python.org/packages/source/p/python-uinput/python-uinput-0.4.tar.gz
64-
- Latest sources from public bzr-repository: http://code.launchpad.net/python-uinput ::
46+
- Tarball: http://pypi.python.org/packages/source/p/python-uinput/python-uinput-0.4.tar.gz
47+
- Development: http://code.launchpad.net/python-uinput ::
6548

6649
bzr branch lp:python-uinput
6750

@@ -71,18 +54,24 @@ Installing
7154
Ubuntu
7255
------
7356

74-
The recommended way to install python-uinput is to
75-
`add it's PPA to your system <https://launchpad.net/~tuos/+archive/codegrove>`_.
76-
This allows you to treat python-uinput as any other Ubuntu package.
57+
Ubuntu
58+
------
59+
60+
Add `Codegrove PPA`_ to your system and install using standard tools. For
61+
example with apt-get::
62+
63+
sudo apt-get install python-uinput
64+
65+
.. _Codegrove PPA: https://launchpad.net/~tuos/+archive/codegrove
7766

7867
Other systems
7968
-------------
8069

81-
The install-procedure adheres the "standard"::
70+
Satisfy the requirements listed above and then build and install normally::
8271

8372
python setup build && sudo python setup install
8473

8574
Bug reporting
8675
=============
8776

88-
Report bugs at http://bugs.launchpad.net/python-uinput .
77+
Please report bugs at http://bugs.launchpad.net/python-uinput .

setup.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,16 @@
1515
)
1616

1717
setup(name='python-uinput',
18-
provides='uinput',
1918
version='0.4',
2019
description='Python API to the Linux uinput-system.',
2120
author='Tuomas Räsänen (tuos)',
2221
author_email='tuos@codegrove.org',
2322
url='http://codegrove.org/projects/python-uinput/',
2423
download_url='http://pypi.python.org/packages/source/p/python-uinput/python-uinput-0.4.tar.gz',
25-
package_dir={
26-
'uinput': 'src',
27-
},
28-
packages=[
29-
'uinput',
30-
],
24+
package_dir={'uinput': 'src'},
25+
packages=['uinput'],
3126
ext_modules=[suinput_module, bustypes_module],
32-
license='License :: OSI Approved :: GNU General Public License (GPL)',
27+
license='GPLv3+',
3328
platforms=['Linux'],
3429
classifiers=[
3530
"Development Status :: 3 - Alpha",
@@ -38,9 +33,11 @@
3833
"Operating System :: POSIX :: Linux",
3934
"Topic :: System :: Operating System Kernels :: Linux",
4035
"Programming Language :: Python :: 2.5",
36+
"Programming Language :: Python :: 2.6",
4137
"Programming Language :: C",
4238
],
4339
long_description="""
44-
A high-level API for generating Linux input events.
40+
Uinput allows attaching user-space device drivers into the Linux kernel.
41+
Python-uinput provides a simple and easy to use API to the Linux uinput-system.
4542
""",
4643
)

src/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Copyright © 2010 Tuomas Räsänen (tuos) <tuos@codegrove.org>
44

55
# This program is free software: you can redistribute it and/or modify
6-
# it under the terms of the GNU General Public License version 3 as
7-
# published by the Free Software Foundation.
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
89

910
# This program is distributed in the hope that it will be useful,
1011
# but WITHOUT ANY WARRANTY; without even the implied warranty of

src/bustypesmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
Copyright © 2010 Tuomas Räsänen (tuos) <tuos@codegrove.org>
44
55
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License version 3 as
7-
published by the Free Software Foundation.
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
89
910
This program is distributed in the hope that it will be useful,
1011
but WITHOUT ANY WARRANTY; without even the implied warranty of

src/suinputmodule.c

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
Copyright © 2010 Tuomas Räsänen (tuos) <tuos@codegrove.org>
44
55
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License version 3 as
7-
published by the Free Software Foundation.
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
89
910
This program is distributed in the hope that it will be useful,
1011
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -185,35 +186,35 @@ static PyObject *pysuinput_destroy(PyObject *self, PyObject *args)
185186
}
186187

187188
static PyMethodDef pysuinputMethods[] = {
188-
{"open", pysuinput_open, METH_VARARGS,
189-
"open()\n\n"
190-
"Open an uinput device and return a file descriptor."
189+
{"uinput_open", pysuinput_open, METH_VARARGS,
190+
"uinput_open()\n\n"
191+
"Open the uinput device and return a file descriptor."
191192
},
192193

193-
{"write", pysuinput_write, METH_VARARGS,
194-
"write(uinput_fd, ev_type, ev_code, ev_value)\n\n"
195-
"Write an event to the uinput device.\n"
194+
{"uinput_write", pysuinput_write, METH_VARARGS,
195+
"uinput_write(uinput_fd, ev_type, ev_code, ev_value)\n\n"
196+
"Destory and close the uinput device.\n"
196197
},
197198

198-
{"set_capabilities", pysuinput_set_capabilities, METH_VARARGS,
199-
"set_capabilities(uinput_fd, ev_type, capabilities)\n\n"
200-
"Set the capabilities of the uinput device.\n"
199+
{"uinput_set_capabilities", pysuinput_set_capabilities, METH_VARARGS,
200+
"uinput_set_capabilities(uinput_fd, ev_type, capabilities)\n\n"
201+
"Destory and close the uinput device.\n"
201202
},
202203

203-
{"syn", pysuinput_syn, METH_VARARGS,
204-
"syn(uinput_fd, ev_type, ev_code, ev_value)\n\n"
205-
"Write EV_SYN event to the uinput device.\n"
204+
{"uinput_syn", pysuinput_syn, METH_VARARGS,
205+
"uinput_syn(uinput_fd, ev_type, ev_code, ev_value)\n\n"
206+
"Destory and close the uinput device.\n"
206207
},
207208

208-
{"destroy", pysuinput_destroy, METH_VARARGS,
209-
"destroy(uinput_fd)\n\n"
209+
{"uinput_destroy", pysuinput_destroy, METH_VARARGS,
210+
"uinput_destroy(uinput_fd)\n\n"
210211
"Destory and close the uinput device.\n"
211212
},
212213

213-
{"create", pysuinput_create, METH_VARARGS,
214-
"create(uinput_fd, name, bustype, vendor, product, version,\n"
215-
" ff_effects_max, absmin, absmax, absfuzz, absflat)\n\n"
216-
"Create and initialize the uinput device with giver parameters.\n"
214+
{"uinput_create", pysuinput_create, METH_VARARGS,
215+
"uinput_create(uinput_fd, name, bustype, vendor, product, version,\n"
216+
" ff_effects_max, absmin, absmax, absfuzz, absflat)\n\n"
217+
"Destory and close the uinput device.\n"
217218
},
218219

219220
{NULL, NULL, 0, NULL}

0 commit comments

Comments
 (0)