diff options
author | David Sommerseth <davids@redhat.com> | 2009-06-11 15:07:47 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-06-11 15:07:47 +0200 |
commit | 1d8478a6437e9eb4cd12c679c8dbd26dc2c344e1 (patch) | |
tree | 06a6003d71e273963b1aa78822214345209eb317 /src/setup-dbg.py | |
parent | 15463a7100a1d22ff2692f39d3a66f1d42eee3f7 (diff) | |
download | python-dmidecode-1d8478a6437e9eb4cd12c679c8dbd26dc2c344e1.tar.gz python-dmidecode-1d8478a6437e9eb4cd12c679c8dbd26dc2c344e1.tar.xz python-dmidecode-1d8478a6437e9eb4cd12c679c8dbd26dc2c344e1.zip |
Improved setup.py/setup-dbg.py even more
Get libxml2 compile time info from xml2-config. Retrieve
version number from src/version.h
Diffstat (limited to 'src/setup-dbg.py')
-rw-r--r-- | src/setup-dbg.py | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/setup-dbg.py b/src/setup-dbg.py index 9d297b0..30e6754 100644 --- a/src/setup-dbg.py +++ b/src/setup-dbg.py @@ -28,12 +28,29 @@ from distutils.core import setup, Extension from distutils.sysconfig import get_python_lib +from setup_common import * -libdir = get_python_lib(1) +# +# Some default values +# +incdir = [] +libdir = [get_python_lib(1)] +libs = [] + +# Get libxml2 info +libxml2_include(incdir) +libxml2_lib(libdir, libs) + +# misc info +dmidec_version = get_version() + +# +# Python setup +# setup( name = "python-dmidecode-dbg", - version = "3.10.6", + version = dmidec_version, license='GPL-2', description = "Python extension module for dmidecode", author = "Nima Talebi & David Sommerseth", @@ -52,9 +69,9 @@ setup( "src/dmierror.c", "src/xmlpythonizer.c" ], - include_dirs = [ "/usr/include/libxml2" ], - library_dirs = [ libdir ], - libraries = [ "xml2", "xml2mod" ], + include_dirs = incdir, + library_dirs = libdir, + libraries = libs, undef_macros = [ "NDEBUG" ] ) ], |