From 2ed8a0e7cb6cbdeec1c1c49e7aedf03188e72017 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 2 Apr 2009 19:27:30 +0200 Subject: Modified setup.py to compile in dmixml.c and link against libxml2 --- src/setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index b0999b5..6272e85 100644 --- a/src/setup.py +++ b/src/setup.py @@ -15,10 +15,12 @@ setup( "src/dmihelper.c", "src/util.c", "src/dmioem.c", - "src/dmidecode.c" + "src/dmidecode.c", + "src/dmixml.c" ], + include_dirs = [ "/usr/include/libxml2" ], library_dirs = [ "/home/nima/dev-room/projects/dmidecode" ], - libraries = [ "util" ], + libraries = [ "util", "xml2" ], #libraries = [ "util", "efence" ], ) ] -- cgit From c7be629d44d4e2be6c8116796714e0042a977885 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Tue, 28 Apr 2009 11:12:58 +0200 Subject: Added generic XML -> Python parser The xmlpythonizer module will convert any XML data (xmlNode or xmlDoc) and format it as a Python object. The formatting is defined in it's own XML file. Basic format: The keytype and key attributes defines the key in the Python Dict. The root element will always be a Python Dict structure. The valid key types are: * constant Uses the value in {key} as the key value * string, integer, float Uses a string value from the data XML to be converted to Python. The value set in the key attribute defines an XPath value which points to the data to be used as a Python dict key. Since Python only supports C strings in the C interface for Python dict keys, integer and float will be treated as strings. The valuetype and value attributes are similar to the keys, but with some more features. Valid valuetypes are: * constant The value given in the value attribute will be used in the value in the Python result. * string, integer, float The value given in the value attribute defines the XPath to the data XML, of where to retrieve the value for the given key. The valuetype defines if the data should be understood as a string, integer or float in the Python result. * list:string, list:integer, list:float This does the same as the string, integer or float type, with a tweak. The data will be put into a list. If the XPath given returns multiple nodes, all of them will be added to this list. * dict The dict valuetype is more special. It should not contain any value attribute. On the other hand, it should contain a sub-level of tags. In this way, you can build up a multi dimensional Python dict. Example: ** pythonmap.xml ** ** exampledata.xml ** String value #1 More test data Value1 in list Value2 in list Value3 in list ** C code snippet ** void xmlpythonizer() { xmlDoc *xmlmap = NULL; xmlDoc *xmldata = NULL; ptzMAP *mapping = NULL; PyObject *pythondata = NULL; // Read XML files xmlmap = xmlReadFile("pythonmap.xml", NULL, 0); xmldata = xmlReadFile("exampledata.xml", NULL, 0); // Parse the mapping XML mapping = dmiMAP_ParseMappingXML(xmlmap, "example_map"); // Parse the xmldata into a Python object pythondata = pythonizeXMLdoc(mapping, xmldata); // ..... the program continues to do something useful } The result stored inside the pythondata object should now be something similar to: {'DemoCase': 'XML Pythonizing', 'String1': 'String value #1', 'AttribString1: 1234, 'TestData': {'Value1': 'More test data', 'ValueList': ['Value1 in list','Value2 in list','Value3 in list']} } --- src/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 6272e85..ec66c3f 100644 --- a/src/setup.py +++ b/src/setup.py @@ -16,7 +16,8 @@ setup( "src/util.c", "src/dmioem.c", "src/dmidecode.c", - "src/dmixml.c" + "src/dmixml.c", + "src/xmlpythonizer.c" ], include_dirs = [ "/usr/include/libxml2" ], library_dirs = [ "/home/nima/dev-room/projects/dmidecode" ], -- cgit From 268687f5b525ce4bdb1becd5a5207bfc2ced8340 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Tue, 28 Apr 2009 00:55:28 +1000 Subject: Version number fix --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index ec66c3f..cf07c9b 100644 --- a/src/setup.py +++ b/src/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup, Extension setup( name = "python-dmidecode", - version = "2.10.3", + version = "2.10.5", description = "Python extension module for dmidecode", author = "Nima Talebi", author_email = "nima@autonomy.net.au", -- cgit From df5ddd3f51a353d03f2bd6a27c5d9ce14f077f41 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Thu, 21 May 2009 00:05:58 +1000 Subject: Bringing setup files upto date --- src/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index cf07c9b..c53dc17 100644 --- a/src/setup.py +++ b/src/setup.py @@ -4,9 +4,9 @@ setup( name = "python-dmidecode", version = "2.10.5", description = "Python extension module for dmidecode", - author = "Nima Talebi", - author_email = "nima@autonomy.net.au", - url = "http://projects.autonomy.net.au/dmidecode/", + author = "Nima Talebi & David Sommerseth", + author_email = "nima@it.net.au, davids@redhat.com", + url = "http://projects.autonomy.net.au/python-dmidecode/", ext_modules = [ Extension( "dmidecode", -- cgit From d06d776adb0fef9504bd7662760e4cd0971fb748 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Fri, 22 May 2009 23:49:55 +1000 Subject: Reversioned, relicensed, and rejigged The version is of now, v3.10.6. The version major field has been upped due to the newly added XML functionality. The version has been reverted to GPLv2. Some headers have been cleaned up, copyright notices added etc. Credits given where due. --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index c53dc17..7596cba 100644 --- a/src/setup.py +++ b/src/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup, Extension setup( name = "python-dmidecode", - version = "2.10.5", + version = "3.10.5", description = "Python extension module for dmidecode", author = "Nima Talebi & David Sommerseth", author_email = "nima@it.net.au, davids@redhat.com", -- cgit From 3acedf5a988eab36f238979548cc79545bd7dced Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Sat, 23 May 2009 13:24:02 +1000 Subject: Final cleanup --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 7596cba..8c6fb03 100644 --- a/src/setup.py +++ b/src/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup, Extension setup( name = "python-dmidecode", - version = "3.10.5", + version = "3.10.6", description = "Python extension module for dmidecode", author = "Nima Talebi & David Sommerseth", author_email = "nima@it.net.au, davids@redhat.com", -- cgit From 90c5bac90b3366b897d7c34a4bba2a31e608b62c Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Sat, 23 May 2009 13:53:28 +1000 Subject: Updating Debian-specifics --- src/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 8c6fb03..ded7db4 100644 --- a/src/setup.py +++ b/src/setup.py @@ -3,6 +3,7 @@ from distutils.core import setup, Extension setup( name = "python-dmidecode", version = "3.10.6", + license='GPL-2', description = "Python extension module for dmidecode", author = "Nima Talebi & David Sommerseth", author_email = "nima@it.net.au, davids@redhat.com", @@ -22,7 +23,7 @@ setup( include_dirs = [ "/usr/include/libxml2" ], library_dirs = [ "/home/nima/dev-room/projects/dmidecode" ], libraries = [ "util", "xml2" ], - #libraries = [ "util", "efence" ], + data_files = [ ('share/python-dmidecode', ['src/pythonmap.xml']) ] ) ] ) -- cgit From a18a72fab2a622077d5257003b09be30ab283339 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Sat, 23 May 2009 14:37:01 +1000 Subject: More cleanup Don't write to stdout unless in debug mode (with respect to writing to memory devices. Added the xml datafile to setup (distutils). Updated test case (incorporating color and cleaning up tests). --- src/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index ded7db4..f9904af 100644 --- a/src/setup.py +++ b/src/setup.py @@ -8,6 +8,7 @@ setup( author = "Nima Talebi & David Sommerseth", author_email = "nima@it.net.au, davids@redhat.com", url = "http://projects.autonomy.net.au/python-dmidecode/", + data_files = [ ('share/python-dmidecode', ['src/pythonmap.xml']) ], ext_modules = [ Extension( "dmidecode", @@ -22,8 +23,7 @@ setup( ], include_dirs = [ "/usr/include/libxml2" ], library_dirs = [ "/home/nima/dev-room/projects/dmidecode" ], - libraries = [ "util", "xml2" ], - data_files = [ ('share/python-dmidecode', ['src/pythonmap.xml']) ] + libraries = [ "util", "xml2" ] ) ] ) -- cgit From 64d2c31c902439eb0e62471fe97086bf217e7926 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Sun, 24 May 2009 04:09:58 +1000 Subject: Follow-up on recent XML config file rename --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index f9904af..dde35eb 100644 --- a/src/setup.py +++ b/src/setup.py @@ -8,7 +8,7 @@ setup( author = "Nima Talebi & David Sommerseth", author_email = "nima@it.net.au, davids@redhat.com", url = "http://projects.autonomy.net.au/python-dmidecode/", - data_files = [ ('share/python-dmidecode', ['src/pythonmap.xml']) ], + data_files = [ ('share/python-dmidecode', ['src/py-map.xml', 'src/py-typemap.xml']) ], ext_modules = [ Extension( "dmidecode", -- cgit From 13ff9d7e48ab1574b36473f75701cc7f7c1e461a Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Wed, 27 May 2009 00:11:54 +1000 Subject: WIP commit Merged the two XML files into one, and amended relevant code. I still want to modify the XML tag names, but not yet. The calls to dmidecode.type() not function as expected, but the others are broken - this is next. --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index dde35eb..bb79a14 100644 --- a/src/setup.py +++ b/src/setup.py @@ -8,7 +8,7 @@ setup( author = "Nima Talebi & David Sommerseth", author_email = "nima@it.net.au, davids@redhat.com", url = "http://projects.autonomy.net.au/python-dmidecode/", - data_files = [ ('share/python-dmidecode', ['src/py-map.xml', 'src/py-typemap.xml']) ], + data_files = [ ('share/python-dmidecode', ['src/pymap.xml']) ], ext_modules = [ Extension( "dmidecode", -- cgit From 62ae0e75016b31aa3062f296ed070e0610f0b98f Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 3 Jun 2009 15:22:23 +0200 Subject: Removed some dead code --- src/setup.py | 1 - 1 file changed, 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index bb79a14..dd78087 100644 --- a/src/setup.py +++ b/src/setup.py @@ -14,7 +14,6 @@ setup( "dmidecode", sources = [ "src/dmidecodemodule.c", - "src/dmihelper.c", "src/util.c", "src/dmioem.c", "src/dmidecode.c", -- cgit From 23e77d69afdd720456a88f2ab57c69b240c08b6a Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Tue, 9 Jun 2009 21:19:01 +0200 Subject: Remember to compile in dmierror.c ;-) --- src/setup.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index dd78087..b02bdf0 100644 --- a/src/setup.py +++ b/src/setup.py @@ -18,6 +18,7 @@ setup( "src/dmioem.c", "src/dmidecode.c", "src/dmixml.c", + "src/dmierror.c", "src/xmlpythonizer.c" ], include_dirs = [ "/usr/include/libxml2" ], -- cgit From b25b2ca548508cd2beb26f465b7bc5a296592461 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 10 Jun 2009 11:43:56 +0200 Subject: Implemented native libxml2 XML API for dmidecode To use this API, you need to import dmidecodeXML. This is a wrapper class for the internal XML API which has been implemented. In addition, you might also want to import libxml2 as well. dmidecodeXML::QuerySection() Valid section strings can be found in the pymap.xml file, in the tag section. dmidecodeXML::TypeId() Valid values should match the DMI/SMBIOS specification. dmidecodeXML::SetResultType(resultType) Result type can be either dmidecodeXML.DMIXML_NODE or dmidecodeXML.DMIXML_DOC ---------------------------------------------------------- import libxml2 import dmidecodeXML dmixml = dmidecodeXML.dmidecodeXML() section_nodes = dmixml.QuerySection('processor') dmixml.SetResultType(dmidecodeXML.DMIXML_DOC) typeid_doc = dmixml.QueryTypeId(0x10) dmixml.SetResultType(dmidecodeXML.DMIXML_NODE) typeid_doc.saveFormatFileEnc("-", "UTF-8", 1) ---------------------------------------------------------- --- src/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index b02bdf0..54b0357 100644 --- a/src/setup.py +++ b/src/setup.py @@ -22,8 +22,8 @@ setup( "src/xmlpythonizer.c" ], include_dirs = [ "/usr/include/libxml2" ], - library_dirs = [ "/home/nima/dev-room/projects/dmidecode" ], - libraries = [ "util", "xml2" ] + library_dirs = [ "/home/nima/dev-room/projects/dmidecode", "/usr/lib64/python2.5/site-packages"], + libraries = [ "util", "xml2", "xml2mod" ] ) ] ) -- cgit From 65c9384ec9b6e265aba11227ffa37ae7a6a787d1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 10 Jun 2009 18:57:42 +0200 Subject: Fixed import issues with dmidecode As we now include libxml2 and the required libxml2mod (which is used to wrap xmlDoc and xmlNode data into Python objects), importing only dmidecode caused a failure. If adding import libxml2 first, everything would work out fine. To avoid this issue, due to backwards compatibility, a tiny dmidecode wrapper is implemted as well. The dmidecode.so module is now renamed to dmidecodemodule.so, and the wrapper is now called dmidecode.py. To simplify things, the dmidecodeXML module introduced in commit b25b2ca548508cd2beb26f465b7bc5a296592461 is not merged into the new dmidecode.py The constants mentioned are now called dmidecode.DMIXML_NODE and dmidecode.DMIXML_DOC and to instantiate the dmidecodeXML class, dmidecode.dmidecodeXML() is used. --- src/setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 54b0357..b45775a 100644 --- a/src/setup.py +++ b/src/setup.py @@ -11,7 +11,7 @@ setup( data_files = [ ('share/python-dmidecode', ['src/pymap.xml']) ], ext_modules = [ Extension( - "dmidecode", + "dmidecodemodule", sources = [ "src/dmidecodemodule.c", "src/util.c", @@ -25,5 +25,6 @@ setup( library_dirs = [ "/home/nima/dev-room/projects/dmidecode", "/usr/lib64/python2.5/site-packages"], libraries = [ "util", "xml2", "xml2mod" ] ) - ] + ], + py_modules = [ "dmidecode" ] ) -- cgit From 541ee10989640f028d777c9341c63573aac4a55f Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 10 Jun 2009 19:30:28 +0200 Subject: Discovered another issue with Python and imports The shard library got renamed to dmidecodemodule.so, and this was not clever. When you do 'import dmidecode' in Python, it will look for files in this order: dmidecode dmidecode.so dmidecodemodule.so dmidecode.py dmidecode.pyc This is of course a problem when the wrapper introduced in commit 65c9384ec9b6e265aba11227ffa37ae7a6a787d1 is called dmidecode.py, and Python attempts to load dmidecodemodule.so before dmidecode.py. To solve this, dmidecodemodule.so is now renamed to dmidecodemod.so. --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index b45775a..d29cf96 100644 --- a/src/setup.py +++ b/src/setup.py @@ -11,7 +11,7 @@ setup( data_files = [ ('share/python-dmidecode', ['src/pymap.xml']) ], ext_modules = [ Extension( - "dmidecodemodule", + "dmidecodemod", sources = [ "src/dmidecodemodule.c", "src/util.c", -- cgit From 2ec1a9dc724582241456a3566ea213b2eec4d16f Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 10 Jun 2009 21:15:40 +0200 Subject: Cleaned up and fetch libdir from Python settings instead --- src/setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index d29cf96..d5d47f4 100644 --- a/src/setup.py +++ b/src/setup.py @@ -1,4 +1,7 @@ from distutils.core import setup, Extension +from distutils.sysconfig import get_python_lib + +libdir = get_python_lib(1) setup( name = "python-dmidecode", @@ -22,8 +25,8 @@ setup( "src/xmlpythonizer.c" ], include_dirs = [ "/usr/include/libxml2" ], - library_dirs = [ "/home/nima/dev-room/projects/dmidecode", "/usr/lib64/python2.5/site-packages"], - libraries = [ "util", "xml2", "xml2mod" ] + library_dirs = [ libdir ], + libraries = [ "xml2", "xml2mod" ] ) ], py_modules = [ "dmidecode" ] -- cgit From a8257055f3d5f474d601cb3a5cbcbdb44e2b707d Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 11 Jun 2009 13:34:26 +0200 Subject: Made sure copyright is in place and right people get their deserved credit --- src/setup.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index d5d47f4..8453e3b 100644 --- a/src/setup.py +++ b/src/setup.py @@ -1,3 +1,31 @@ +# +# setup.py +# Python distutil package setup +# +# Copyright 2009 David Sommerseth +# Copyright 2007-2009 Nima Talebi +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# For the avoidance of doubt the "preferred form" of this code is one which +# is in an open unpatent encumbered format. Where cryptographic key signing +# forms part of the process of creating an executable the information +# including keys needed to generate an equivalently functional executable +# are deemed to be part of the source code. +# + from distutils.core import setup, Extension from distutils.sysconfig import get_python_lib -- cgit From 1d8478a6437e9eb4cd12c679c8dbd26dc2c344e1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 11 Jun 2009 15:07:47 +0200 Subject: Improved setup.py/setup-dbg.py even more Get libxml2 compile time info from xml2-config. Retrieve version number from src/version.h --- src/setup.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 8453e3b..81f302a 100644 --- a/src/setup.py +++ b/src/setup.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", - 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 ) ], py_modules = [ "dmidecode" ] -- cgit From cb94510ce84cea18a675f1984cc8a3c955e6a2a4 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Wed, 17 Jun 2009 22:51:25 +1000 Subject: Commented in the Debian workaround for `xml2mod' --- src/setup.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 81f302a..a8ab032 100644 --- a/src/setup.py +++ b/src/setup.py @@ -34,6 +34,7 @@ from setup_common import * # Some default values # incdir = [] +#. XXX: Debian Workaound: libdir = [get_python_lib(1), "/usr/lib/pymodules/python%d.%d"%sys.version_info[0:2]] libdir = [get_python_lib(1)] libs = [] -- cgit From 3849ca0a4abf5eb661758e1341a6e595d3013c2c Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 18 Jun 2009 14:53:29 +0200 Subject: Splitted out SMBIOS/DMI dump functions from dmidecode.c to separate files --- src/setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index a8ab032..75be21b 100644 --- a/src/setup.py +++ b/src/setup.py @@ -68,7 +68,9 @@ setup( "src/dmidecode.c", "src/dmixml.c", "src/dmierror.c", - "src/xmlpythonizer.c" + "src/xmlpythonizer.c", + "src/efi.c", + "src/dmidump.c" ], include_dirs = incdir, library_dirs = libdir, -- cgit From ebb06f31e490f181b2e2267b0268421fda9b5d95 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 1 Jul 2009 15:04:00 +0200 Subject: Undefine NDEBUG in normal compiles as well. Arguments for doing so is that asserts are important to catch unhandled error situations and will help debugging if it fails in a production environment. --- src/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 75be21b..96b6133 100644 --- a/src/setup.py +++ b/src/setup.py @@ -74,7 +74,8 @@ setup( ], include_dirs = incdir, library_dirs = libdir, - libraries = libs + libraries = libs, + undef_macros = [ "NDEBUG" ] ) ], py_modules = [ "dmidecode" ] -- cgit From 392a9976b14d558d4b2f331b5a44ee97912fc5e3 Mon Sep 17 00:00:00 2001 From: Nima Talebi Date: Mon, 3 Aug 2009 20:16:22 +1000 Subject: Moved a OS-specific library settings out to common The libxml2 path is now handled by `setup_common.py', so the actual setup files are clean from any OS-specific (Debian/RedHat) hacks. --- src/setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index 96b6133..d33db64 100644 --- a/src/setup.py +++ b/src/setup.py @@ -27,15 +27,13 @@ # from distutils.core import setup, Extension -from distutils.sysconfig import get_python_lib from setup_common import * # # Some default values # incdir = [] -#. XXX: Debian Workaound: libdir = [get_python_lib(1), "/usr/lib/pymodules/python%d.%d"%sys.version_info[0:2]] -libdir = [get_python_lib(1)] +libdir = [] libs = [] # Get libxml2 info -- cgit