From 6c0e05de90513ba3e67c8b4d8a7e1ac4e84363d3 2011-07-31 04:51:40 From: Fernando Perez Date: 2011-07-31 04:51:40 Subject: [PATCH] Disable PDF manual building for distribution and installation. The PDF docs are huge, take forever to build and aren't particularly useful in practice being so unwieldy. We can always build and manually upload a static copy if there's demand, but they don't really serve much useful purpose anymore and bloat our downloads. --- diff --git a/docs/Makefile b/docs/Makefile index 31a9d21..21278c0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -39,12 +39,15 @@ pdf: latex all: html pdf -dist: all - mkdir -p dist - rm -rf dist/* - ln build/latex/ipython.pdf dist/ - cp -al build/html dist/ - @echo "Build finished. Final docs are in dist/" +# For final distribution, only build HTML (our pdf is now so large as to be +# unusable, takes forever to build and just bloats the downloads). We leave +# them hardlinked at the top-level so users find them easily, though the +# original build/html dir is left in-place (useful to reload builds while +# testing). +dist: html + rm -rf html + cp -al build/html . + @echo "Build finished. Final docs are in html/" html: api mkdir -p build/html build/doctrees diff --git a/scripts/ipython_win_post_install.py b/scripts/ipython_win_post_install.py index 5ba38ef..4564c15 100755 --- a/scripts/ipython_win_post_install.py +++ b/scripts/ipython_win_post_install.py @@ -10,12 +10,14 @@ try: except ImportError: pass + def mkshortcut(target,description,link_file,*args,**kw): """make a shortcut if it doesn't exist, and register its creation""" create_shortcut(target, description, link_file,*args,**kw) file_created(link_file) + def install(): """Routine to be run by the win32 installer with the -install switch.""" @@ -111,11 +113,7 @@ def install(): cmd = '"%s"' % cmdbase mkshortcut(pythonw, 'IPython Qt Console', link, cmd, workdir) # Create documentation shortcuts ... - t = prefix + r'\share\doc\ipython\manual\ipython.pdf' - f = ip_start_menu + r'\Manual in PDF.lnk' - mkshortcut(t,r'IPython Manual - PDF-Format',f) - - t = prefix + r'\share\doc\ipython\manual\html\index.html' + t = prefix + r'\share\doc\ipython\manual\index.html' f = ip_start_menu + r'\Manual in HTML.lnk' mkshortcut(t,'IPython Manual - HTML-Format',f) @@ -124,6 +122,7 @@ def remove(): """Routine to be run by the win32 installer with the -remove switch.""" pass + # main() if len(sys.argv) > 1: if sys.argv[1] == '-install': diff --git a/setup.py b/setup.py index 7e05887..5b128a6 100755 --- a/setup.py +++ b/setup.py @@ -170,10 +170,9 @@ if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): for dirpath,dirnames,filenames in os.walk('docs/example'): docdeps += [ pjoin(dirpath,f) for f in filenames if not f.endswith('~') ] - # then, make them all dependencies for the main PDF (the html will get - # auto-generated as well). + # then, make them all dependencies for the main html docs to_update.append( - ('docs/dist/ipython.pdf', + ('docs/dist/index.html', docdeps, "cd docs && make dist") ) @@ -218,8 +217,8 @@ if 'setuptools' in sys.modules: setup_args['extras_require'] = dict( parallel = 'pyzmq>=2.1.4', zmq = 'pyzmq>=2.1.4', - doc='Sphinx>=0.3', - test='nose>=0.10.1', + doc = 'Sphinx>=0.3', + test = 'nose>=0.10.1', ) requires = setup_args.setdefault('install_requires', []) setupext.display_status = False @@ -244,7 +243,9 @@ if 'setuptools' in sys.modules: print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting." sys.exit(1) setup_args['scripts'] = [pjoin('scripts','ipython_win_post_install.py')] - setup_args['options'] = {"bdist_wininst": {"install_script": "ipython_win_post_install.py"}} + setup_args['options'] = {"bdist_wininst": + {"install_script": + "ipython_win_post_install.py"}} else: # If we are running without setuptools, call this function which will # check for dependencies an inform the user what is needed. This is diff --git a/setupbase.py b/setupbase.py index 25cb837..d517dce 100644 --- a/setupbase.py +++ b/setupbase.py @@ -220,7 +220,7 @@ def find_data_files(): ) manual_files = make_dir_struct( 'data', - pjoin('docs','dist'), + pjoin('docs','html'), pjoin(docdirbase,'manual') )