[python-zope-component] - Get rid of the utility script

cheeselee cheeselee at fedoraproject.org
Sun Jan 2 11:21:29 UTC 2011


commit 2d00e4be09341b12292be87019a3fbb4c019af85
Author: Robin Lee <cheeselee at fedoraproject.org>
Date:   Sun Jan 2 19:21:32 2011 +0800

    - Get rid of the utility script

 build_sphinx.py            |   45 --------------------------------------------
 python-zope-component.spec |   30 +++++++++++++++++++++++-----
 2 files changed, 24 insertions(+), 51 deletions(-)
---
diff --git a/python-zope-component.spec b/python-zope-component.spec
index c5365cf..b49725d 100644
--- a/python-zope-component.spec
+++ b/python-zope-component.spec
@@ -3,10 +3,8 @@
 Summary: Zope Component Architecture
 Name: python-zope-component
 Version: 3.10.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
-# Utility script for building Sphinx documents
-Source1: build_sphinx.py
 License: ZPLv2.1
 Group: Development/Libraries
 BuildArch: noarch
@@ -38,8 +36,25 @@ defining, registering and looking up components.
 
 %build
 %{__python} setup.py build
-%{__python} %{SOURCE1}
-rm -fr src/zope/component/html/{.buildinfo,.doctrees}
+
+# build Sphinx documents
+COPYRIGHT=`grep Author: PKG-INFO |sed -e 's/Author: //'`
+cat >src/zope/component/conf.py <<END
+templates_path = ['_templates']
+source_suffix = '.txt'
+master_doc = 'index'
+project = '%{modname}'
+copyright = '$COPYRIGHT'
+version = '%{version}'
+release = '%{version}'
+pygments_style = 'sphinx'
+html_static_path = ['_static']
+extensions = []
+END
+
+sphinx-build -b html src/zope/component/ html
+
+rm -fr html/{.buildinfo,.doctrees}
 
 %install
 %{__python} setup.py install --root=$RPM_BUILD_ROOT
@@ -47,7 +62,7 @@ rm -fr src/zope/component/html/{.buildinfo,.doctrees}
 %files
 %defattr(-,root,root,-)
 %doc LICENSE.txt CHANGES.txt COPYRIGHT.txt README.txt 
-%doc src/zope/component/html/
+%doc html/
 %{python_sitelib}/zope/component/
 %exclude %{python_sitelib}/zope/component/*.txt
 %{python_sitelib}/%{modname}-*.egg-info
@@ -55,6 +70,9 @@ rm -fr src/zope/component/html/{.buildinfo,.doctrees}
 
 
 %changelog
+* Sun Jan  2 2011 Robin Lee <cheeselee at fedoraproject.org> - 3.10.0-2
+- Get rid of the utility script
+
 * Sun Jan  2 2011 Robin Lee <cheeselee at fedoraproject.org> - 3.10.0-1
 - Update to 3.10.0
 - Include a utility script to build Sphinx documents


More information about the scm-commits mailing list