Browse files

sphinxext: convert the Sphinx extensions into a `numpydoc` package th…

…at can be distributed separately
  • Loading branch information...
1 parent 9a63ebd commit d215183d0d2cfc49973bc4bc73555c2b112e546e @pv pv committed Apr 1, 2009
View
2 doc/sphinxext/MANIFEST.in
@@ -0,0 +1,2 @@
+recursive-include tests *.py
+include *.txt
View
1 doc/sphinxext/__init__.py
@@ -0,0 +1 @@
+from numpydoc import setup
View
2 doc/sphinxext/autosummary.py
@@ -62,7 +62,7 @@
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.",
View
4 doc/sphinxext/only_directives.py
@@ -11,8 +11,8 @@
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
View
5 doc/sphinxext/plot_directive.py
@@ -76,8 +76,9 @@
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):
View
31 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",
+ ],
+ },
+)

0 comments on commit d215183

Please sign in to comment.