[pygccxml-commit] SF.net SVN: pygccxml: [12] pygccxml_dev
Brought to you by:
mbaas,
roman_yakovenko
From: <mb...@us...> - 2006-04-28 10:09:55
|
Revision: 12 Author: mbaas Date: 2006-04-28 03:09:48 -0700 (Fri, 28 Apr 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=12&view=rev Log Message: ----------- Modified the setup script so that it can be used to create source distributions. Added MANIFEST.in. Modified Paths: -------------- pygccxml_dev/setup.py Added Paths: ----------- pygccxml_dev/MANIFEST.in Added: pygccxml_dev/MANIFEST.in =================================================================== --- pygccxml_dev/MANIFEST.in (rev 0) +++ pygccxml_dev/MANIFEST.in 2006-04-28 10:09:48 UTC (rev 12) @@ -0,0 +1,11 @@ +include LICENSE_1_0.txt +include unittests/*.py +include unittests/data/* +recursive-include docs/apidocs *.css +recursive-include docs/apidocs *.html +include docs/*.rest +include docs/*.png +include docs/example/* +include docs/history/* +include docs/logos/* + Modified: pygccxml_dev/setup.py =================================================================== --- pygccxml_dev/setup.py 2006-04-28 10:07:47 UTC (rev 11) +++ pygccxml_dev/setup.py 2006-04-28 10:09:48 UTC (rev 12) @@ -1,3 +1,4 @@ +#!/usr/bin/env python # Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at @@ -3,14 +4,59 @@ # http://www.boost.org/LICENSE_1_0.txt) -import os +import sys, os, os.path from distutils import sysconfig from distutils.core import setup +from distutils.cmd import Command -setup( name="pygccxml" - , description="GCC-XML generated file reader" - , author="Roman Yakovenko" - , packages=[ 'pygccxml' - , 'pygccxml.declarations' - , 'pygccxml.parser' - , 'pygccxml.utils' ] +def generate_doc(): + """Generate the epydoc reference manual. + """ + print "Generating epydoc files..." + options = [ '--output="%s"'%os.path.join('docs', 'apidocs'), + '--docformat=epytext', + '--url=http://www.language-binding.net', + '--name=pygccxml', +# '--verbose', + 'pygccxml'] + cmd_line = "epydoc " + ' '.join( options ) + print cmd_line + os.system(cmd_line) + + +class doc_cmd(Command): + """This is a new distutils command 'doc' to build the epydoc manual. + """ + + description = 'build the API reference using epydoc' + user_options = [('no-doc', None, "don't run epydoc")] + boolean_options = ['no-doc'] + + def initialize_options (self): + self.no_doc = 0 + + def finalize_options (self): + pass + + def run(self): + if self.no_doc: + return + generate_doc() + + +# Generate the doc when a source distribution is created +if sys.argv[-1]=="sdist": + generate_doc() + + +setup( name = "pygccxml", + version = "0.7.2", + description = "GCC-XML generated file reader", + author = "Roman Yakovenko", + author_email = "rom...@gm...", + url = 'http://pygccxml.sourceforge.net', + packages = [ 'pygccxml', + 'pygccxml.declarations', + 'pygccxml.parser', + 'pygccxml.utils' ], + cmdclass = {"doc" : doc_cmd} ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |