summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am58
-rwxr-xr-xacprep2
-rwxr-xr-xpython/setup.py18
-rwxr-xr-xtest/PyUnitTests.py2
4 files changed, 9 insertions, 71 deletions
diff --git a/Makefile.am b/Makefile.am
index a13e9709..6c60202d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,61 +216,17 @@ libledger_python_la_SOURCES = \
python/py_utils.cc \
python/py_value.cc \
python/py_post.cc \
- python/pyinterp.cc \
- python/setup.py
+ python/pyinterp.cc
libledger_python_la_CPPFLAGS = $(lib_cppflags) -I$(srcdir)/python
-pyexec_PROGRAMS = ledger.so
+pyexec_LTLIBRARIES = ledger.la
-clean-local:
- rm -fr build test/python
-
-uninstall-hook:
- rm -f $(DESTDIR)$(libdir)/Ledger-$(VERSION)-py$(PYTHON_VERSION).egg-info
-
-install-exec-hook:
- BUILD_DIR=`cd $(top_builddir); pwd`; \
- SRC_DIR=`cd $(srcdir); pwd`; \
- (cd $(srcdir); \
- CFLAGS="$(CPPFLAGS) -I$(srcdir) -I$$BUILD_DIR $(libledger_python_la_CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
- LDFLAGS="$(LDFLAGS) -L$$BUILD_DIR -L$$BUILD_DIR/.libs" \
- ARCHFLAGS="$(ARCHFLAGS)" PYLIBS="$(PYLIBS)" VERSION="$(VERSION)" \
- SRCDIR="$$SRC_DIR" $(PYTHON) python/setup.py -q install \
- --skip-build \
- --root=$(DESTDIR)/ \
- --prefix=$(prefix) \
- --install-lib=$(libdir) \
- --install-headers=$(pkgincludedir) \
- --install-data=$(datadir))
-
-ledger_so_SOURCES = $(all_sources)
-ledger_so_DEPENDENCIES = $(lib_LTLIBRARIES)
-
-PYLIBS = ledger_python \
- ledger_report \
- ledger_data \
- ledger_expr \
- ledger_math \
- ledger_util \
- gmp \
- mpfr \
- boost_system$(BOOST_SUFFIX) \
- boost_date_time$(BOOST_SUFFIX) \
- boost_filesystem$(BOOST_SUFFIX) \
- boost_regex$(BOOST_SUFFIX) \
- boost_python$(BOOST_SUFFIX)
-
-ledger.so: $(ledger_so_SOURCES) $(ledger_so_DEPENDENCIES)
- @echo " PY ledger.so"
- @BUILD_DIR=`cd $(top_builddir); pwd`; \
- SRC_DIR=`cd $(srcdir); pwd`; \
- (cd $(srcdir); \
- CFLAGS="$(CPPFLAGS) -I$(srcdir) -I$$BUILD_DIR $(libledger_python_la_CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
- LDFLAGS="$(LDFLAGS) -L$$BUILD_DIR -L$$BUILD_DIR/.libs" \
- ARCHFLAGS="$(ARCHFLAGS)" PYLIBS="$(PYLIBS)" VERSION="$(VERSION)" \
- SRCDIR="$$SRC_DIR" $(PYTHON) python/setup.py -q build \
- --build-lib=$$BUILD_DIR/ --build-temp=$$BUILD_DIR/build -f)
+ledger_la_CPPFLAGS = $(libledger_python_la_CPPFLAGS)
+ledger_la_SOURCES = python/pyledger.cc
+ledger_la_DEPENDENCIES = $(lib_LTLIBRARIES)
+ledger_la_LDFLAGS = -avoid-version -module
+ledger_la_LIBADD = $(LIBOBJS) $(lib_LTLIBRARIES) $(INTLLIBS)
endif
diff --git a/acprep b/acprep
index 22c7ea73..e130d6e9 100755
--- a/acprep
+++ b/acprep
@@ -33,7 +33,7 @@ git ls-files '*.cc' '*.h' | egrep '^(src|python)/' > po/POTFILES.in
aclocal -I m4
-SWITCHES="--disable-shared --with-included-gettext"
+SWITCHES="--with-included-gettext"
if [ -z "$PYTHON_HOME" ]; then
PYTHON_HOME="/usr"
diff --git a/python/setup.py b/python/setup.py
deleted file mode 100755
index 1e67fb00..00000000
--- a/python/setup.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-
-from distutils.core import setup, Extension
-
-import os
-
-defines = [('PYTHON_MODULE', 1)]
-libs = os.environ["PYLIBS"].split()
-
-setup(name = "Ledger",
- version = os.environ["VERSION"],
- description = "Ledger Accounting Library",
- author = "John Wiegley",
- author_email = "johnw@newartisans.com",
- url = "http://www.newartisans.com/software/ledger.html",
- ext_modules = [
- Extension("ledger", [os.environ["SRCDIR"] + '/python/pyledger.cc'],
- define_macros = defines, libraries = libs)])
diff --git a/test/PyUnitTests.py b/test/PyUnitTests.py
index acae7781..a77d99ad 100755
--- a/test/PyUnitTests.py
+++ b/test/PyUnitTests.py
@@ -1,6 +1,6 @@
#!/bin/sh
-PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \
+PYTHONPATH="%builddir%/.libs":$PYTHONPATH \
LD_LIBRARY_PATH="%builddir%/.libs":$LD_LIBRARY_PATH \
DYLD_LIBRARY_PATH="%builddir%/.libs":$DYLD_LIBRARY_PATH \
%python% "%builddir%"/test/python/UnitTests.py