Corrected Python build.

This commit is contained in:
John Wiegley 2007-05-11 07:24:35 +00:00
parent c59d56d596
commit 7006be5ba1
7 changed files with 18 additions and 16 deletions

View file

@ -31,7 +31,9 @@
#include "utils.h" #include "utils.h"
#include "option.h" #include "option.h"
#if defined(HAVE_EXPAT) || defined(HAVE_XMLPARSE)
#include "gnucash.h" #include "gnucash.h"
#endif
#include "qif.h" #include "qif.h"
#include "ofx.h" #include "ofx.h"

View file

@ -35,6 +35,7 @@
#include <boost/python/exception_translator.hpp> #include <boost/python/exception_translator.hpp>
#include <boost/python/implicit.hpp> #include <boost/python/implicit.hpp>
#include <boost/python/args.hpp>
namespace ledger { namespace ledger {
@ -139,7 +140,7 @@ void export_amount()
.def(init<long>()) .def(init<long>())
.def(init<std::string>()) .def(init<std::string>())
.def("exact", &amount_t::exact, arg("value"), .def("exact", &amount_t::exact, boost::python::arg("value"),
"Construct an amount object whose display precision is always equal to its\n\ "Construct an amount object whose display precision is always equal to its\n\
internal precision.") internal precision.")
.staticmethod("exact") .staticmethod("exact")

View file

@ -31,7 +31,6 @@
#include "pyinterp.h" #include "pyinterp.h"
#include "pyutils.h" #include "pyutils.h"
#include "pyfstream.h"
#include <boost/python/module.hpp> #include <boost/python/module.hpp>
#include <boost/python/def.hpp> #include <boost/python/def.hpp>

View file

@ -39,8 +39,6 @@
#include <boost/python.hpp> #include <boost/python.hpp>
#include <Python.h> #include <Python.h>
#include "pyfstream.h"
namespace ledger { namespace ledger {
class python_interpreter_t : public xml::xpath_t::scope_t class python_interpreter_t : public xml::xpath_t::scope_t

View file

@ -32,6 +32,8 @@
#ifndef _PY_UTILS_H #ifndef _PY_UTILS_H
#define _PY_UTILS_H #define _PY_UTILS_H
#include "pyfstream.h"
template <typename T, typename TfromPy> template <typename T, typename TfromPy>
struct object_from_python struct object_from_python
{ {

View file

@ -435,6 +435,8 @@ document_t * document_t::parser_t::parse(std::istream& in)
return doc.release(); return doc.release();
} }
#endif // HAVE_EXPAT || HAVE_XMLPARSE
node_t * commodity_node_t::children() const node_t * commodity_node_t::children() const
{ {
// jww (2007-04-19): Need to report the commodity and its details // jww (2007-04-19): Need to report the commodity and its details
@ -558,8 +560,6 @@ node_t * journal_node_t::children() const
return parent_node_t::children(); return parent_node_t::children();
} }
#endif // defined(HAVE_EXPAT) || defined(HAVE_XMLPARSE)
void output_xml_string(std::ostream& out, const string& str) void output_xml_string(std::ostream& out, const string& str)
{ {
for (const char * s = str.c_str(); *s; s++) { for (const char * s = str.c_str(); *s; s++) {
@ -568,7 +568,7 @@ void output_xml_string(std::ostream& out, const string& str)
out << "&lt;"; out << "&lt;";
break; break;
case '>': case '>':
out << "&rt;"; out << "&gt;";
break; break;
case '&': case '&':
out << "&amp;"; out << "&amp;";

View file

@ -44,17 +44,17 @@ function build_ledger() {
make fullcheck || exit 1 make fullcheck || exit 1
} }
#build_distcheck build_distcheck || exit 1
build_ledger normal build_ledger normal || exit 1
build_ledger devel --devel build_ledger devel --devel || exit 1
build_ledger python --python build_ledger python --python || exit 1
build_ledger debug --debug build_ledger debug --debug || exit 1
#build_ledger boost_debug --debug --boost d #build_ledger boost_debug --debug --boost d || exit 1
build_ledger debug_python --debug --python build_ledger debug_python --debug --python || exit 1
build_ledger optimized --opt build_ledger optimized --opt || exit 1
build_ledger opt_python --opt --python build_ledger opt_python --opt --python || exit 1
exit 0 exit 0