summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-11-24 10:00:24 +0000
committerArch Librarian <arch@canonical.com>2004-11-24 10:00:24 +0000
commit8d3142533cdefa96f634cb07b41842ea73d24e8f (patch)
treef045b34629a45a343ee095e6a7e7be71ff301f35
parent83444392a4c3a90b3103aa02d47426e3a9649a05 (diff)
downloadpython-apt-8d3142533cdefa96f634cb07b41842ea73d24e8f.tar.gz
Use the makefile parser
Author: jgg Date: 2002-01-08 07:13:21 GMT Use the makefile parser
-rw-r--r--python/makefile8
-rw-r--r--setup.py10
2 files changed, 11 insertions, 7 deletions
diff --git a/python/makefile b/python/makefile
index abe08d50..12dea22f 100644
--- a/python/makefile
+++ b/python/makefile
@@ -9,13 +9,15 @@ include ../buildlib/defaults.mak
MODULE=apt_pkg
SLIBS = -lapt-pkg
LIB_MAKES = apt-pkg/makefile
-SOURCE = apt_pkgmodule.cc configuration.cc generic.cc tag.cc string.cc \
- cache.cc pkgrecords.cc
+APT_PKG_SRC = apt_pkgmodule.cc configuration.cc generic.cc tag.cc string.cc \
+ cache.cc pkgrecords.cc
+SOURCE := $(APT_PKG_SRC)
include $(PYTHON_H)
# The apt_int module..
MODULE=apt_inst
SLIBS = -lapt-inst -lapt-pkg
LIB_MAKES = apt-inst/makefile
-SOURCE = apt_instmodule.cc tar.cc generic.cc
+APT_INST_SRC = apt_instmodule.cc tar.cc generic.cc
+SOURCE := $(APT_INST_SRC)
include $(PYTHON_H)
diff --git a/setup.py b/setup.py
index 07d75c78..64b5db34 100644
--- a/setup.py
+++ b/setup.py
@@ -1,18 +1,20 @@
#! /usr/bin/env python
-# $Id: setup.py,v 1.1 2002/01/08 06:42:46 jgg Exp $
+# $Id: setup.py,v 1.2 2002/01/08 07:13:21 jgg Exp $
from distutils.core import setup, Extension
+from distutils.sysconfig import parse_makefile
+import string;
+
# The apt_pkg module
-files = ["apt_pkgmodule.cc","configuration.cc","generic.cc","tag.cc",
- "cache.cc","string.cc","pkgrecords.cc"]
+files = string.split(parse_makefile("python/makefile")["APT_PKG_SRC"]);
for i in range(0,len(files)):
files[i] = "python/"+ files[i];
apt_pkg = Extension("apt_pkg", files,
libraries=["apt-pkg"]);
# The apt_inst module
-files = ["apt_instmodule.cc","tar.cc","generic.cc"];
+files = string.split(parse_makefile("python/makefile")["APT_INST_SRC"]);
for i in range(0,len(files)):
files[i] = "python/"+ files[i];
apt_inst = Extension("apt_inst", files,