Skip to content

Expose extension version #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion numpydoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import division, absolute_import, print_function

__version__ = '0.8.0.dev0'
from ._version import __version__

from .numpydoc import setup
4 changes: 4 additions & 0 deletions numpydoc/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-

__version__ = '0.8.0.dev0'

4 changes: 3 additions & 1 deletion numpydoc/numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
raise RuntimeError("Sphinx 1.0.1 or newer is required")

from .docscrape_sphinx import get_doc_object, SphinxDocString
from ._version import __version__

if sys.version_info[0] >= 3:
sixu = lambda s: s
Expand Down Expand Up @@ -140,7 +141,8 @@ def setup(app, get_doc_object_=get_doc_object):
app.add_domain(NumpyPythonDomain)
app.add_domain(NumpyCDomain)

metadata = {'parallel_read_safe': True}
metadata = {'version': __version__,
'parallel_read_safe': True}
return metadata

# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[0:2] < (3, 4):
raise RuntimeError("Python version 2.7 or >= 3.4 required.")

with open('numpydoc/__init__.py') as fid:
with open('numpydoc/_version.py') as fid:
for line in fid:
if line.startswith('__version__'):
version = line.strip().split()[-1][1:-1]
Expand Down