コード例 #1
0
 def is_engine(path):
     # Prevent recursively detecting modules in self and other
     # Godot sources when using `custom_modules` build option.
     version_path = os.path.join(path, "version.py")
     if os.path.exists(version_path):
         with open(version_path) as f:
             version = {}
             exec(f.read(), version)
             if version.get("short_name") == "godot":
                 return True
     return False
コード例 #2
0
ファイル: setup.py プロジェクト: grycap/cpyutils
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup
import version

setup(name='cpyutils',
      version=version.get(),
      description='CLUES Python utils - Utils and General classes that spin off from CLUES',
      author='Carlos de Alfonso',
      author_email='*****@*****.**',
      url='https://github.com/grycap/cpyutils',
      packages = [ 'cpyutils' ],
      package_dir = { 'cpyutils' : '.'},
      # download_url = "https://github.com/grycap/cpyutils/tarball/%s" % version.get(),
      py_modules = []
)
コード例 #3
0
ファイル: postpro.py プロジェクト: tymurbaniak/grot
"""Postprocessor module used to plot pictures"""

import math
import os
import numpy
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.colors as clr
from matplotlib.collections import PatchCollection
import tools
import version
import stress

VERS = version.get()

#Matplotlib style functions
PATCH_LINE = 0.0
ALPHA = 1.0
plt.rcParams["font.family"] = "monospace"
plt.rcParams["font.size"] = 9
plt.rcParams["font.weight"] = 100
plt.rcParams["text.hinting_factor"] = 1
plt.rcParams["patch.linewidth"] = PATCH_LINE
plt.rcParams["legend.fontsize"] = 9


def minmax(colors, eles):
    """Min and max scatter plotting"""
    #Max
    max_value = max(colors)
    max_string = "%.3e" % max_value
コード例 #4
0
ファイル: run.py プロジェクト: tymurbaniak/grot
import solver
import postpro
import deformed
import gallery
import version
import prob
import copy
import plast
import gc

#start timer
TIME = tools.timer()

#welcome message
print("")
print("GRoT> ver. " + version.get() + ", [Graficzny Rozwiązywacz Tarcz]")
print("................................................\n")

#read optional command line arguments for input and output path folder
PROJECT_PATH = False #project will contain input bmp image and input.txt with parameters
RESULT_PATH = False #result will contain output of grot
args = sys.argv

if len(args) > 1:
    for i in range(len(args)):
        if args[i] == "-i":
            PROJECT_PATH = args[i + 1]
        elif args[i] == "-o":
            RESULT_PATH = args[i + 1]

#read input file into list
コード例 #5
0
ファイル: version-template.py プロジェクト: laochailan/taisei
#!/usr/bin/env python3

import os
import sys
import version

assert(len(sys.argv) == 6)

root = sys.argv[1]
inpath = sys.argv[2]
outpath = sys.argv[3]
buildtype = sys.argv[4].strip()
v_fallback = sys.argv[5].strip()

version = version.get(fallback=v_fallback, rootdir=root)

if buildtype.lower().startswith("debug"):
    buildtype_def = "#define DEBUG_BUILD"
else:
    buildtype_def = "#define RELEASE_BUILD"

version = [("${TAISEI_VERSION_MAJOR}", version.major),
           ("${TAISEI_VERSION_MINOR}", version.minor),
           ("${TAISEI_VERSION_PATCH}", version.patch),
           ("${TAISEI_VERSION_TWEAK}", version.tweak),
           ("${TAISEI_VERSION}", version.string),
           ("${TAISEI_VERSION_FULL_STR}", version.full_string),
           ("${MESON_BUILD_TYPE}", buildtype),
           ("${ICONS_DIR}", os.path.join(root, "misc", "icons")),
           ("${BUILDTYPE_DEFINE}", buildtype_def)]
コード例 #6
0
 def version(self, result, error):
     try:
         server_version = self._XMLRPC_SERVER.get_version()
         return True, "Client version: %s\nServer version: %s" % (version.get(), server_version)
     except:
         return True, "Client version: %s\nCould not contact server" % version.get()
コード例 #7
0
ファイル: run.py プロジェクト: jfckm/grot
import prep
import tools
import solver
import postpro
import deformed
import gallery
import version
import prob
import plast

#start timer
TIME = tools.timer()

#welcome message
print("")
print("GRoT> ver. " + version.get() + ", [Graficzny Rozwiązywacz Tarcz]")
print("................................................\n")

#read input file into list
INP_FILE = open("input.txt", "r")
INP_FILE_LINES = INP_FILE.readlines()

INP_LINES = []

#create list of lines and words with no end line symbols
for i in range(len(INP_FILE_LINES)):
    INP_LINES.append(INP_FILE_LINES[i].rstrip().split(" "))

INP_FILE.close()

コード例 #8
0
ファイル: conf.py プロジェクト: limix/ncephes
def get_version():
    import version

    return version.get()
コード例 #9
0
def get_version():
    return version.get()
コード例 #10
0
ファイル: version-template.py プロジェクト: tomoyosiki/taisei
#!/usr/bin/env python3

import os
import sys
import version

assert (len(sys.argv) == 6)

root = sys.argv[1]
inpath = sys.argv[2]
outpath = sys.argv[3]
buildtype = sys.argv[4].strip()
v_fallback = sys.argv[5].strip()

version = version.get(fallback=v_fallback, rootdir=root)

if buildtype.lower().startswith("debug"):
    buildtype_def = "#define DEBUG_BUILD"
else:
    buildtype_def = "#define RELEASE_BUILD"

version = [("${TAISEI_VERSION_MAJOR}", version.major),
           ("${TAISEI_VERSION_MINOR}", version.minor),
           ("${TAISEI_VERSION_PATCH}", version.patch),
           ("${TAISEI_VERSION_TWEAK}", version.tweak),
           ("${TAISEI_VERSION}", version.string),
           ("${TAISEI_VERSION_FULL_STR}", version.full_string),
           ("${MESON_BUILD_TYPE}", buildtype),
           ("${ICONS_DIR}", os.path.join(root, "misc", "icons")),
           ("${BUILDTYPE_DEFINE}", buildtype_def)]
コード例 #11
0
ファイル: conf.py プロジェクト: Horta/ncephes
def get_version():
    import version

    return version.get()
コード例 #12
0
ファイル: postpro.py プロジェクト: tutajrobert/quadraw
"""Postprocessor module used to plot pictures"""

import math
import os
import numpy
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.colors as clr
from matplotlib.collections import PatchCollection
import tools
import version
import stress

VERS = version.get()

#Matplotlib style functions
PATCH_LINE = 0.0
ALPHA = 1.0
plt.rcParams["font.family"] = "monospace"
plt.rcParams["font.size"] = 9
plt.rcParams["font.weight"] = 100
plt.rcParams["text.hinting_factor"] = 1
plt.rcParams["patch.linewidth"] = PATCH_LINE
plt.rcParams["legend.fontsize"] = 9

def minmax(colors, eles):
    """Min and max scatter plotting"""
    #Max
    max_value = max(colors)
    max_string = "%.3e" % max_value
    max_index = colors.index(max_value) + 1
コード例 #13
0
def show_version(*args):
    print("jsopo %s" % version.get())
    sys.exit(0)