File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1058,5 +1058,6 @@ PyMODINIT_FUNC initethtool(void)
10581058 PyModule_AddIntConstant (m , "IFF_DYNAMIC" , IFF_DYNAMIC ); /* Dialup device with changing addresses. */
10591059 PyModule_AddIntConstant (m , "AF_INET" , AF_INET ); /* IPv4 interface */
10601060 PyModule_AddIntConstant (m , "AF_INET6" , AF_INET6 ); /* IPv6 interface */
1061+ PyModule_AddStringConstant (m , "version" , "python-ethtool v" VERSION );
10611062}
10621063
Original file line number Diff line number Diff line change 44import commands
55import sys
66
7+ version = '0.6'
8+
79ethtool = Extension ('ethtool' ,
810 sources = ['python-ethtool/ethtool.c' ,
911 'python-ethtool/etherinfo.c' , 'python-ethtool/etherinfo_obj.c' ])
@@ -49,7 +51,7 @@ def _str2list(pkgstr, onlystr):
4951
5052# don't reformat this line, Makefile parses it
5153setup (name = 'ethtool' ,
52- version = '0.2' ,
54+ version = version ,
5355 description = 'Python module to interface with ethtool' ,
5456 author = 'Harald Hoyer & Arnaldo Carvalho de Melo' ,
5557 author_email = 'acme@redhat.com' ,
@@ -64,7 +66,8 @@ def _str2list(pkgstr, onlystr):
6466 'python-ethtool/etherinfo_ipv6_obj.c' ],
6567 include_dirs = libnl ['include' ],
6668 library_dirs = libnl ['libdirs' ],
67- libraries = libnl ['libs' ]
69+ libraries = libnl ['libs' ],
70+ define_macros = [('VERSION' , '"%s"' % version )]
6871 )
6972 ]
7073)
You can’t perform that action at this time.
0 commit comments