summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2006-03-06 19:34:33 +0000
committertailor <cygnus@janrain.com>2006-03-06 19:34:33 +0000
commitd8b74004ed4cc3b17b61e0d56870f08550ee9b2b (patch)
treed6364a34c0f1a518c72eb9623a467fc7c2a58ff0
parent212f0d77730557a2428a16a24791cf3c0d297f60 (diff)
downloadphp-openid-d8b74004ed4cc3b17b61e0d56870f08550ee9b2b.zip
php-openid-d8b74004ed4cc3b17b61e0d56870f08550ee9b2b.tar.gz
php-openid-d8b74004ed4cc3b17b61e0d56870f08550ee9b2b.tar.bz2
[project @ Updated package.xml template and added logic for assigning roles to entire directories in packagexml.py]
-rw-r--r--admin/package.xml3
-rw-r--r--admin/packagexml.py9
-rw-r--r--admin/xmlconfig.py2
3 files changed, 6 insertions, 8 deletions
diff --git a/admin/package.xml b/admin/package.xml
index 15182cb..0be1909 100644
--- a/admin/package.xml
+++ b/admin/package.xml
@@ -33,10 +33,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
<required>
<php>
<min>4.3.0</min>
- <max>5.1</max>
</php>
<pearinstaller>
- <min>1.6.0a1</min>
+ <min>1.4.5</min>
</pearinstaller>
</required>
<optional>
diff --git a/admin/packagexml.py b/admin/packagexml.py
index eec60dc..b231c4a 100644
--- a/admin/packagexml.py
+++ b/admin/packagexml.py
@@ -48,15 +48,14 @@ def buildContentsXMLFordir(dir_or_file, roles, depth=0, dir_role=None,
if not all_files:
return []
- if extension in roles: # Ends in an extension we care about
+ if all_files and dir_role:
+ return ['%s<file name="%s" role="%s" />' %
+ (INDENT_STRING * depth, os.path.basename(dir_or_file), dir_role)]
+ elif extension in roles: # Ends in an extension we care about
return ['%s<file name="%s" role="%s" />' %
(INDENT_STRING * depth, os.path.basename(dir_or_file),
roles[extension])]
- elif all_files:
- return ['%s<file name="%s" />' %
- (INDENT_STRING * depth, os.path.basename(dir_or_file))]
else:
- print "FOOB for %s %s" % (all_files, dir_or_file)
return []
def buildContentsXML(roles, *dirs):
diff --git a/admin/xmlconfig.py b/admin/xmlconfig.py
index dc3cf44..d7d4c30 100644
--- a/admin/xmlconfig.py
+++ b/admin/xmlconfig.py
@@ -48,7 +48,7 @@ contents_dirs = ['../Auth']
# subdirectories in these directories will be included in the
# <contents> element in the output XML and will be assigned the role
# 'doc'.
-docs_dirs = ['../doc']
+docs_dirs = ['../doc', '../examples']
# The HTTP package base URI. This is the place on the web where the
# PEAR-installable tarballs will live, and this (plus the package