From 06782d97b7649731cd29a18dc41302d1dbe01d2c Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Sat, 25 Nov 2006 21:07:03 +0100 Subject: * intltool-merge is not the correct solution for the templates replaced by a small code in setup.py --- setup.cfg | 4 ++-- setup.py | 14 +++++++++++++- 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, -- cgit v1.2.3