summaryrefslogtreecommitdiff
path: root/setup.py
blob: 1fec814cedfb5cc2d710f0035883d767e35d7a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python

from distutils.core import setup, Extension

import os

defines = [('PYTHON_MODULE', 1)]

defines.extend ([('DEBUG_LEVEL', 4)])

libs = ["pyledger", "ledger", "boost_python", "gmp", "pcre"]

if os.environ.has_key ("HAVE_EXPAT") and\
   os.environ["HAVE_EXPAT"] == "true":
    libs.extend (["expat"])

if os.environ.has_key ("HAVE_XMLPARSE") and\
   os.environ["HAVE_XMLPARSE"] == "true":
    libs.extend (["xmlparse", "xmltok"])

if os.environ.has_key ("HAVE_LIBOFX") and\
   os.environ["HAVE_LIBOFX"] == "true":
    libs.extend (["ofx"])

setup(name         = "Ledger",
      version      = "3.0",
      description  = "Ledger Accounting Library",
      author       = "John Wiegley",
      author_email = "johnw@newartisans.com",
      url          = "http://johnwiegley.com/",
      ext_modules  = [
    Extension("ledger", ["pyledger.cc"],
	      define_macros = defines, libraries = libs)])