From e2ba9ab1d2096072ef764e98d1ae400248d11f0e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 29 Oct 2012 22:18:32 +0100 Subject: [PATCH] add package data info Signed-off-by: Nico Schottelius --- MANIFEST.in | 3 +-- setup.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 319dad56..a675f446 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,3 @@ -include docs/changelog docs/changelog-2.1 +include docs/changelog recursive-include docs/gfx *.png *.text recursive-include docs *.text *.html *.1 *.7 -recursive-include conf * diff --git a/setup.py b/setup.py index 900dac0f..19fb28e6 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,31 @@ from distutils.core import setup +#data_files=[('/usr/share/cdist', 'conf')], + # data_files=[('/tmp/cdist', ['conf'])], import cdist +import os + +def data_finder(data_dir): + entries = [] + for name in os.listdir(data_dir): + entry = os.path.join(data_dir, name) + if os.path.isdir(entry): + entries.extend(data_finder(entry)) + else: + entries.append(entry) + + return entries + +package_data = data_finder("conf") + + +print(package_data) + setup( name = "cdist", packages = ["cdist", "cdist.core", "cdist.exec", "cdist.util" ], + package_data={'cdist': package_data}, scripts = ["cdist.py"], version = cdist.version.VERSION, description = "A Usable Configuration Management System",