From 5a131c30a28b267b14e65d7579bd2cf7ec53f101 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 23 Mar 2008 17:43:22 +0000 Subject: [PATCH] Don't install scripts twice. Thanks to lunar. --- README | 4 ++-- doc/builders.rst | 2 +- doc/intro.rst | 10 +++++----- setup.py | 3 ++- sphinx/quickstart.py | 12 ++++++------ 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README b/README index 8fd9ccec3..78e71c610 100644 --- a/README +++ b/README @@ -17,8 +17,8 @@ Reading the docs After installing:: cd doc - sphinx-build.py . .build - browser .build/index.html + sphinx-build . _build/html + browser _build/index.html Or read them online at . diff --git a/doc/builders.rst b/doc/builders.rst index 620d61389..1b0f6940b 100644 --- a/doc/builders.rst +++ b/doc/builders.rst @@ -10,7 +10,7 @@ These are the built-in Sphinx builders. More builders can be added by :ref:`extensions `. The builder's "name" must be given to the **-b** command-line option of -:program:`sphinx-build.py` to select a builder. +:program:`sphinx-build` to select a builder. .. class:: StandaloneHTMLBuilder diff --git a/doc/intro.rst b/doc/intro.rst index 7dabb69fa..c5e6f71b3 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -31,11 +31,11 @@ The root directory of a documentation collection is called the :dfn:`documentation root`. There's nothing special about it; it just needs to contain the Sphinx configuration file, :file:`conf.py`. -Sphinx comes with a script called :program:`sphinx-quickstart.py` that sets up a +Sphinx comes with a script called :program:`sphinx-quickstart` that sets up a documentation root and creates a default :file:`conf.py` from a few questions it asks you. Just run :: - $ sphinx-quickstart.py + $ sphinx-quickstart and answer the questions. @@ -43,17 +43,17 @@ and answer the questions. Running a build --------------- -A build is started with the :program:`sphinx-build.py` script. It is called +A build is started with the :program:`sphinx-build` script. It is called like this:: - $ sphinx-build.py -b latex sourcedir builddir + $ sphinx-build -b latex sourcedir builddir where *sourcedir* is the :term:`documentation root`, and *builddir* is the directory in which you want to place the built documentation (it must be an existing directory). The :option:`-b` option selects a builder; in this example Sphinx will build LaTeX files. -The :program:`sphinx-build.py` script has several more options: +The :program:`sphinx-build` script has several more options: **-a** If given, always write all output files. The default is to only write output diff --git a/setup.py b/setup.py index 59063eb92..42358bde1 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,8 @@ setup( platforms='any', packages=['sphinx'], include_package_data=True, - scripts=['sphinx-build.py', 'sphinx-web.py', 'sphinx-quickstart.py'], + # replaced by the entry points + #scripts=['sphinx-build.py', 'sphinx-web.py', 'sphinx-quickstart.py'], entry_points={ 'console_scripts': [ 'sphinx-build = sphinx:main', diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 8302a2218..5793ef92a 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -19,7 +19,7 @@ QUICKSTART_CONF = '''\ # -*- coding: utf-8 -*- # # %(project)s documentation build configuration file, created by -# sphinx-quickstart.py on %(now)s. +# sphinx-quickstart on %(now)s. # # This file is execfile()d with the current directory set to its containing dir. # @@ -151,7 +151,7 @@ htmlhelp_basename = '%(project)sdoc' ''' MASTER_FILE = '''\ -.. %(project)s documentation master file, created by sphinx-quickstart.py on %(now)s. +.. %(project)s documentation master file, created by sphinx-quickstart on %(now)s. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. @@ -178,7 +178,7 @@ MAKEFILE = '''\ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = sphinx-build.py +SPHINXBUILD = sphinx-build PAPER = ALLSPHINXOPTS = -d %(rbuilddir)s/doctrees -D latex_paper_size=$(PAPER) \\ @@ -342,7 +342,7 @@ document is a custom template, you can also set this to another filename.''' 'index') print ''' If you are under Unix, a Makefile can be generated for you so that you -only have to run e.g. `make html' instead of invoking sphinx-build.py +only have to run e.g. `make html' instead of invoking sphinx-build directly.''' do_prompt(d, 'makefile', 'Create Makefile? (y/n)', os.name == 'posix' and 'y' or 'n', boolean) @@ -387,11 +387,11 @@ directly.''' print bold('Finished: An initial directory structure has been created.') print ''' You should now populate your master file %s and create other documentation -source files. Use the sphinx-build.py script to build the docs, like so: +source files. Use the sphinx-build script to build the docs, like so: ''' % masterfile + (create_makefile and ''' make ''' or ''' - sphinx-build.py -b %s %s + sphinx-build -b %s %s ''' % (srcdir, builddir))