Commit 2242226b authored by Paul McCarthy's avatar Paul McCarthy
Browse files

fslpy now has an official version number, as stored in

fsl/ The modification has not been tested.
parent 08cbd7c8
......@@ -34,8 +34,11 @@ extensions = [
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
fsl.version module
.. automodule:: fsl.version
......@@ -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 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
# - fslpy version information.
# Author: Paul McCarthy <>
"""The sole purpose of this module is as a container for the ``fslpy``
version number and information.
.. autosummary::
.. 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 <>
import os.path as op
from setuptools import setup
from setuptools import find_packages
# The directory in whihc this file is contained.
basedir = op.dirname(__file__)
# Figure out the current fslpy version, as defined in fsl/ We
# don't want to import the fsl package, as this may cause build problems.
# So we manually parse the contents of fsl/ to extract the
# version number.
version = {}
with open(op.join(basedir, "fsl", "")) as f:
exec(, version)
description='Front end to FSL tools',
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment