0311c78
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
0311c78
0311c78
Name:           python-kid
f0aee0a
Version:        0.9.6
e67a429
Release:        2%{?dist}
0311c78
Summary:        Kid - A simple and pythonic XML template language
0311c78
0311c78
Group:          Applications/Publishing
0311c78
License:        MIT
52365ae
URL:            http://www.kid-templating.org/
52365ae
Source0:        http://www.kid-templating.org/dist/%{version}/kid-%{version}.tar.gz
4735cf3
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0311c78
BuildArch:      noarch
0311c78
e67a429
BuildRequires:  python-setuptools-devel
eec7511
BuildRequires:  python-docutils
0311c78
52a82c2
0311c78
%description
0311c78
Kid is a simple Python based template language for generating and
0311c78
transforming XML vocabularies. Templates are compiled to native Python 
0311c78
byte-code and may be imported and used like normal Python modules.
0311c78
0311c78
0311c78
%prep
0311c78
%setup -q -n kid-%{version}
4735cf3
0311c78
0311c78
%build
0311c78
%{__python} setup.py build
83eb1e7
pushd doc
83eb1e7
sed -i -e 's|rst2html\.py|rst2html|' makefile
83eb1e7
make
83eb1e7
popd
0311c78
0311c78
0311c78
%install
0311c78
rm -rf $RPM_BUILD_ROOT
4735cf3
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT \
4735cf3
    --single-version-externally-managed
52a82c2
rm -rf $RPM_BUILD_ROOT%{python_sitelib}/kid/test
8d87082
rm -f $RPM_BUILD_ROOT%{python_sitelib}/*egg-info/requires.txt
8d87082
# Avoid requiring setuptools
8d87082
chmod 0755 $RPM_BUILD_ROOT%{python_sitelib}/kid/{run,compile}.py
8d87082
rm -f $RPM_BUILD_ROOT%{_bindir}/*
8d87082
ln -s ../..%{python_sitelib}/kid/run.py $RPM_BUILD_ROOT%{_bindir}/kid
8d87082
ln -s ../..%{python_sitelib}/kid/compile.py $RPM_BUILD_ROOT%{_bindir}/kidc
83eb1e7
0311c78
0311c78
%clean
0311c78
rm -rf $RPM_BUILD_ROOT
0311c78
0311c78
0311c78
%files
0311c78
%defattr(-,root,root,-)
83eb1e7
%doc COPYING HISTORY README doc/*.txt doc/*.css doc/*.html test
f13f1d4
%{python_sitelib}/kid*
0311c78
%{_bindir}/*
0311c78
0311c78
0311c78
%changelog
e67a429
* Tue Aug 28 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.6-2
e67a429
- BR: python-setuptools-devel
e67a429
- Drop explicit BR: python-devel
e67a429
f0aee0a
* Fri Aug 17 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.6-1
f0aee0a
- Upstream 0.9.6
f0aee0a
f95c693
* Sun Jan 28 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.5-1
f95c693
- Upstream 0.9.5
f95c693
- Drop the py-def patch
d2ae750
8d87082
* Tue Jan 02 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.4-2
8d87082
- Add hotfix for broken py-def (#220843)
8d87082
- Simplify kid and kidc to not require setuptools to run (#220844)
8d87082
f13f1d4
* Sun Dec 17 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.4-1
f13f1d4
- Version 0.9.4
f13f1d4
- Ghostbusting
b03f5a7
52365ae
* Sun Jul 23 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.3-1
52365ae
- Version 0.9.3
52365ae
- Adjusting urls to point to kid-templating.org
52365ae
41213ad
* Tue Jun 27 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.2-1
41213ad
- Version 0.9.2
41213ad
- BR python-setuptools >= 0.6a11
41213ad
817fefe
* Tue May 23 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.1-3
817fefe
- Fix 'elementtree requried' regression
817fefe
74af6e5
* Sat May 20 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.1-2
74af6e5
- Update project URL
74af6e5
83eb1e7
* Fri May 19 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9.1-1
83eb1e7
- Version 0.9.1
c174ca5
4735cf3
* Mon Feb 27 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.9-1
4735cf3
- Version 0.9
4735cf3
- Switch to using setuptools.
4735cf3
- Handle .egg data.
4735cf3
- Don't list python-abi namely -- FC4 and above does it automatically.
4735cf3
1ecb766
* Fri Dec 02 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.8-1
1ecb766
- Version 0.8
1ecb766
24b2b93
* Fri Nov 11 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.7.1-2
24b2b93
- Rebuild.
24b2b93
043c9e3
* Thu Nov 10 2005 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.7.1-1
043c9e3
- Version 0.7.1
043c9e3
- Avoid setuptools using a patch to use standard distutils
043c9e3
- Avoid cruft in doc dir
043c9e3
52a82c2
* Mon Jun 13 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 0.6.4-1
52a82c2
- Version 0.6.4
52a82c2
- Disttagging
52a82c2
Seth Vidal 9e5dabb
* Sat Apr 16 2005 Seth Vidal <skvidal at phy.duke.edu> 0.6.3-2
Seth Vidal 9e5dabb
- BuildRequires python-elementtree
Seth Vidal 9e5dabb
0311c78
* Tue Mar 29 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 0.6.3-2
0311c78
- Add docs and list files instead of using INSTALLED_FILES (safer)
0311c78
- Trim description a little
0311c78
- Require python-abi
0311c78
- BuildRequire python-devel
0311c78
- Use python_sitelib
0311c78
- Remove test directory from site_packages
0311c78
- Use ghosting for .pyo
0311c78
0311c78
* Mon Mar 14 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 0.6.3-1
0311c78
- Version 0.6.3
0311c78
0311c78
* Thu Mar 10 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 0.6.2-1
0311c78
- Initial build in Fedora Extras format.