def _check_minimum_versions(remote_config): # Checks whether a minimum download API is specified if 'min_download_api' in remote_config: try: min_download_api = LooseVersion( remote_config['min_download_api']) except AttributeError: min_download_api = LooseVersion(DOWNLOAD_API_VERSION) current_download_api_version = LooseVersion(DOWNLOAD_API_VERSION) if min_download_api > current_download_api_version: raise ValueError( "This example requires a newer version of NiftyNet.") # Checks whether a minimum NiftyNet version is specified if 'min_niftynet' in remote_config: try: min_niftynet = LooseVersion(remote_config['min_niftynet']) current_version = LooseVersion(get_niftynet_version()) except AttributeError: min_niftynet = LooseVersion('0') current_version = LooseVersion('0') if min_niftynet > current_version: raise ValueError( "This example requires NiftyNet " "version %s or later.", min_niftynet)
def _check_minimum_versions(remote_config): # Checks whether a minimum download API is specified if 'min_download_api' in remote_config: min_download_api = remote_config['min_download_api'] current_download_api_version = DOWNLOAD_API_VERSION if LooseVersion(min_download_api) > LooseVersion( current_download_api_version): raise ValueError( "This example requires a newer version of NiftyNet.") # Checks whether a minimum NiftyNet version is specified if 'min_niftynet' in remote_config: min_niftynet = remote_config['min_niftynet'] current_version = get_niftynet_version() if LooseVersion(min_niftynet) > LooseVersion(current_version): raise ValueError("This example requires NiftyNet " "version %s or later.", min_niftynet)
def _check_minimum_versions(remote_config): # Checks whether a minimum download API is specified if 'min_download_api' in remote_config: min_download_api = remote_config['min_download_api'] current_download_api_version = DOWNLOAD_API_VERSION if LooseVersion(min_download_api) > LooseVersion( current_download_api_version): raise ValueError( "This example requires a newer version of NiftyNet.") # Checks whether a minimum NiftyNet version is specified if 'min_niftynet' in remote_config: min_niftynet = remote_config['min_niftynet'] current_version = get_niftynet_version() if LooseVersion(min_niftynet) > LooseVersion(current_version): raise ValueError("This example requires NiftyNet version " + min_niftynet + " or later.")
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from io import open import versioneer from niftynet.utilities.versioning import get_niftynet_version niftynet_version = get_niftynet_version() # Get the summary description = 'An open-source convolutional neural networks platform' + \ ' for research in medical image analysis and' + \ ' image-guided therapy' # Get the long description with open('README.md', encoding='utf-8') as f: long_description = f.read() setup( name='NiftyNet', version=niftynet_version, cmdclass=versioneer.get_cmdclass(), description=description, long_description=long_description, long_description_content_type='text/markdown', url='http://niftynet.io/', author='NiftyNet Consortium', author_email='*****@*****.**', license='Apache 2.0', classifiers=[ 'Development Status :: 3 - Alpha',
# rather than 'n'. That way the Python module index is displayed more nicely. modindex_common_prefix = ['niftynet.'] # General information about the project. project = u'NiftyNet' copyright = u'2017, NiftyNet Consortium' author = u'NiftyNet Consortium' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # from niftynet.utilities.versioning import get_niftynet_version try: # The short X.Y version. version = get_niftynet_version().split('.dev')[0] except (IndexError, AttributeError): version = u'' # The full version, including alpha/beta/rc tags. release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx'
'niftynet.' ] # General information about the project. project = u'NiftyNet' copyright = u'2017, NiftyNet Consortium' author = u'NiftyNet Consortium' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # from niftynet.utilities.versioning import get_niftynet_version try: # The short X.Y version. version = get_niftynet_version().split('.dev')[0] except (IndexError, AttributeError): version = u'' # The full version, including alpha/beta/rc tags. release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx'
# rather than 'n'. That way the Python module index is displayed more nicely. modindex_common_prefix = ['niftynet.'] # General information about the project. project = u'NiftyNet' copyright = u'2018, the NiftyNet Consortium' author = u'the NiftyNet Consortium' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # from niftynet.utilities.versioning import get_niftynet_version try: # The short X.Y version. version = get_niftynet_version().split('+')[0] except (IndexError, AttributeError): version = u'' # The full version, including alpha/beta/rc tags. release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx'