summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2011-01-19 14:58:02 +0100
committerDavid Sommerseth <davids@redhat.com>2011-01-19 14:58:02 +0100
commite842b88809a9e2949be6aa8c63dc29b152f7bb3b (patch)
treeb166b368c2d32dd9a219b213d4f43f5cac825856 /setup.py
parent2347ee3736a9c3e753b5f98aff7b1089269fe895 (diff)
downloadpython-ethtool-e842b88809a9e2949be6aa8c63dc29b152f7bb3b.tar.gz
python-ethtool-e842b88809a9e2949be6aa8c63dc29b152f7bb3b.tar.xz
python-ethtool-e842b88809a9e2949be6aa8c63dc29b152f7bb3b.zip
Added ethtool.version string constant
This is useful to identify the python-ethtool version at runtime. Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 5 insertions, 2 deletions
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)]
)
]
)