* Thu Dec 05 2024 Jean-Philippe Pialasse <jpp@koozali.org> 0.9.6-22.2.sme

- Initial import for SME11
This commit is contained in:
Jean-Philippe Pialasse 2024-12-05 22:32:06 -05:00
parent ee10b4a375
commit 3ab82938e8
5 changed files with 253 additions and 38 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.rpm

BIN
kid-0.9.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,27 @@
diff -up kid-0.9.6/kid/serialization.py.escape-gt kid-0.9.6/kid/serialization.py
--- kid-0.9.6/kid/serialization.py.escape-gt 2007-07-16 13:02:53.000000000 +0200
+++ kid-0.9.6/kid/serialization.py 2010-01-10 14:42:09.000000000 +0100
@@ -408,6 +408,7 @@ class XMLSerializer(Serializer):
return encode_entity(text, entities=entity_map)
text = text.replace("&", "&amp;")
text = text.replace("<", "&lt;")
+ text = text.replace("]]>", "]]&gt;")
except (TypeError, AttributeError):
raise_serialization_error(text)
return text
@@ -423,6 +424,7 @@ class XMLSerializer(Serializer):
return encode_entity(text, entities=entity_map)
text = text.replace("&", "&amp;")
text = text.replace("<", "&lt;")
+ text = text.replace("]]>", "]]&gt;")
text = text.replace("\"", "&quot;")
except (TypeError, AttributeError):
raise_serialization_error(text)
@@ -684,6 +686,7 @@ class HTMLSerializer(HTMLBased, Serializ
if escape:
text = text.replace("&", "&amp;")
text = text.replace("<", "&lt;")
+ text = text.replace("]]>", "]]&gt;")
except (TypeError, AttributeError):
raise_serialization_error(text)
return text

View File

@ -0,0 +1,24 @@
--- kid-0.9.6/kid/compile.py.orig 2007-07-16 23:02:51.000000000 +1200
+++ kid-0.9.6/kid/compile.py 2022-03-30 17:01:46.218279371 +1300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2
# -*- coding: utf-8 -*-
# This module provides the "kidc" command
--- kid-0.9.6/kid/release.py.orig 2007-07-16 23:13:55.000000000 +1200
+++ kid-0.9.6/kid/release.py 2022-03-30 17:01:47.169271440 +1300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2
# -*- coding: utf-8 -*-
"""Pythonic, XML Templating
--- kid-0.9.6/kid/run.py.orig 2007-07-16 23:02:52.000000000 +1200
+++ kid-0.9.6/kid/run.py 2022-03-30 17:01:47.506268629 +1300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2
# -*- coding: utf-8 -*-
# This module provides the "kid" command

View File

@ -1,54 +1,214 @@
%define name python2-kid
%define version 1.0
%define release 1
Summary: This is what python2-kid does.
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Source: %{name}-%{version}.tar.gz
License: GNU GPL version 2
Group: SMEserver/addon
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
BuildArchitectures: noarch
BuildRequires: smeserver-devtools
Requires: smeserver-release >= 11.0
AutoReqProv: no
Name: python2-kid
Version: 0.9.6
Release: 22.2%{?dist}
Summary: Kid - A simple and pythonic XML template language
%description
Kid is a simple Python based template language for generating and transforming XML vocabularies. Templates are compiled to native Python byte-code and may be imported and used like normal Python modules.
Group: Applications/Publishing
License: MIT
# none irl this one has been reused URL: http://www.kid-templating.org/
Source0: %{version}/kid-%{version}.tar.gz
# 2010-01-10: Upstream is currently unresponsive, but patch qualifies for upstreaming
# Escape ]]> to ]]&gt; in serialization.py as required by XML standard:
# http://www.w3.org/TR/2006/REC-xml11-20060816/#syntax
# Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=528729
Patch0: python-kid-0.9.6-escape-gt.patch
Patch1: python2-kid-0.9.6-python2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%changelog
* Day MMMM DD YYYY <brianr@koozali.org> 1.0-1.sme
- Initial code - create RPM [SME:99999]
BuildRequires: python2-devel
BuildRequires: python2-docutils
BuildRequires: perl-interpreter
BuildRequires: python3-docutils
%global _description\
Kid is a simple Python based template language for generating and\
transforming XML vocabularies. Templates are compiled to native Python\
byte-code and may be imported and used like normal Python modules.\
%description %_description
%prep
%setup -q -n kid-%{version}
%patch0 -p1 -b .escape-gt
%patch1 -p1 -b .python2
%setup -q
%build
%py2_build
pushd doc
sed -i -e 's|rst2html\.py|rst2html|' makefile
make
popd
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
> %{name}-%{version}-filelist
#echo "%doc COPYING" >> %{name}-%{version}-filelist
#--dir <dir> 'attr(755,user,grp)' \
#--file <file> 'attr(755,root,root)' \
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT \
--single-version-externally-managed
rm -rf $RPM_BUILD_ROOT%{python2_sitelib}/kid/test
rm -f $RPM_BUILD_ROOT%{python2_sitelib}/*egg-info/requires.txt
# Avoid requiring setuptools
chmod 0755 $RPM_BUILD_ROOT%{python2_sitelib}/kid/{run,compile}.py
rm -f $RPM_BUILD_ROOT%{_bindir}/*
ln -s ../..%{python2_sitelib}/kid/run.py $RPM_BUILD_ROOT%{_bindir}/kid
ln -s ../..%{python2_sitelib}/kid/compile.py $RPM_BUILD_ROOT%{_bindir}/kidc
%clean
cd ..
rm -rf %{name}-%{version}
rm -rf $RPM_BUILD_ROOT
%pre
%preun
%files
%defattr(-,root,root,-)
%license COPYING
%doc HISTORY README doc/*.txt doc/*.css doc/*.html test
%{python2_sitelib}/kid*
%{_bindir}/*
%post
%postun
#uninstall
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)
%changelog
* Thu Dec 05 2024 Jean-Philippe Pialasse <jpp@koozali.org> 0.9.6-22.2.sme
- Initial import for SME11
* Wed Mar 30 2022 Peter Ajamian <pj@ghettoforge.org> - 0.9.6-22.1
- Rebuilt for el8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.6-21
- Python 2 binary package renamed to python2-kid
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Wed Aug 09 2017 Iryna Shcherbina <ishcherb@redhat.com> - 0.9.6-20
- Add a build-time dependency on python2-devel
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-17
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Nov 12 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.9.6-13
- Replace BR on python-setuptools-devel with python-setuptools
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.6-7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Sun Jan 10 2010 Till Maas <opensource@till.name> - 0.9.6-6
- Escape ]]> as ]]&gt; in serialization.py to create valid XML
- https://bugzilla.redhat.com/show_bug.cgi?id=528729
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.6-3
- Rebuild for Python 2.6
* Tue Aug 28 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.6-2
- BR: python-setuptools-devel
- Drop explicit BR: python-devel
* Fri Aug 17 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.6-1
- Upstream 0.9.6
* Sun Jan 28 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.5-1
- Upstream 0.9.5
- Drop the py-def patch
* Tue Jan 02 2007 Konstantin Ryabitsev <icon@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@fedoraproject.org> - 0.9.4-1
- Version 0.9.4
- Ghostbusting
* Sun Jul 23 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.3-1
- Version 0.9.3
- Adjusting urls to point to kid-templating.org
* Tue Jun 27 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.2-1
- Version 0.9.2
- BR python-setuptools >= 0.6a11
* Tue May 23 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.1-3
- Fix 'elementtree requried' regression
* Sat May 20 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.1-2
- Update project URL
* Fri May 19 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.1-1
- Version 0.9.1
* Mon Feb 27 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9-1
- Version 0.9
- Switch to using setuptools.
- Handle .egg data.
- Don't list python-abi namely -- FC4 and above does it automatically.
* Fri Dec 02 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.8-1
- Version 0.8
* Fri Nov 11 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.7.1-2
- Rebuild.
* Thu Nov 10 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.7.1-1
- Version 0.7.1
- Avoid setuptools using a patch to use standard distutils
- Avoid cruft in doc dir
* Mon Jun 13 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.6.4-1
- Version 0.6.4
- Disttagging
* Sat Apr 16 2005 Seth Vidal <skvidal at phy.duke.edu> 0.6.3-2
- BuildRequires python-elementtree
* Tue Mar 29 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 0.6.3-2
- Add docs and list files instead of using INSTALLED_FILES (safer)
- Trim description a little
- Require python-abi
- BuildRequire python-devel
- Use python_sitelib
- Remove test directory from site_packages
- Use ghosting for .pyo
* Mon Mar 14 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 0.6.3-1
- Version 0.6.3
* Thu Mar 10 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 0.6.2-1
- Initial build in Fedora Extras format.