def create_userguide(): from docutils.core import publish_cmdline print 'Creating user guide ...' ugdir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.join(ugdir, '..', '..', 'src', 'robot')) from version import get_version print 'Version:', get_version() vfile = open(os.path.join(ugdir, 'src', 'version.txt'), 'w') vfile.write('.. |version| replace:: %s\n' % get_version()) vfile.close() description = 'HTML generator for Robot Framework User Guide.' arguments = ''' --time --stylesheet-path=src/userguide.css src/RobotFrameworkUserGuide.txt RobotFrameworkUserGuide.html '''.split('\n')[1:-1] os.chdir(ugdir) publish_cmdline(writer_name='html', description=description, argv=arguments) os.unlink(vfile.name) ugpath = os.path.abspath(arguments[-1]) print ugpath return ugpath, get_version(sep='-')
def __init__(self, old_version, new_version, publish_release): self.old_version = version.get_version(old_version) self.new_version = version.get_version(new_version) self.new_version_object = new_version self.push_to_production = publish_release self.old_single_header = F"ApprovalTests.{self.old_version}.hpp" self.new_single_header = F"ApprovalTests.{self.new_version}.hpp" self.approval_tests_dir = F"../ApprovalTests" self.build_dir = F"../build" self.release_dir = F"../build/releases" self.release_new_single_header = F"{self.release_dir}/{self.new_single_header}" self.conan_repo_dir = '../../../conan/conan-center-index-claremacrae' self.main_project_dir = F"../../ApprovalTests.Cpp" self.starter_project_dir = F"../../ApprovalTests.Cpp.StarterProject" self.new_release_notes_path = os.path.join( self.build_dir, F'relnotes_{version.get_version_without_v(self.new_version)}.md') self.xxx_release_notes_path = os.path.join(self.build_dir, F'relnotes_x.y.z.md') self.template_release_notes_path = os.path.join( self.build_dir, F'relnotes_template.md')
def _update_version(): sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'src', 'robot')) from version import get_version print 'Version:', get_version() with open(os.path.join(CURDIR, 'src', 'version.rst'), 'w') as vfile: vfile.write('.. |version| replace:: %s\n' % get_version()) return get_version(sep='-'), vfile.name
def do_forgot(**kw): ip = kw['request'].remote_addr ctx = kw['context'] # verify captcha: challenge = ctx.get_argument('recaptcha_challenge_field', '') response = ctx.get_argument('recaptcha_response_field', '') email = ctx.get_argument('email', '') user = store.get_user_by_email(email) if user is None: return { '__view__' : 'forgot', 'email' : email, 'error' : 'Email is not exist', 'recaptcha_public_key' : recaptcha.get_public_key(), 'site' : _get_site_info(), 'version' : get_version(), } result, error = recaptcha.verify_captcha(challenge, response, recaptcha.get_private_key(), ip) if result: token = model.create_reset_password_token(user.id) sender = store.get_setting('sender', 'mail', '') if not sender: raise ApplicationError('Cannot send mail: mail sender address is not configured.') appid = kw['environ']['APPLICATION_ID'] body = r'''Dear %s You received this mail because you have requested reset your password. Please paste the following link to the address bar of the browser, then press ENTER: https://%s.appspot.com/manage/reset?token=%s ''' % (user.nicename, appid, token) html = r'''<html> <body> <p>Dear %s</p> <p>You received this mail because you have requested reset your password.<p> <p>Please paste the following link to reset your password:</p> <p><a href="https://%s.appspot.com/manage/reset?token=%s">https://%s.appspot.com/manage/reset?token=%s</a></p> <p>If you have trouble in clicking the URL above, please paste the following link to the address bar of the browser, then press ENTER:</p> <p>https://%s.appspot.com/manage/reset?token=%s</p> </body> </html> ''' % (urllib.quote(user.nicename), appid, token, appid, token, appid, token) mail.send(sender, email, 'Reset your password', body, html) return { '__view__' : 'sent', 'email' : email, 'site' : _get_site_info(), 'version' : get_version(), } return { '__view__' : 'forgot', 'email' : email, 'error' : error, 'recaptcha_public_key' : recaptcha.get_public_key(), 'site' : _get_site_info(), 'version' : get_version(), }
def __init_about(self): ''' Initialize the About notebook page ''' self.__name_version = self.__builder.get_object("NameVersion") self.__name_version.set_markup( "<big><b>IBus Table %s</b></big>" %version.get_version()) img_fname = os.path.join(ICON_DIR, "ibus-table.svg") if os.path.exists(img_fname): img = self.__builder.get_object("image_about") img.set_from_file(img_fname) # setup table info our_engine = None for engine in self.__bus.list_engines(): if engine.get_name() == self.__engine_name: our_engine = engine break if our_engine: longname = our_engine.get_longname() if not longname: longname = our_engine.get_name() label = self.__builder.get_object("TableNameVersion") label.set_markup("<b>%s</b>" %longname) icon_path = our_engine.get_icon() if icon_path and os.path.exists(icon_path): from gi.repository import GdkPixbuf pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size( icon_path, -1, 32) image = self.__builder.get_object("TableNameImage") image.set_from_pixbuf(pixbuf)
def localized_classified_ads_context_processor(request): """ Context processor, used to return version number """ results = {} results["version"] = get_version() return results
def main(): """Install siptools-research.""" setup( name='siptools-research', packages=find_packages(exclude=['tests', 'tests.*']), package_data={'siptools_research': ['schemas/*.json']}, version=get_version(), install_requires=[ "lxml", # TODO: Luigi v3 does not support Python2. Version specifier # should be removed when Python2 compatibility is not # required anymore. "luigi<3; python_version=='2.7'", "luigi; python_version>'3'", "pymongo", "requests", "paramiko", "jsonschema", "iso-639", "python-dateutil", "configparser; python_version=='2.7'", "six", "file-scraper@git+https://gitlab.ci.csc.fi/dpres/file-scraper.git", "siptools@git+https://gitlab.ci.csc.fi/dpres/dpres-siptools.git" "@develop", "metax_access@git+https://gitlab.ci.csc.fi/dpres/metax-access.git" "@develop", "upload_rest_api@git+https://gitlab.ci.csc.fi/dpres/" "upload-rest-api.git@develop" ], entry_points={ 'console_scripts': ['siptools-research = siptools_research.__main__:main'] })
def wrangle_json(date=None, out=None, indent=None): """ Takes an ingest date and then wrangles the data found in that directory to a JSON format specifically required by the ELMR application. """ dir, data = wrangle(date) if out is None: out = os.path.join(dir, "elmr.json") ## Create output dictionary output = { "title": "ELMR Ingested BLS Data", "version": get_version(), "ingested": date, "wrangled": datetime.now().strftime(JSON_FMT), "descriptions": TimeSeries, "data": [], } rows = 0 for date, values in sorted(data.items(), key=itemgetter(0), reverse=True): values["YEAR"] = date.year values["MONTH"] = date.month output["data"].append(values) rows += 1 with open(out, 'w') as f: json.dump(output, f, indent=indent) return out, rows
def get_version(): import sys sys.path.insert(0, os.path.join(here, "src", "sltp")) import version v = version.get_version() sys.path = sys.path[1:] return v
def verscheck(cls, vers=version.get_version()): # compare the internal program version to the new program version # if it is from an older version, then it may be off if not vers == cls.__version: return False else: return True
def __init__(cls, dims, project, request, vers=version.get_version()): """ Initialization of the data object. Creates an object with included metadata Inputs: cls: Class Object, Self. dims: A list of the names of the dimensions, the length of indicates the number of dimensions project: Location of project config file (hard location) start: beginning epoch (unix) timestamp end: End epoch timestamp dtype: type of data (source/instrument) being held in this data object """ # first we will read in the basic information to class attributes cls.project = project # with some error checking cls.start = request.data.begin cls.end = request.data.end cls.__version = vers cls.__dversion = 1.0 # the version of the data object # now for dims if type(dims) == list: cls.__dims__ = dims cls.__dim_array__ = range(len(dims)) # since dim array will be the same size as dims # that was pretty simple else: print "Dims need to be a list you provide of the name of each dimension" return False # create a blank levels array cls.__levels__ = {}
def __init_about(self): # page About self.__page_about.show() self.__name_version = self.__builder.get_object("NameVersion") self.__name_version.set_markup( _("<big><b>IBus Pinyin %s</b></big>") % version.get_version())
def on_command_py2exe(): import py2exe print "Preparing to build a Windows Executable of Archy." print "---------" print "NOTICE: If this setup script crashes, you may need to modify" print "the 'extra_DLLs' variable inside this script file." print "---------" excludes = ['AppKit', 'Foundation', 'objc', 'mac_specific', 'wx', 'wxPython'] includes = ['xml.sax.expatreader'] packages = ['commands', 'commands.tutorial', 'encodings', 'xml'] # These are extra DLLs needed by the installer, which # modulefinder/py2exe may not be able to find. These files also # aren't included with the CVS distribution of Archy, so they may # point to paths that don't exist on your computer! If this script # file crashes, you may have to modify some of these pathnames or # place the DLLs in their expected locations. extra_DLLs = [] aspell_files = [ ("commands/aspell", glob.glob("commands/aspell/*.pyd")), ("commands/aspell/data", glob.glob("commands/aspell/data/*.*")), ("commands/aspell/dict", glob.glob("commands/aspell/dict/*.*")) ] setupParams.data_files.append( ("", extra_DLLs) ) setupParams.data_files.extend( aspell_files ) setupParams.windows = [ { "script": "archy.py", "icon_resources": [(1, "icons/archy.ico")] } ] setupParams.options["py2exe"] = \ {"excludes": excludes, "includes" : includes, "packages": packages, "dll_excludes": ["DINPUT8.dll"]} # Dynamically generate the InnoSetup installer script. ISS_DIR = "windows_installer_files" ISS_OUT_FILENAME = "archy.iss" ISS_IN_FILENAME = "%s.in" % ISS_OUT_FILENAME print "Generating %s from %s." % (ISS_OUT_FILENAME, ISS_IN_FILENAME) f = open(os.path.join(ISS_DIR, ISS_IN_FILENAME), "r") text = f.read() f.close() text = text.replace( "$BUILD$", str(version.get_build_number()) ) text = text.replace( "$VERSION$", str(version.get_version()) ) text = """; WARNING: This file is automatically generated by setup.py; if you want to modify it, change %s instead.\n\n""" % (ISS_IN_FILENAME) + text f = open(os.path.join(ISS_DIR, ISS_OUT_FILENAME), "w") f.write(text) f.close()
def get(self): template = jinja_environment.get_template('Kalman.html') template_values = { 'head' : cst.head, 'responseDict': cst.responseDict, 'version': version.get_version(), } self.response.out.write(template.render(template_values))
def generate_version() -> str: here = path.abspath(path.dirname(__file__)) version_file = Path(path.join(here, "RELEASE-VERSION")) if version_file.is_file(): return open(version_file, "r").read() else: from version import get_version return get_version(prefix='v')
def test_django_suit(self): """ Test if django suit is plugged and respond with custom settings. """ for language, name in settings.LANGUAGES: response = self.app.get('/%s/admin/' % language) self.assertEqual(response.status_int, 200) response.mustcontain(get_version('normal'), 'w.illi.am')
def main(): """Install dpres_signature Python libraries""" setup(name='dpres_signature', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, version=get_version(), entry_points={'console_scripts': scripts_list()}, install_requires=['M2Crypto', 'six']) return 0
def get(self): template_values = { 'author':'Deployed @ Google App Engine', 'time':datetime.datetime.now(GMT5()).strftime("%Y-%b-%d %H:%M:%S"), 'head' : cst.head, 'version': version.get_version(), } template = jinja_environment.get_template('index.html') self.response.out.write(myreplace.replace ( template.render(template_values)))
def __init__(self): self.about = gtk.AboutDialog() self.about.set_program_name("dewdrop") self.about.set_version(version.get_version()) self.about.set_authors(['Steve Gricci', 'Adam Galloway', 'Uri Herrera']) self.about.set_copyright("(c) Steve Gricci") self.about.set_comments("dewdrop is an Open Source Droplr client for Linux\n\nThe source code is available: http://github.com/sgricci/dewdrop") self.about.set_website("http://dewdrop.deepcode.net") self.about.set_logo(gtk.gdk.pixbuf_new_from_file("./windows/resource/icon/dewdrop-128-black.png"))
def main(): """Install xml-helpers""" setup( name='xml_helpers', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, version=get_version(), install_requires=['lxml', 'six'] )
def show_register(**kw): google_signin_url = _get_google_signin_url('/manage/g_signin') return { '__view__' : 'register', 'error' : '', 'google_signin_url' : google_signin_url, 'site' : _get_site_info(), 'version' : get_version(), }
def show_forgot(): return { '__view__' : 'forgot', 'email' : '', 'error' : '', 'recaptcha_public_key' : recaptcha.get_public_key(), 'site' : _get_site_info(), 'version' : get_version(), }
def report_ticket(self, ticket, status, log, plugins=(), dry_run=False, pending_status=None): report = { 'status': status, 'patches': ticket['patches'], 'deps': ticket['depends_on'], 'spkgs': ticket['spkgs'], 'base': self.base, 'user': self.config['user'], 'machine': self.config['machine'], 'time': datetime(), 'plugins': plugins, 'patchbot_version': patchbot_version.get_version(), } if pending_status: report['pending_status'] = pending_status try: report['base'] = ticket_base = sorted([ describe_branch('patchbot/base', tag_only=True), describe_branch('patchbot/ticket_upstream', tag_only=True)], compare_version)[-1] report['git_base'] = self.git_commit('patchbot/base') report['git_base_human'] = describe_branch('patchbot/base') if ticket['id'] != 0: report['git_branch'] = ticket.get('git_branch', None) report['git_log'] = subprocess.check_output(['git', 'log', '--oneline', '%s..patchbot/ticket_upstream' % ticket_base]).strip().split('\n') # If apply failed, we don't want to be stuck in an infinite loop. report['git_commit'] = self.git_commit('patchbot/ticket_upstream') report['git_commit_human'] = describe_branch('patchbot/ticket_upstream') report['git_merge'] = self.git_commit('patchbot/ticket_merged') report['git_merge_human'] = describe_branch('patchbot/ticket_merged') else: report['git_branch'] = self.config['base_branch'] report['git_log'] = [] report['git_commit'] = report['git_merge'] = report['git_base'] except Exception: traceback.print_exc() if status != 'Pending': history = open("%s/history.txt" % self.log_dir, "a") history.write("%s %s %s%s\n" % ( datetime(), ticket['id'], status, " dry_run" if dry_run else "")) history.close() print "REPORT" import pprint pprint.pprint(report) print ticket['id'], status fields = {'report': json.dumps(report)} if os.path.exists(log): files = [('log', 'log', bz2.compress(open(log).read()))] else: files = [] if not dry_run or status == 'Pending': print post_multipart("%s/report/%s" % (self.server, ticket['id']), fields, files)
def get(self): values = db.GqlQuery("select * from accountValue ORDER BY time DESC LIMIT 100") template = jinja_environment.get_template('tradeking.html') template_values = { 'head' : cst.head, 'responseDict': cst.responseDict, 'version': version.get_version(), 'values': values } self.response.out.write(template.render(template_values))
def version(request): """ release number + #commit if exists """ version = get_version('normal') commit_file = os.path.join(settings.STATIC_ROOT, 'commit.txt') if os.path.exists(commit_file): commit = open(commit_file, 'r').read() version = '%s #%s' % (version, commit) return {'version': version}
def main(): """Install metax-access.""" setup(name='metax-access', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, version=get_version(), data_files=[('etc', ['include/etc/metax.cfg'])], install_requires=["requests", "lxml", "argcomplete", "six"], entry_points={ 'console_scripts': ['metax_access = metax_access.__main__:main'] })
def parse_command_line(): parser = argparse.ArgumentParser( description='Tool for downloading and installing WebDriver binaries. Version: {}'.format(get_version()), ) parser.add_argument('browser', help='Browser to download the corresponding WebDriver binary. Valid values are: {0}. Optionally specify a version number of the WebDriver binary as follows: \'browser:version\' e.g. \'chrome:2.39\'. If no version number is specified, the latest available version of the WebDriver binary will be downloaded.'.format(', '.join(DOWNLOADERS.keys())), nargs='+') parser.add_argument('--downloadpath', '-d', action='store', dest='downloadpath', metavar='F', default=None, help='Where to download the webdriver binaries') parser.add_argument('--linkpath', '-l', action='store', dest='linkpath', metavar='F', default=None, help='Where to link the webdriver binary to. Set to "AUTO" if you need some intelligense to decide where to place the final webdriver binary. If set to "SKIP", no link/copy done.') parser.add_argument('--os', '-o', action='store', dest='os_name', choices=OS_NAMES, metavar='OSNAME', default=None, help='Overrides os detection with given os name. Values: {0}'.format(', '.join(OS_NAMES))) parser.add_argument('--bitness', '-b', action='store', dest='bitness', choices=BITNESS, metavar='BITS', default=None, help='Overrides bitness detection with given value. Values: {0}'.format(', '.join(BITNESS))) parser.add_argument('--version', action='version', version='%(prog)s {}'.format(get_version())) return parser.parse_args()
def version(version_number, release_tag=None): _verify_version(version_number, VERSIONS) if version_number == 'keep': _keep_version() elif version_number == 'trunk': _update_version(version_number, '%d%02d%02d' % time.localtime()[:3]) else: _update_version(version_number, _verify_version(release_tag, RELEASES)) sys.path.insert(0, ROBOT_PATH) from version import get_version return get_version(sep='')
def main(): """Install mets""" setup(name='mets', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, version=get_version(), install_requires=[ 'lxml', 'python-dateutil', 'xml_helpers@git+https://gitlab.ci.csc.fi/dpres/xml-helpers.git' '@develop#egg=xml_helpers' ])
def version(version_number, release_tag=None): _verify_version(version_number, VERSIONS) if version_number == 'keep': _keep_version() elif version_number =='trunk': _update_version(version_number, '%d%02d%02d' % time.localtime()[:3]) else: _update_version(version_number, _verify_version(release_tag, RELEASES)) sys.path.insert(0, ROBOT_PATH) from version import get_version return get_version(sep='')
def main(): """Install upload-rest-api""" setup(name='upload-rest-api-client', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, version=get_version(), install_requires=["requests", "argcomplete"], entry_points={ "console_scripts": ["upload-client = upload_rest_api_client.client:main"] })
def main(): """Install dpres-specification-migrator""" setup(name='dpres-specification-migrator', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, version=get_version(), install_requires=["lxml", "six"], entry_points={ 'console_scripts': [('transform-mets = ' 'dpres_specification_migrator.transform_mets:main')] })
def __init__(self): self.about = gtk.AboutDialog() self.about.set_program_name("dewdrop") self.about.set_version(version.get_version()) self.about.set_authors(['Steve Gricci', 'Adam Galloway', 'Uri Herrera']) self.about.set_copyright("(c) Steve Gricci") self.about.set_comments("dewdrop is an Open Source Droplr client for Linux\n\nThe source code is available: http://github.com/sgricci/dewdrop") self.about.set_website("http://dewdrop.deepcode.net") loader = gtk.gdk.PixbufLoader('png') loader.write(pkg_resources.resource_string(__name__, "/resources/icon/dewdrop-128-black.png")) loader.close() self.about.set_logo(loader.get_pixbuf())
def setup_version(version=None, ask=False): if not version: version_info = get_version() if ask: prompt("Which version: ", default=version_info["version"], key="package_version") else: env.package_version = version_info["version"] env.version_build = version_info["build"] env.version_date = version_info["date"] env.version_version = version_info["version"] else: env.package_version = version
def __init__(self, reader, writer, token): super().__init__(Platform.ColecoVision, get_version(), reader, writer, token) try: self.config = Config() # If we can't create a good config, we can't run the plugin. except FileNotFoundError: self.close() else: self.backend_client = BackendClient(self.config) self.games = [] self.local_games_cache = self.local_games_list() self.process = None self.running_game_id = None
def __init__(self): self.about = gtk.AboutDialog() self.about.set_program_name("DewDrop") self.about.set_version(version.get_version()) self.about.set_authors(['Steve Gricci', 'Adam Galloway']) self.about.set_copyright("(c) Steve Gricci") self.about.set_comments("DewDrop is a Droplr client for Linux\n\nApplication Icon used under CC-Attribution-NonCommercial license from http://dapinographics.com") self.about.set_website("http://dewdropapp.tumblr.com") loader = gtk.gdk.PixbufLoader('png') loader.write(pkg_resources.resource_string(__name__, "resources/icons/icon.png")) loader.close() self.about.set_logo(loader.get_pixbuf())
def create_userguide(): from docutils.core import publish_cmdline print 'Creating user guide ...' sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'src', 'robot')) from version import get_version print 'Version:', get_version() with open(os.path.join(CURDIR, 'src', 'version.rst'), 'w') as vfile: vfile.write('.. |version| replace:: %s\n' % get_version()) description = 'HTML generator for Robot Framework User Guide.' arguments = ['--time', '--stylesheet-path', ['src/userguide.css'], 'src/RobotFrameworkUserGuide.rst', 'RobotFrameworkUserGuide.html'] os.chdir(CURDIR) publish_cmdline(writer_name='html', description=description, argv=arguments) os.unlink(vfile.name) ugpath = os.path.abspath(arguments[-1]) print ugpath return ugpath, get_version(sep='-')
def main(): """Install dpres-ipt Python libraries""" setup( name='ipt', packages=find_packages(exclude=['tests', 'tests.*']), version=get_version(), entry_points={'console_scripts': scripts_list()}, install_requires=[ 'python-mimeparse', 'scandir; python_version == "2.7"', 'six' ] )
def welcome(request): # This form will be only accessible when the database has no users if 0 < User.objects.count(): return redirect('main.views.home') # Form if request.method == 'POST': # assign UUID to dashboard dashboard_uuid = str(uuid.uuid4()) helpers.set_setting('dashboard_uuid', dashboard_uuid) # Update Archivematica version in DB archivematica_agent = Agent.objects.get(pk=1) archivematica_agent.identifiervalue = "Archivematica-" + version.get_version( ) archivematica_agent.save() # create blank ATK DIP upload config config = ArchivistsToolkitConfig() config.save() # save organization PREMIS agent if supplied org_name = request.POST.get('org_name', '') org_identifier = request.POST.get('org_identifier', '') if org_name != '' or org_identifier != '': agent = Agent.objects.get(pk=2) agent.name = org_name agent.identifiertype = 'repository code' agent.identifiervalue = org_identifier agent.save() # Save user and set cookie to indicate this is the first login form = SuperUserCreationForm(request.POST) if form.is_valid(): user = form.save() api_key = ApiKey.objects.create(user=user) api_key.key = api_key.generate_key() api_key.save() user = authenticate(username=user.username, password=form.cleaned_data['password1']) if user is not None: login(request, user) request.session['first_login'] = True return redirect('installer.views.fprconnect') else: form = SuperUserCreationForm() return render(request, 'installer/welcome.html', { 'form': form, })
def extract_release_version(): version = get_version() patterns = [ # captures release version set by CI for example: '2021.1.0-1028-55e4d5673a8' r"^([0-9]+).([0-9]+)*", # captures release version generated by MO from release branch, for example: 'custom_releases/2021/1_55e4d567' r"_releases/([0-9]+)/([0-9]+)_*" ] for pattern in patterns: m = re.search(pattern, version) if m and len(m.groups()) == 2: return m.group(1), m.group(2) return None, None
def main(): packages = ['qfit', 'qfit.structure'] package_data = { 'qfit': [ os.path.join('data', '*.npy'), ] } ext_modules = [ Extension( "qfit._extensions", [os.path.join("src", "_extensions.c")], include_dirs=[np.get_include()], ), ] install_requires = [ 'numpy>=1.14', 'scipy>=1.00', ] setup( name="qfit", version=get_version(), author= 'Gydo C.P. van Zundert, Saulo H.P. de Oliveira, and Henry van den Bedem', author_email='*****@*****.**', packages=packages, package_data=package_data, ext_modules=ext_modules, install_requires=install_requires, entry_points={ 'console_scripts': [ 'qfit_protein = qfit.qfit_protein:main', 'qfit_residue = qfit.qfit_residue:main', 'qfit_ligand = qfit.qfit_ligand:main', 'qfit_covalent_ligand = qfit.qfit_covalent_ligand:main', 'qfit_segment = qfit.qfit_segment:main', 'qfit_prep_map = qfit.qfit_prep_map:main', 'qfit_density = qfit.qfit_density:main', 'qfit_mtz_to_ccp4 = qfit.mtz_to_ccp4:main', 'edia = qfit.edia:main', 'remove_altconfs = qfit.remove_altconfs:main', 'compare_apo_holo = qfit.compare_apo_holo:main', 'side_chain_remover = qfit.side_chain_remover:main', 'normalize_occupancies = qfit.normalize_occupancies:main', 'get_metrics = qfit.get_metrics:main', ] }, )
def main(): """Install dpres-research-rest-api Python libraries""" setup(name='dpres-research-rest-api', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ "flask", "flask-cors", "metax_access@git+https://gitlab.ci.csc.fi/dpres/" "metax-access.git@develop", "siptools_research@git+https://gitlab.ci.csc.fi/dpres/" "dpres-siptools-research.git@develop", ], tests_require=['pytest'], cmdclass={'test': PyTest}, version=get_version())
def setup_pipeline(org_name, org_identifier): # Assign UUID to Dashboard dashboard_uuid = str(uuid.uuid4()) helpers.set_setting('dashboard_uuid', dashboard_uuid) # Update Archivematica version in DB archivematica_agent = Agent.objects.get(pk=1) archivematica_agent.identifiervalue = "Archivematica-" + get_version() archivematica_agent.save() if org_name != '' or org_identifier != '': agent = get_agent() agent.name = org_name agent.identifiertype = 'repository code' agent.identifiervalue = org_identifier agent.save()
def __init__(self): self.about = gtk.AboutDialog() self.about.set_program_name("DewDrop") self.about.set_version(version.get_version()) self.about.set_authors(['Steve Gricci', 'Adam Galloway']) self.about.set_copyright("(c) Steve Gricci") self.about.set_comments( "DewDrop is a Droplr client for Linux\n\nApplication Icon used under CC-Attribution-NonCommercial license from http://dapinographics.com" ) self.about.set_website("http://dewdropapp.tumblr.com") loader = gtk.gdk.PixbufLoader('png') loader.write( pkg_resources.resource_string(__name__, "resources/icons/icon.png")) loader.close() self.about.set_logo(loader.get_pixbuf())
def main(): setuptools.setup( name=pkg_name, version=version.get_version(), url=pkg_url, license=pkg_license, description=pkg_description, classifiers=pkg_classifiers, author=pkg_author, author_email=pkg_author_email, packages=setuptools.find_packages('src'), package_dir={'': 'src'}, include_package_data=True, package_data = {'': ['LICENSE']}, install_requires=install_requires, test_suite="{0}.{1}".format(pkg_name, "tests"), )
def print_settings(self): ''' Prints the actual configuration of DDoSReporter ''' print '\n\033[1;31m ATENÇÃO - EXECUTE COMO SUPERUSUÁRIO (ROOT)\033[0;33m\n' print '\033[0;36m Versão:\033[0;33m', get_version() print '\033[0;36m Arquivo de log:\033[0;33m', settings.ARQUIVO_DE_LOG sysadms = [] for email in settings.SYSADM: sysadms.append(email) sysadms = ', '.join(sysadms) print '\033[0;36m SYSADMs:\033[0;33m', sysadms print '\033[0;36m Enviar emails de alerta:\033[0;33m', settings.SEND_EMAIL print '\033[0;36m Limite de requisições para um único IP:\033[0;33m', settings.LIMITE_REQUISICOES_POR_IP print '\033[0;36m Limite de requisições distintas para o servidor:\033[0;33m', settings.LIMITE_REQUISICOES_TOTAL print '\033[0;36m Bloquear ataques:\033[0;33m', settings.BLOQUEAR_ATAQUES if settings.BLOQUEAR_ATAQUES: print '\033[0;36m Regra iptables:\033[0;33m', settings.IPTABLES print '\033[0m'
def easy_build(raw_args): args = get_args(raw_args) config_file = os.path.abspath(args.config_file) kernel = roller.Kernel( build_dir=args.build_dir, verbose=True ) kernel.version = version.get_version(config_file) kernel.revision = args.revision kernel.config = config_file kernel.output = 'none' kernel.download() kernel.extract() kernel.configure() kernel.make() kernel.where()
def show_signin(**kw): ctx = kw['context'] redirect = ctx.get_argument('redirect', '') if not redirect: req = kw['request'] if 'Referer' in req.headers: ref = req.headers['Referer'] if ref.find('/manage/singin')==(-1): redirect = ref if not redirect: redirect = '/' google_signin_url = _get_google_signin_url('/manage/g_signin?redirect=' + urllib.quote(redirect)) return { '__view__' : 'signin', 'error' : '', 'email' : '', 'redirect' : redirect, 'google_signin_url' : google_signin_url, 'site' : _get_site_info(), 'version' : get_version(), }
def do_register(**kw): ctx = kw['context'] email = ctx.get_argument('email', '').lower() password = ctx.get_argument('password') nicename = ctx.get_argument('nicename') role = int(store.get_setting('default_role', 'site', `store.ROLE_SUBSCRIBER`)) error = '' try: user = store.create_user(role, email, password, nicename) value = cookie.make_sign_in_cookie(user.id, password, 86400) ctx.set_cookie(cookie.AUTO_SIGNIN_COOKIE, value) return 'redirect:/manage/' except store.UserAlreadyExistError: error = 'Email is already registered by other' except StandardError: logging.exception('Error when create user') error = 'Unexpected error occurred' return { '__view__' : 'register.html', 'error' : error, 'site' : _get_site_info(), 'version' : get_version(), }
# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################ import codecs import os from setuptools import setup, find_packages from version import get_version name = 'gs.group.home' version = get_version() with codecs.open('README.rst', encoding='utf-8') as f: long_description = f.read() with codecs.open(os.path.join("docs", "HISTORY.rst"), encoding='utf-8') as f: long_description += '\n' + f.read() setup( name=name, version=version, description="The GroupServer group page", long_description=long_description, classifiers=[ 'Development Status :: 5 - Production/Stable', "Environment :: Web Environment",
def __init_about(self): # page About self.__page_about.show() self.__name_version = self.__builder.get_object("NameVersion") self.__name_version.set_markup(_("<big><b>IBus Pinyin %s</b></big>") % version.get_version())
def _keep_version(): sys.path.insert(0, ROBOT_PATH) from version import get_version print 'Keeping version %s' % get_version()