%{?!python:%define python python} %{?!pybasever:%{expand:%%define pybasever %(%{__python} -c "import sys ; print sys.version[:3]")}} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define origname Nevow Name: %{python}-nevow Version: 0.8.0 Release: 2%{?dist} Summary: web application construction kit based on Twisted Group: Development/Libraries License: MIT URL: http://www.divmod.org/trac/wiki/DivmodNevow Source0: http://divmod.org/trac/attachment/wiki/SoftwareReleases/%{origname}-%{version}.tar.gz?format=raw Source1: filter-requires-nevow.sh # one of the tests needs /usr/bin/smjs, SeaMonkey's JavaScript %define _use_internal_dependency_generator 0 %define __find_requires %{SOURCE1} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # for FC3 and earlier %if "%{pybasever}" < "2.4" Requires: python(abi) = %{pybasever} %endif BuildRequires: %{python}-twisted-core BuildRequires: %{python}-twisted-web BuildRequires: docutils Requires: %{python}-twisted-core Requires: %{python}-twisted-web Requires(post): %{python} Requires(post): %{python}-twisted-core >= 2.1.1 %description Nevow (pronounced as the French "nouveau", or "noo-voh") is a web application construction kit written in Python. It is designed to allow the programmer to express as much of the view logic as desired in Python, and includes a pure Python XML expression syntax named stan to facilitate this. However it also provides rich support for designer-edited templates, using a very small XML attribute language to provide bi-directional template manipulation capability. %prep %setup -n %{origname}-%{version} -q %build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --root $RPM_BUILD_ROOT # so we can ghost it touch $RPM_BUILD_ROOT%{python_sitelib}/nevow/plugins/dropin.cache # Man pages mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ cp -a doc/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1/ rm -rf doc/man # build docs export PYTHONPATH=`pwd` cd doc python make.py %clean rm -rf $RPM_BUILD_ROOT %post -p %{__python} from twisted.plugin import IPlugin, getPlugins import nevow.plugins list(getPlugins(IPlugin, nevow.plugins)) %files %defattr(-,root,root,-) %doc ChangeLog LICENSE README %doc doc/html %{_bindir}/nevow-xmlgettext %{_bindir}/nit %{_mandir}/man1/* %dir %{python_sitelib}/formless/ %{python_sitelib}/formless/*.py %{python_sitelib}/formless/*.pyc %ghost %{python_sitelib}/formless/*.pyo %{python_sitelib}/formless/*.css %dir %{python_sitelib}/formless/test/ %{python_sitelib}/formless/test/*.py %{python_sitelib}/formless/test/*.pyc %ghost %{python_sitelib}/formless/test/*.pyo %dir %{python_sitelib}/nevow/ %{python_sitelib}/nevow/*.py %{python_sitelib}/nevow/*.pyc %ghost %{python_sitelib}/nevow/*.pyo %{python_sitelib}/nevow/*.swf %{python_sitelib}/nevow/*.js %{python_sitelib}/nevow/*.css %dir %{python_sitelib}/nevow/flat/ %{python_sitelib}/nevow/flat/*.py %{python_sitelib}/nevow/flat/*.pyc %ghost %{python_sitelib}/nevow/flat/*.pyo %dir %{python_sitelib}/nevow/livetrial/ %{python_sitelib}/nevow/livetrial/*.py %{python_sitelib}/nevow/livetrial/*.pyc %ghost %{python_sitelib}/nevow/livetrial/*.pyo %{python_sitelib}/nevow/livetrial/*.css %{python_sitelib}/nevow/livetrial/*.js %dir %{python_sitelib}/nevow/plugins/ %{python_sitelib}/nevow/plugins/*.py %{python_sitelib}/nevow/plugins/*.pyc %ghost %{python_sitelib}/nevow/plugins/*.pyo %ghost %{python_sitelib}/nevow/plugins/dropin.cache %dir %{python_sitelib}/nevow/scripts/ %{python_sitelib}/nevow/scripts/*.py %{python_sitelib}/nevow/scripts/*.pyc %ghost %{python_sitelib}/nevow/scripts/*.pyo %dir %{python_sitelib}/nevow/taglibrary/ %{python_sitelib}/nevow/taglibrary/*.py %{python_sitelib}/nevow/taglibrary/*.pyc %ghost %{python_sitelib}/nevow/taglibrary/*.pyo %{python_sitelib}/nevow/taglibrary/*.css %{python_sitelib}/nevow/taglibrary/*.js %dir %{python_sitelib}/nevow/test/ %{python_sitelib}/nevow/test/*.py %{python_sitelib}/nevow/test/*.pyc %ghost %{python_sitelib}/nevow/test/*.pyo %{python_sitelib}/nevow/test/*.js %changelog * Fri Jun 09 2006 Thomas Vander Stichele - 0.8.0-2 - generate dropin.cache and ghost the file * Wed Jun 07 2006 Thomas Vander Stichele - 0.8.0-1 - initial package