From 55fa12a7449ac45c9b6865a43cfff197775422fb 2008-06-11 22:01:38 From: Brian E Granger Date: 2008-06-11 22:01:38 Subject: [PATCH] Fixed setupbase.py and MANIFEST.in to reflect all the changes to docs. Currently, the full tree of our rst docs are not included in the data_files. Not sure if/how we want to handle that. It was easy when we had a single file documentation, but not we have a full directory hierarchy full of rst files. --- diff --git a/MANIFEST.in b/MANIFEST.in index 43955dd..7fa5a4a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,20 +13,15 @@ graft IPython/config graft IPython/testing graft IPython/tools -graft doc -exclude doc/\#* -exclude doc/*.1 -exclude doc/ChangeLog.* -exclude doc/update_version.sh +graft docs +exclude docs/\#* +exclude docs/man/*.1 +exclude docs/ChangeLog.* # There seems to be no way of excluding whole subdirectories, other than # manually excluding all their subdirs. distutils really is horrible... -exclude doc/attic/* -exclude doc/build/doctrees/* -exclude doc/build/html/_sources/* -exclude doc/build/html/_static/* -exclude doc/build/html/* -exclude doc/build/latex/* +exclude docs/attic/* +exclude docs/build/* global-exclude *~ global-exclude *.flc diff --git a/setup.py b/setup.py index 5826432..b273651 100755 --- a/setup.py +++ b/setup.py @@ -88,17 +88,21 @@ if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): "cd doc && gzip -9c pycolor.1 > pycolor.1.gz"), ] + # Only build the docs is sphinx is present try: import sphinx except ImportError: pass else: + # BEG: This is disabled as I am not sure what to depend on. + # I actually don't think we should be automatically building + # the docs for people. # The do_sphinx scripts builds html and pdf, so just one # target is enough to cover all manual generation - to_update.append( - ('doc/manual/ipython.pdf', - ['IPython/Release.py','doc/source/ipython.rst'], - "cd doc && python do_sphinx.py") + # to_update.append( + # ('doc/manual/ipython.pdf', + # ['IPython/Release.py','doc/source/ipython.rst'], + # "cd docs && python do_sphinx.py") ) [ target_update(*t) for t in to_update ] diff --git a/setupbase.py b/setupbase.py index f043daf..52d3695 100644 --- a/setupbase.py +++ b/setupbase.py @@ -148,19 +148,15 @@ def find_data_files(): # We only need to exclude from this things NOT already excluded in the # MANIFEST.in file. exclude = ('.sh','.1.gz') - docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('doc/*')) - examfiles = filter(isfile, glob('doc/examples/*.py')) - manfiles = filter(isfile, glob('doc/manual/*')) - manstatic = filter(isfile, glob('doc/manual/_static/*')) - manpages = filter(isfile, glob('doc/*.1.gz')) - scriptfiles = filter(isfile, ['scripts/ipython','scripts/pycolor', - 'scripts/irunner']) + # We need to figure out how we want to package all of our rst docs? + # docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('docs/*')) + examfiles = filter(isfile, glob('docs/examples/core/*.py')) + examfiles.append(filter(isfile, glob('docs/examples/kernel/*.py'))) + manpages = filter(isfile, glob('docs/man/*.1.gz')) igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*')) - data_files = [('data', docdirbase, docfiles), + data_files = [#('data', docdirbase, docfiles), ('data', pjoin(docdirbase, 'examples'),examfiles), - ('data', pjoin(docdirbase, 'manual'),manfiles), - ('data', pjoin(docdirbase, 'manual/_static'),manstatic), ('data', manpagebase, manpages), ('data',pjoin(docdirbase, 'extensions'),igridhelpfiles), ]