rpms/python-kid/FC-5 python-kid-0.9.4-py-def.patch, NONE, 1.1 python-kid.spec, 1.14, 1.15
Konstantin Ryabitsev (icon)
fedora-extras-commits at redhat.com
Tue Jan 2 19:23:04 UTC 2007
- Previous message (by thread): rpms/cowsay/devel animalsay, NONE, 1.1 cowsay.bashcomp, NONE, 1.1 cowsay.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/python-kid/FC-6 python-kid-0.9.4-py-def.patch, NONE, 1.1 python-kid.spec, 1.14, 1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: icon
Update of /cvs/extras/rpms/python-kid/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4725/FC-5
Modified Files:
python-kid.spec
Added Files:
python-kid-0.9.4-py-def.patch
Log Message:
- Add hotfix for broken py-def (#220843)
- Simplify kid and kidc to not require setuptools to run (#220844)
python-kid-0.9.4-py-def.patch:
--- NEW FILE python-kid-0.9.4-py-def.patch ---
Index: trunk/kid/codewriter.py
===================================================================
--- trunk/kid/codewriter.py (revision 441)
+++ trunk/kid/codewriter.py (revision 442)
@@ -248,10 +248,10 @@
old_code = code
if '(' not in decl:
- decl = decl + '()'
+ decl += '()'
name, args = decl.split('(', 1)
- pos = args.rfind(')')
- args = args[0:pos].strip()
- self_ = args and 'self, ' or 'self'
- class_decl = '%s(%s%s)' % (name, self_, args)
+ args = args.lstrip()
+ if not args.startswith(')'):
+ args = ', ' + args
+ class_decl = '(self'.join((name, args))
# module function code
@@ -271,6 +271,6 @@
self.match_proc(item, attrib, code)
code.end_block()
- code.start_block('def %s:' % class_decl)
- code.line('return ElementStream(self.__%s(%s))' % (name, args))
+ code.start_block('def %s(self, *args, **kw):' % name)
+ code.line('return ElementStream(self.__%s(*args, **kw))' % name)
code.end_block()
if attr_name == QNAME_SLOT:
Index: trunk/test/test_def.kid
===================================================================
--- trunk/test/test_def.kid (revision 421)
+++ trunk/test/test_def.kid (revision 442)
@@ -9,4 +9,5 @@
?>
<testdoc xmlns:py="http://purl.org/kid/ns#">
+
<test>
<attempt py:content="template1()" />
@@ -22,14 +23,14 @@
<h1>Some Fruit</h1>
<dl>
-
+
<dt>orange</dt>
<dd>A juicy fruit from Florida mostly.</dd>
-
+
<dt>m&m's</dt>
<dd>melts in your mouth not in your hand.</dd>
-
+
<dt>apple</dt>
<dd>A red fruit that hurts my teeth.</dd>
-
+
</dl>
</test3></expect>
@@ -38,5 +39,5 @@
<!-- define a template inline -->
<p py:def="inline_test">a test paragraph</p>
-
+
<test>
<attempt py:content="inline_test()"/>
@@ -49,4 +50,14 @@
</test>
+ <p py:def="hello_world(x='World')" py:strip="">${x}</p>
+
+ <test>
+ <attempt><p py:replace="hello_world(x='Hello')"/>,
+ <p py:replace="hello_world()"/>!</attempt>
+ <expect>Hello,
+ World!</expect>
+ </test>
+
<!-- XXX need a recursive test -->
+
</testdoc>
Index: python-kid.spec
===================================================================
RCS file: /cvs/extras/rpms/python-kid/FC-5/python-kid.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- python-kid.spec 17 Dec 2006 18:39:25 -0000 1.14
+++ python-kid.spec 2 Jan 2007 19:22:34 -0000 1.15
@@ -2,13 +2,14 @@
Name: python-kid
Version: 0.9.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Kid - A simple and pythonic XML template language
Group: Applications/Publishing
License: MIT
URL: http://www.kid-templating.org/
Source0: http://www.kid-templating.org/dist/%{version}/kid-%{version}.tar.gz
+Patch0: python-kid-0.9.4-py-def.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -25,6 +26,7 @@
%prep
%setup -q -n kid-%{version}
+%patch0 -p1
%build
@@ -40,7 +42,12 @@
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT \
--single-version-externally-managed
rm -rf $RPM_BUILD_ROOT%{python_sitelib}/kid/test
-rm -rf $RPM_BUILD_ROOT%{python_sitelib}/*egg-info/requires.txt
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/*egg-info/requires.txt
+# Avoid requiring setuptools
+chmod 0755 $RPM_BUILD_ROOT%{python_sitelib}/kid/{run,compile}.py
+rm -f $RPM_BUILD_ROOT%{_bindir}/*
+ln -s ../..%{python_sitelib}/kid/run.py $RPM_BUILD_ROOT%{_bindir}/kid
+ln -s ../..%{python_sitelib}/kid/compile.py $RPM_BUILD_ROOT%{_bindir}/kidc
%clean
@@ -55,6 +62,10 @@
%changelog
+* Tue Jan 02 2007 Konstantin Ryabitsev <icon at fedoraproject.org> - 0.9.4-2
+- Add hotfix for broken py-def (#220843)
+- Simplify kid and kidc to not require setuptools to run (#220844)
+
* Sun Dec 17 2006 Konstantin Ryabitsev <icon at fedoraproject.org> - 0.9.4-1
- Version 0.9.4
- Ghostbusting
- Previous message (by thread): rpms/cowsay/devel animalsay, NONE, 1.1 cowsay.bashcomp, NONE, 1.1 cowsay.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/python-kid/FC-6 python-kid-0.9.4-py-def.patch, NONE, 1.1 python-kid.spec, 1.14, 1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list