summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@sebi-laptop>2006-11-25 21:07:03 +0100
committerSebastian Heinlein <sebi@sebi-laptop>2006-11-25 21:07:03 +0100
commit06782d97b7649731cd29a18dc41302d1dbe01d2c (patch)
tree65608feade5ad67da68b660b4aa93de458e547b9
parente807b5ae883a29c0ce9439af79e1ae7c16053790 (diff)
downloadpython-apt-06782d97b7649731cd29a18dc41302d1dbe01d2c.tar.gz
* intltool-merge is not the correct solution for the templates
replaced by a small code in setup.py
-rw-r--r--setup.cfg4
-rwxr-xr-xsetup.py14
2 files changed, 15 insertions, 3 deletions
diff --git a/setup.cfg b/setup.cfg
index fc694b61..f9866b1f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[build]
l10n=True
-merge-files=["build/templates", ["data/templates/Ubuntu.info.in",\
- "data/templates/Debian.info.in"]
+[build_l10n]
+domain=python-aptsources
diff --git a/setup.py b/setup.py
index 534878f3..c510331a 100755
--- a/setup.py
+++ b/setup.py
@@ -3,13 +3,25 @@ from distutils.core import setup
import glob, os, commands, sys
from DistUtilsExtra.distutils_extra import build_extra, build_l10n
+templates = []
+if not os.path.exists("build/data/templates/"):
+ os.makedirs("build/data/templates")
+for template in glob.glob('data/templates/*.info.in'):
+ source = open(template, "r")
+ build = open(os.path.join("build", template[:-3]), "w")
+ lines = source.readlines()
+ for line in lines:
+ build.write(line.lstrip("_"))
+ source.close()
+ build.close()
+
setup(
name = 'python-aptsources',
version = '0.0.1',
description = 'Abstratcion of the sources.list',
packages = ['AptSources'],
data_files = [('share/python-aptsources/templates',
- glob.glob('build/templates/*.info'))],
+ glob.glob('build/data/templates/*.info'))],
license = 'GNU GPL',
platforms = 'posix',
cmdclass = { "build" : build_extra,