你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 20:46:52 +08:00
Updated how the version number is accessed.
这个提交包含在:
@@ -13,13 +13,15 @@
|
|||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# 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,
|
# 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
|
# 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.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
sys.path.insert(0, os.path.abspath('../..'))
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
|
|
||||||
|
import gprMax
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
@@ -70,11 +72,9 @@ author = 'Craig Warren and Antonis Giannopoulos'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
# Read version number from gprMax/gprMax.py
|
version = gprMax.__version__
|
||||||
#version = re.search('^__version__\s*=\s*\'(.*)\'', open('../../gprMax/gprMax.py').read(), re.M).group(1)
|
|
||||||
version = '3.0.0b18'
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version + '(Bowmore)'
|
release = version
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# 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()."""
|
"""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
|
import argparse, datetime, importlib, itertools, os, psutil, sys
|
||||||
from time import perf_counter
|
from time import perf_counter
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
@@ -30,6 +26,7 @@ from collections import OrderedDict
|
|||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
import gprMax
|
||||||
from gprMax.constants import c, e0, m0, z0, floattype
|
from gprMax.constants import c, e0, m0, z0, floattype
|
||||||
from gprMax.exceptions import CmdInputError
|
from gprMax.exceptions import CmdInputError
|
||||||
from gprMax.fields_update import *
|
from gprMax.fields_update import *
|
||||||
@@ -50,7 +47,7 @@ def main():
|
|||||||
"""This is the main function for gprMax."""
|
"""This is the main function for gprMax."""
|
||||||
|
|
||||||
# Print gprMax logo, version, and licencing/copyright information
|
# Print gprMax logo, version, and licencing/copyright information
|
||||||
logo(__version__ + versionname)
|
logo(gprMax.__version__ + ' (Bowmore)')
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
parser = argparse.ArgumentParser(prog='gprMax', description='Electromagnetic modelling software based on the Finite-Difference Time-Domain (FDTD) method')
|
parser = argparse.ArgumentParser(prog='gprMax', description='Electromagnetic modelling software based on the Finite-Difference Time-Domain (FDTD) method')
|
||||||
|
14
setup.py
14
setup.py
@@ -27,15 +27,15 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError('The NumPy package is required to build gprMax.')
|
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
|
import gprMax
|
||||||
packagename = 'gprMax'
|
|
||||||
|
|
||||||
# Read version number from gprMax/gprMax.py
|
# Package name
|
||||||
version = re.search('^__version__\s*=\s*\'(.*)\'',
|
packagename = gprMax.__name__
|
||||||
open(os.path.join(packagename, 'gprMax.py')).read(),
|
|
||||||
re.M).group(1)
|
# Package version
|
||||||
|
version = gprMax.__version__
|
||||||
|
|
||||||
# Process 'install' command line argument
|
# Process 'install' command line argument
|
||||||
if 'install' in sys.argv:
|
if 'install' in sys.argv:
|
||||||
|
在新工单中引用
屏蔽一个用户