cas.spec | 4 ++--
setup.py | 20 +++++++++++---------
2 files changed, 13 insertions(+), 11 deletions(-)
New commits:
commit c1f3ea229db37cdec550c83db6333c64bfb6557a
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed May 6 21:23:21 2009 -0400
- made it easier to add additional default snippets
without having to worry about hand editing the setup.py
to include those
diff --git a/setup.py b/setup.py
index 5f8b134..8195fbe 100644
--- a/setup.py
+++ b/setup.py
@@ -2,11 +2,18 @@
setup.py - distutils packaging
"""
from distutils.core import setup
-
+import os
libpath = "/var/lib/cas"
snippetpath = libpath + "/snippets"
+# Build data_files easily
+snippet_files = []
+
+# Automate addition of snippets, simply add new snippets to default install
+# and they will be included.
+for dirpath, dirnames, filenames in os.walk('snippets'):
+ snippet_files.append([snippetpath, [os.path.join(dirpath, f) for f in filenames]])
setup(
name = 'cas',
@@ -20,12 +27,7 @@ setup(
package_dir = {'': 'lib',},
data_files = [ ('/etc', ['cas.conf']),
- # cas commands we'll ship
- (snippetpath, ['snippets/sys']),
- (snippetpath, ['snippets/log']),
- (snippetpath, ['snippets/memory']),
- (snippetpath, ['snippets/traceback']),
- (snippetpath, ['snippets/template']),
- (snippetpath, ['snippets/modules']),
- ('/usr/share/man/man1',
['cas.1.gz','cas-admin.1.gz']) ]
+ ('/usr/share/man/man1',
['cas.1.gz','cas-admin.1.gz']),
+ # cas commands we'll ship
+ snippet_files ],
)
commit 3aa83552bceca445e7faa0200f6a5368b1ba0094
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed May 6 21:23:06 2009 -0400
- combine dir, attr macros
diff --git a/cas.spec b/cas.spec
index 462ae10..665fb1c 100644
--- a/cas.spec
+++ b/cas.spec
@@ -43,8 +43,8 @@ rm -rf ${RPM_BUILD_ROOT}
%{python_sitelib}/*
%{_mandir}/man1/cas.1.gz
%{_mandir}/man1/cas-admin.1.gz
-%dir %{_var}/lib/cas/snippets/
-%defattr(755,root,root)
+%dir %attr(755,root,root) %{_var}/lib/cas/snippets/
+#%defattr(755,root,root)
%config(noreplace) %{_var}/lib/cas/snippets/*
%doc AUTHORS LICENSE README PKG-INFO doc/*
Show replies by date