Updated how the version number is accessed.

这个提交包含在:
craig-warren
2016-01-20 19:28:32 +00:00
父节点 0ec43cda02
当前提交 b275e6a65a
共有 4 个文件被更改,包括 16 次插入17 次删除

查看文件

@@ -13,13 +13,15 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import os, re, shlex, sys
import os, sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../..'))
import gprMax
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@@ -70,11 +72,9 @@ author = 'Craig Warren and Antonis Giannopoulos'
# built documents.
#
# The short X.Y version.
# Read version number from gprMax/gprMax.py
#version = re.search('^__version__\s*=\s*\'(.*)\'', open('../../gprMax/gprMax.py').read(), re.M).group(1)
version = '3.0.0b18'
version = gprMax.__version__
# The full version, including alpha/beta/rc tags.
release = version + '(Bowmore)'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

查看文件

@@ -0,0 +1,2 @@
# This is where the version number is set and read by setup.py and conf.py (for the docs)
__version__ = '3.0.0b18'

查看文件

@@ -18,10 +18,6 @@
"""gprMax.gprMax: provides entry point main()."""
# Set the version number here
__version__ = '3.0.0b18'
versionname = ' (Bowmore)'
import argparse, datetime, importlib, itertools, os, psutil, sys
from time import perf_counter
from copy import deepcopy
@@ -30,6 +26,7 @@ from collections import OrderedDict
import numpy as np
import gprMax
from gprMax.constants import c, e0, m0, z0, floattype
from gprMax.exceptions import CmdInputError
from gprMax.fields_update import *
@@ -50,7 +47,7 @@ def main():
"""This is the main function for gprMax."""
# Print gprMax logo, version, and licencing/copyright information
logo(__version__ + versionname)
logo(gprMax.__version__ + ' (Bowmore)')
# Parse command line arguments
parser = argparse.ArgumentParser(prog='gprMax', description='Electromagnetic modelling software based on the Finite-Difference Time-Domain (FDTD) method')

查看文件

@@ -27,15 +27,15 @@ try:
except ImportError:
raise ImportError('The NumPy package is required to build gprMax.')
import glob, os, pwd, re, shutil, sys
import glob, os, pwd, shutil, sys
# Main package name
packagename = 'gprMax'
import gprMax
# Read version number from gprMax/gprMax.py
version = re.search('^__version__\s*=\s*\'(.*)\'',
open(os.path.join(packagename, 'gprMax.py')).read(),
re.M).group(1)
# Package name
packagename = gprMax.__name__
# Package version
version = gprMax.__version__
# Process 'install' command line argument
if 'install' in sys.argv: