summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2009-04-01 21:57:08 +0000
committerPauli Virtanen <pav@iki.fi>2009-04-01 21:57:08 +0000
commitd215183d0d2cfc49973bc4bc73555c2b112e546e (patch)
treeaed223e62771d290cfe72ef6b4efafad87652a41
parent9a63ebd48281c994c39c374b5cdc960acb82963c (diff)
downloadnumpy-d215183d0d2cfc49973bc4bc73555c2b112e546e.tar.gz
sphinxext: convert the Sphinx extensions into a `numpydoc` package that can be distributed separately
-rw-r--r--doc/sphinxext/MANIFEST.in2
-rw-r--r--doc/sphinxext/__init__.py1
-rw-r--r--doc/sphinxext/autosummary.py2
-rw-r--r--doc/sphinxext/only_directives.py4
-rw-r--r--doc/sphinxext/plot_directive.py5
-rw-r--r--doc/sphinxext/setup.py31
6 files changed, 40 insertions, 5 deletions
diff --git a/doc/sphinxext/MANIFEST.in b/doc/sphinxext/MANIFEST.in
new file mode 100644
index 000000000..f88ed785c
--- /dev/null
+++ b/doc/sphinxext/MANIFEST.in
@@ -0,0 +1,2 @@
+recursive-include tests *.py
+include *.txt
diff --git a/doc/sphinxext/__init__.py b/doc/sphinxext/__init__.py
index e69de29bb..ae9073bc4 100644
--- a/doc/sphinxext/__init__.py
+++ b/doc/sphinxext/__init__.py
@@ -0,0 +1 @@
+from numpydoc import setup
diff --git a/doc/sphinxext/autosummary.py b/doc/sphinxext/autosummary.py
index f7e9a1291..48443a26b 100644
--- a/doc/sphinxext/autosummary.py
+++ b/doc/sphinxext/autosummary.py
@@ -62,7 +62,7 @@ from sphinx.util import patfilter
from docscrape_sphinx import get_doc_object
import warnings
-warnings.warn("This autosummary extension will be eventually moved to "
+warnings.warn("The numpydoc.autosummary extension will be eventually moved to "
"sphinx.ext.autosummary. One version is already available in "
"Sphinx >= 0.6; expect this module to be deprecated after all "
"remaining features have been integrated there.",
diff --git a/doc/sphinxext/only_directives.py b/doc/sphinxext/only_directives.py
index c25760ad0..c0dff7e65 100644
--- a/doc/sphinxext/only_directives.py
+++ b/doc/sphinxext/only_directives.py
@@ -11,8 +11,8 @@ except ImportError:
from sphinx.writers.latex import LaTeXTranslator
import warnings
- warnings.warn("The only_directives module is deprecated; please use "
- "the only:: directive available in Sphinx >= 0.6",
+ warnings.warn("The numpydoc.only_directives module is deprecated;"
+ "please use the only:: directive available in Sphinx >= 0.6",
DeprecationWarning, stacklevel=2)
from docutils.parsers.rst import directives
diff --git a/doc/sphinxext/plot_directive.py b/doc/sphinxext/plot_directive.py
index 74bd7a24b..45b4c3f78 100644
--- a/doc/sphinxext/plot_directive.py
+++ b/doc/sphinxext/plot_directive.py
@@ -76,8 +76,9 @@ import sys, os, glob, shutil, imp, warnings, cStringIO, re, textwrap
import warnings
warnings.warn("A plot_directive module is also available under "
- "matplotlib.sphinxext; expect this module to be deprecated "
- "after relevant features have been integrated there.",
+ "matplotlib.sphinxext; expect this numpydoc.plot_directive "
+ "module to be deprecated after relevant features have been "
+ "integrated there.",
FutureWarning, stacklevel=2)
def setup(app):
diff --git a/doc/sphinxext/setup.py b/doc/sphinxext/setup.py
new file mode 100644
index 000000000..2e29ad55d
--- /dev/null
+++ b/doc/sphinxext/setup.py
@@ -0,0 +1,31 @@
+from distutils.core import setup
+import setuptools
+import sys, os
+
+version = "0.1"
+
+setup(
+ name="numpydoc",
+ packages=["numpydoc"],
+ package_dir={"numpydoc": ""},
+ version=version,
+ description="Sphinx extension to support docstrings in Numpy format",
+ # classifiers from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+ classifiers=["Development Status :: 3 - Alpha",
+ "Environment :: Plugins",
+ "License :: OSI Approved :: BSD License",
+ "Topic :: Documentation"],
+ keywords="sphinx numpy",
+ author="Pauli Virtanen and others",
+ author_email="pav@iki.fi",
+ url="http://projects.scipy.org/numpy/browser/trunk/doc/sphinxext",
+ license="BSD",
+ zip_safe=False,
+ install_requires=["Sphinx >= 0.5"],
+ package_data={'numpydoc': 'tests'},
+ entry_points={
+ "console_scripts": [
+ "autosummary_generate = numpydoc.autosummary_generate:main",
+ ],
+ },
+)