From 2d00e4be09341b12292be87019a3fbb4c019af85 Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Jan 02 2011 11:21:32 +0000 Subject: - Get rid of the utility script --- diff --git a/build_sphinx.py b/build_sphinx.py deleted file mode 100644 index 28417ca..0000000 --- a/build_sphinx.py +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- - -import email -import sphinx -from os.path import join, isdir -import os - -def main(): - confPyTemplate = """\ -templates_path = ['_templates'] -source_suffix = '.txt' -master_doc = 'index' -project = '%(project)s' -copyright = '%(copyright)s' -version = '%(version)s' -release = '%(release)s' -#today_fmt = '%%B %%d, %%Y' -pygments_style = 'sphinx' -#html_style = 'default.css' -html_static_path = ['_static'] -#html_last_updated_fmt = '%%b %%d, %%Y' -extensions = [] -""" - - f = open('PKG-INFO', 'r') - metadata = email.message_from_file(f) - srcDir = join('src', metadata.get('Name').replace('.', '/')) - confPyPath = join(srcDir, 'conf.py') - confPy = open(confPyPath, 'w') - confPy.write(confPyTemplate % dict( - project=metadata.get('Name'), - copyright=metadata.get('Author'), - version=metadata.get('Version'), - release=metadata.get('Version'), - )) - confPy.close() - buildDir = join(srcDir, 'html') - if not isdir(buildDir): - os.mkdir(buildDir) - sphinx.main(argv=['sphinx-build', '-b', 'html', srcDir, buildDir]) - - -if __name__ == "__main__": - main() 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 < - 3.10.0-2 +- Get rid of the utility script + * Sun Jan 2 2011 Robin Lee - 3.10.0-1 - Update to 3.10.0 - Include a utility script to build Sphinx documents