1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--- a/pytevent.c
+++ b/pytevent.c
@@ -761,4 +761,6 @@ void init_tevent(void)
Py_INCREF(&TeventFd_Type);
PyModule_AddObject(m, "Fd", (PyObject *)&TeventFd_Type);
+
+ PyModule_AddObject(m, "__version__", PyString_FromString(PACKAGE_VERSION));
}
--- a/wscript
+++ b/wscript
@@ -92,7 +92,14 @@
'pytevent.c',
deps='tevent',
enabled=True,
- realname='_tevent.so')
+ realname='_tevent.so',
+ cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
+ # install out various python scripts for use by make test
+ bld.SAMBA_SCRIPT('tevent_python',
+ pattern='tevent.py',
+ installdir='python')
+
+ bld.INSTALL_WILDCARD('${PYTHONDIR}', 'tevent.py', flat=False)
def test(ctx):
|