diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7a9c13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.rpm diff --git a/kid-0.9.6.tar.gz b/kid-0.9.6.tar.gz new file mode 100644 index 0000000..5da45a0 --- /dev/null +++ b/kid-0.9.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4c84b3de0a0584b33db489e5dde82f9c2c8832f40dad0413bce309e16813ab9 +size 268602 diff --git a/python-kid-0.9.6-escape-gt.patch b/python-kid-0.9.6-escape-gt.patch new file mode 100644 index 0000000..5f55e4c --- /dev/null +++ b/python-kid-0.9.6-escape-gt.patch @@ -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("&", "&") + text = text.replace("<", "<") ++ text = text.replace("]]>", "]]>") + 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("&", "&") + text = text.replace("<", "<") ++ text = text.replace("]]>", "]]>") + text = text.replace("\"", """) + except (TypeError, AttributeError): + raise_serialization_error(text) +@@ -684,6 +686,7 @@ class HTMLSerializer(HTMLBased, Serializ + if escape: + text = text.replace("&", "&") + text = text.replace("<", "<") ++ text = text.replace("]]>", "]]>") + except (TypeError, AttributeError): + raise_serialization_error(text) + return text diff --git a/python2-kid-0.9.6-python2.patch b/python2-kid-0.9.6-python2.patch new file mode 100644 index 0000000..ad5fb51 --- /dev/null +++ b/python2-kid-0.9.6-python2.patch @@ -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 diff --git a/python2-kid.spec b/python2-kid.spec index 565ce14..74c70ff 100644 --- a/python2-kid.spec +++ b/python2-kid.spec @@ -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 ]]> 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 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 'attr(755,user,grp)' \ -#--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 0.9.6-22.2.sme +- Initial import for SME11 + +* Wed Mar 30 2022 Peter Ajamian - 0.9.6-22.1 +- Rebuilt for el8 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.9.6-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.9.6-21 +- Python 2 binary package renamed to python2-kid + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Wed Aug 09 2017 Iryna Shcherbina - 0.9.6-20 +- Add a build-time dependency on python2-devel + +* Thu Jul 27 2017 Fedora Release Engineering - 0.9.6-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.9.6-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jul 19 2016 Fedora Release Engineering - 0.9.6-17 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 0.9.6-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 0.9.6-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.9.6-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Nov 12 2013 Toshio Kuratomi - 0.9.6-13 +- Replace BR on python-setuptools-devel with python-setuptools + +* Sun Aug 04 2013 Fedora Release Engineering - 0.9.6-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.9.6-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 0.9.6-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0.9.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.9.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 22 2010 David Malcolm - 0.9.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Sun Jan 10 2010 Till Maas - 0.9.6-6 +- Escape ]]> as ]]> in serialization.py to create valid XML +- https://bugzilla.redhat.com/show_bug.cgi?id=528729 + +* Sun Jul 26 2009 Fedora Release Engineering - 0.9.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 0.9.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.9.6-3 +- Rebuild for Python 2.6 + +* Tue Aug 28 2007 Konstantin Ryabitsev - 0.9.6-2 +- BR: python-setuptools-devel +- Drop explicit BR: python-devel + +* Fri Aug 17 2007 Konstantin Ryabitsev - 0.9.6-1 +- Upstream 0.9.6 + +* Sun Jan 28 2007 Konstantin Ryabitsev - 0.9.5-1 +- Upstream 0.9.5 +- Drop the py-def patch + +* Tue Jan 02 2007 Konstantin Ryabitsev - 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 - 0.9.4-1 +- Version 0.9.4 +- Ghostbusting + +* Sun Jul 23 2006 Konstantin Ryabitsev - 0.9.3-1 +- Version 0.9.3 +- Adjusting urls to point to kid-templating.org + +* Tue Jun 27 2006 Konstantin Ryabitsev - 0.9.2-1 +- Version 0.9.2 +- BR python-setuptools >= 0.6a11 + +* Tue May 23 2006 Konstantin Ryabitsev - 0.9.1-3 +- Fix 'elementtree requried' regression + +* Sat May 20 2006 Konstantin Ryabitsev - 0.9.1-2 +- Update project URL + +* Fri May 19 2006 Konstantin Ryabitsev - 0.9.1-1 +- Version 0.9.1 + +* Mon Feb 27 2006 Konstantin Ryabitsev - 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 - 0.8-1 +- Version 0.8 + +* Fri Nov 11 2005 Konstantin Ryabitsev - 0.7.1-2 +- Rebuild. + +* Thu Nov 10 2005 Konstantin Ryabitsev - 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 - 0.6.4-1 +- Version 0.6.4 +- Disttagging + +* Sat Apr 16 2005 Seth Vidal 0.6.3-2 +- BuildRequires python-elementtree + +* Tue Mar 29 2005 Konstantin Ryabitsev 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 0.6.3-1 +- Version 0.6.3 + +* Thu Mar 10 2005 Konstantin Ryabitsev 0.6.2-1 +- Initial build in Fedora Extras format.