Skip to content
Snippets Groups Projects
Commit 2242226b authored by Paul McCarthy's avatar Paul McCarthy
Browse files

fslpy now has an official version number, as stored in

fsl/version.py. The setup.py modification has not been tested.
parent 08cbd7c8
No related branches found
No related tags found
No related merge requests found
......@@ -34,8 +34,11 @@ extensions = [
'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
'sphinx.ext.graphviz',
'sphinx.ext.todo',
]
todo_include_todos = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
......@@ -57,9 +60,10 @@ copyright = u'2015, Paul McCarthy, FMRIB Centre'
# built documents.
#
# The short X.Y version.
version = ''
import fsl
version = fsl.__version__
# The full version, including alpha/beta/rc tags.
release = ''
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
fsl package
===========
fslpy |version|
===============
.. automodule:: fsl
:members:
......
fsl.version module
==================
.. automodule:: fsl.version
:members:
:undoc-members:
:show-inheritance:
......@@ -39,9 +39,12 @@ The conventional way to run ``fslpy`` is as follows::
``logging`` level for tracking memory usage. The log level is
attached to the ``logging`` module as ``logging.MEMORY``, and
an associated log function is attached as ``logging.memory``.
"""
.. note:: The ``fslpy`` version number (currently |version|) is set in a
single place - the :mod:`fsl.version` module.
"""
import logging
import pkgutil
import warnings
......@@ -56,6 +59,14 @@ import subprocess
import fsl.tools as tools
import fsl.utils.settings as fslsettings
import fsl.version
__version__ = fsl.version.__version__
"""The current ``fslpy`` version number. This information is stored in the
:mod:`fsl.version` module.
"""
def main(args=None):
"""``fslpy`` entry point.
......
#!/usr/bin/env python
#
# version.py - fslpy version information.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""The sole purpose of this module is as a container for the ``fslpy``
version number and information.
.. autosummary::
__version__
.. todo:: Define a formal ``fslpy`` version number updating scheme.
"""
__version__ = '0.1'
"""Current version number, as a string. """
......@@ -5,15 +5,29 @@
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
import os.path as op
from setuptools import setup
from setuptools import find_packages
# The directory in whihc this setup.py file is contained.
basedir = op.dirname(__file__)
# Figure out the current fslpy version, as defined in fsl/version.py. We
# don't want to import the fsl package, as this may cause build problems.
# So we manually parse the contents of fsl/version.py to extract the
# version number.
version = {}
with open(op.join(basedir, "fsl", "version.py")) as f:
exec(f.read(), version)
setup(
name='fslpy',
version='0.1',
version=version['__version__'],
description='Front end to FSL tools',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment