summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python-ethtool/ethtool.c1
-rw-r--r--setup.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c
index feb6917..a29f052 100644
--- a/python-ethtool/ethtool.c
+++ b/python-ethtool/ethtool.c
@@ -1058,5 +1058,6 @@ PyMODINIT_FUNC initethtool(void)
PyModule_AddIntConstant(m, "IFF_DYNAMIC", IFF_DYNAMIC); /* Dialup device with changing addresses. */
PyModule_AddIntConstant(m, "AF_INET", AF_INET); /* IPv4 interface */
PyModule_AddIntConstant(m, "AF_INET6", AF_INET6); /* IPv6 interface */
+ PyModule_AddStringConstant(m, "version", "python-ethtool v" VERSION);
}
diff --git a/setup.py b/setup.py
index aa56d96..bde04dc 100644
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,8 @@ from distutils.core import setup, Extension
import commands
import sys
+version = '0.6'
+
ethtool = Extension('ethtool',
sources = ['python-ethtool/ethtool.c',
'python-ethtool/etherinfo.c', 'python-ethtool/etherinfo_obj.c'])
@@ -49,7 +51,7 @@ libnl = pkgconfig('libnl-1')
# don't reformat this line, Makefile parses it
setup(name='ethtool',
- version='0.2',
+ version=version,
description='Python module to interface with ethtool',
author='Harald Hoyer & Arnaldo Carvalho de Melo',
author_email='acme@redhat.com',
@@ -64,7 +66,8 @@ setup(name='ethtool',
'python-ethtool/etherinfo_ipv6_obj.c'],
include_dirs = libnl['include'],
library_dirs = libnl['libdirs'],
- libraries = libnl['libs']
+ libraries = libnl['libs'],
+ define_macros = [('VERSION', '"%s"' % version)]
)
]
)