diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-24 02:40:17 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-24 02:40:17 -0400 |
commit | c715528f2f778a58b610d1e11cee2a5909b43d1f (patch) | |
tree | 7a69dc26ca1e1680c51052519cf46ad13ef36f40 | |
parent | 2c7593ae292ad8961d181cd580e6aa5f59e21b7a (diff) | |
download | fork-ledger-c715528f2f778a58b610d1e11cee2a5909b43d1f.tar.gz fork-ledger-c715528f2f778a58b610d1e11cee2a5909b43d1f.tar.bz2 fork-ledger-c715528f2f778a58b610d1e11cee2a5909b43d1f.zip |
conditionalized the reference to xmlparse and xmltok from setup.py
-rw-r--r-- | Makefile.am | 8 | ||||
-rwxr-xr-x | setup.py | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index b3f7c17a..019fe80b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -78,12 +78,20 @@ if HAVE_BOOST_PYTHON noinst_PROGRAMS = ledger.so +if READ_GNUCASH +READ_GNUCASH_VALUE = true +else +READ_GNUCASH_VALUE = false +endif + ledger.so: python.cc libledger.la CFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -L. -L.libs" \ + READ_GNUCASH="$(READ_GNUCASH_VALUE)" \ python setup.py build --build-lib=. install-exec-hook: CFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -L. -L.libs" \ + READ_GNUCASH="$(READ_GNUCASH_VALUE)" \ python setup.py install --prefix=$(prefix) endif @@ -2,7 +2,13 @@ from distutils.core import setup, Extension -libs = ["ledger", "boost_python", "gmp", "pcre", "xmlparse", "xmltok"] +import os + +libs = ["ledger", "boost_python", "gmp", "pcre"] + +if os.environ.has_key ("READ_GNUCASH") and\ + os.environ["READ_GNUCASH"] == "true": + libs.extend (["xmlparse", "xmltok"]) setup(name = "Ledger", version = "2.0b", |