• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python version.get_git_version函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中version.get_git_version函数的典型用法代码示例。如果您正苦于以下问题:Python get_git_version函数的具体用法?Python get_git_version怎么用?Python get_git_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_git_version函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setupPackage

def setupPackage():
    # setup package
    setup(
        name='obspy',
        version=get_git_version(),
        description=DOCSTRING[1],
        long_description="\n".join(DOCSTRING[3:]),
        url="http://www.obspy.org",
        author='The ObsPy Development Team',
        author_email='[email protected]',
        license='GNU Lesser General Public License, Version 3 (LGPLv3)',
        platforms='OS Independent',
        classifiers=[
            'Development Status :: 4 - Beta',
            'Environment :: Console',
            'Intended Audience :: Science/Research',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: GNU Library or ' +
                'Lesser General Public License (LGPL)',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Topic :: Scientific/Engineering',
            'Topic :: Scientific/Engineering :: Physics'],
        keywords=KEYWORDS,
        packages=find_packages(),
        namespace_packages=[],
        zip_safe=False,
        install_requires=INSTALL_REQUIRES,
        download_url=("https://github.com/obspy/obspy/zipball/master"
            "#egg=obspy=dev"),  # this is needed for "easy_install obspy==dev"
        include_package_data=True,
        entry_points=ENTRY_POINTS,
        ext_package='obspy.lib',
        configuration=configuration)
开发者ID:jandog8990,项目名称:obspy,代码行数:34,代码来源:setup.py


示例2: get_current_version

def get_current_version(release):
    try:
        import version
        current_version = version.get_git_version(release=release)
        with open('ptracker/__init__.py', 'w') as init:
            init.write("VERSION = '{0}'\n".format(current_version))
        print("Wrote ptracker/__init__.py with version {0}".format(current_version))
        return current_version
    except ImportError:
        return ptracker.VERSION
开发者ID:EliRibble,项目名称:ptracker,代码行数:10,代码来源:setup.py


示例3: main

def main():
    # Version of this software
    version = '0.9a2'
    
    parser = argparse.ArgumentParser()
    parser.add_argument('-H', '--host',
                        help='Address where this server listens.',
                        default='localhost')
    parser.add_argument('-P', '--port',
                        help='Port where this server listens.',
                        default='7000')
    parser.add_argument('-c', '--config',
                        help='Config file.',
                        default='ownDC.cfg')
    parser.add_argument('--version', action='version',
                        version='ownDC %s' % get_git_version())
    args = parser.parse_args()

    # Check arguments (IP, port)
    host = args.host
    
    configP = configparser.RawConfigParser()
    configP.read(args.config)

    verbo = configP.get('Service', 'verbosity')
    verboNum = getattr(logging, verbo.upper(), 30)
    
    logging.basicConfig(logLevel=verboNum)
    loclog = logging.getLogger('main')
    loclog.setLevel(verboNum)

    try:
        port = int(args.port)
    except:
        loclog.error('Error while interpreting port %s' % args.port)
        sys.exit(-1)

    # Create the object that will resolve and execute all the queries
    loclog.info('Creating a DataSelectQuery object. Wait...')
    ServerHandler.wi = DataSelectQuery('ownDC.log', './data/ownDC-routes.xml',
                                       configFile=args.config)
    loclog.info('Ready to answer queries!')
    
    Handler = ServerHandler
    httpd = socsrv.TCPServer((host, port), Handler)
    
    loclog.info("Virtual Datacentre at: http://%s:%s/fdsnws/dataselect/1/" %
                (host, port))
    httpd.serve_forever()
开发者ID:EIDA,项目名称:owndc,代码行数:49,代码来源:ownDC.py


示例4: setupPackage

def setupPackage():
    # setup package
    setup(
        name="obspy",
        version=get_git_version(),
        description=DOCSTRING[1],
        long_description="\n".join(DOCSTRING[3:]),
        url="http://www.obspy.org",
        author="The ObsPy Development Team",
        author_email="[email protected]",
        license="GNU Lesser General Public License, Version 3 (LGPLv3)",
        platforms="OS Independent",
        classifiers=[
            "Development Status :: 4 - Beta",
            "Environment :: Console",
            "Intended Audience :: Science/Research",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: GNU Library or " + "Lesser General Public License (LGPL)",
            "Operating System :: OS Independent",
            "Programming Language :: Python",
            "Programming Language :: Python :: 2",
            "Programming Language :: Python :: 2.6",
            "Programming Language :: Python :: 2.7",
            "Programming Language :: Python :: 3",
            "Programming Language :: Python :: 3.3",
            "Programming Language :: Python :: 3.4",
            "Topic :: Scientific/Engineering",
            "Topic :: Scientific/Engineering :: Physics",
        ],
        keywords=KEYWORDS,
        packages=find_packages(),
        namespace_packages=[],
        zip_safe=False,
        install_requires=INSTALL_REQUIRES,
        extras_require=EXTRAS_REQUIRE,
        features=add_features(),
        # this is needed for "easy_install obspy==dev"
        download_url=("https://github.com/obspy/obspy/zipball/master" "#egg=obspy=dev"),
        include_package_data=True,
        entry_points=ENTRY_POINTS,
        ext_package="obspy.lib",
        cmdclass={"build_man": Help2ManBuild, "install_man": Help2ManInstall},
        configuration=configuration,
    )
开发者ID:krischer,项目名称:obspy,代码行数:44,代码来源:setup.py


示例5: connect

    def connect(self, data):
        """
        Connects to the server if both hostname and username is set.

        """
        if self.host is None:
            raise Warning(' '.join(['You must set the server\'s',
                                    'hostname and your name before',
                                    'connecting']))

        self.nick = data[2].split()[0]
        name = ' '.join(data[2].split()[1:])
        try:
            self.tcp.connect((self.host, int(self.port)))
        except socket.error as e:
            return self.denied([e.strerror])
        self.tcp.send(
            bytes('CONNECT: "{0}" "{1}" {2}\r\n'.format(self.nick,
                                                        name,
                                                        get_git_version()))
        )
        self.tcp.handle.start()
开发者ID:Tehnix,项目名称:Voix,代码行数:22,代码来源:client.py


示例6: get_git_version

import os
import sys
import fnmatch
import subprocess

## prepare to run PyTest as a command
from distutils.core import Command

## explain this...
#from distribute_setup import use_setuptools
#use_setuptools()

from setuptools import setup, find_packages

from version import get_git_version
VERSION = get_git_version()
PROJECT = 'kba.scorer'
AUTHOR = 'Diffeo, Inc.'
AUTHOR_EMAIL = '[email protected]'
DESC = 'Tools for scoring output of systems built to compete in TREC KBA.'

def read_file(file_name):
    file_path = os.path.join(
        os.path.dirname(__file__),
        file_name
        )
    return open(file_path).read()

def recursive_glob(treeroot, pattern):
    results = []
    for base, dirs, files in os.walk(treeroot):
开发者ID:bitwjg,项目名称:kba-scorer,代码行数:31,代码来源:setup.py


示例7: get_git_version

# possible, according to krischer
import sys
import os
import inspect
SETUP_DIRECTORY = os.path.dirname(os.path.abspath(inspect.getfile(
    inspect.currentframe())))

# Import the version string.
UTIL_PATH = os.path.join(SETUP_DIRECTORY, "nsl", "util")
sys.path.insert(0, UTIL_PATH)
from version import get_git_version  # @UnresolvedImport
sys.path.pop(0)

s_args = {
    'name': 'nsl.common',
    'version': get_git_version(),
    'description': 'NSL Common libraries and utilities for Python',
    'author': 'Nevada Seismological Lab',
    'url': 'https//github.com/NVSeismoLab',
    'packages': [
        'nsl',
        'nsl.common',
        'nsl.common.logging',
        'nsl.antelope',
        'nsl.antelope.base',
        'nsl.antelope.packets',
        'nsl.antelope.rows',
        'nsl.antelope.util',
        'nsl.converters', 
        'nsl.obspy',
        'nsl.obspy.patches',
开发者ID:NVSeismoLab,项目名称:commons,代码行数:31,代码来源:setup.py


示例8: walk

    ('/usr/local/share/helpim/templates/forms', 'helpim/questionnaire/templates/forms'),
    ('/usr/local/share/helpim/fixtures', 'helpim/fixtures'),
    ('/usr/local/share/helpim/doc/debian/example', 'helpim/doc/debian/example'),
    ]

static_files = []
for target, include_dir in include_dirs:
    for root, dirs, files in walk(include_dir):
        static_files.append((
          join(target, root[len(include_dir)+1:]),
          [join(root, f) for f in files]
        ))

setup(
    name=name,
    version=get_git_version().lstrip('v'),
    url='http://www.python.org/pypi/'+name,
    license='AGPL',
    description='A chat-system for online psycho-social counselling',
    long_description=long_description,
    author='e-hulp.nl HelpIM Team',
    author_email='[email protected]',
    packages=find_packages('.'),
    package_dir={'': '.'},
    install_requires=install_requires,
    zip_safe = False,
    namespace_packages=[],
    data_files=static_files,
    include_package_data = True,
    classifiers = [
      "Programming Language :: Python",
开发者ID:pombredanne,项目名称:HelpIM,代码行数:31,代码来源:setup.py


示例9: main

def main():
    ownDCver = '0.9a2'

    parser = argparse.ArgumentParser(description=\
        'Client to download waveforms from different datacentres via FDSN-WS')
    parser.add_argument('-c', '--config', help='Config file.',
                        default='ownDC.cfg')
    parser.add_argument('-p', '--post-file', default=None,
                        help='File with the streams and timewindows requested.')
    parser.add_argument('-o', '--output', default='request',
                        help='Filename (without extension) used to save the data and the logs.')
    parser.add_argument('-r', '--retries', type=int,
                        help='Number of times that data should be requested if there is no answer or if there is an error',
                        default=0)
    group = parser.add_mutually_exclusive_group()
    group.add_argument("-s", "--seconds", type=int,
                        help='Number of seconds between retries for the lines without data')
    group.add_argument("-m", "--minutes", type=int,
                        help='Number of minutes between retries for the lines without data')
    parser.add_argument('-v', '--verbosity', action="count", default=0,
                        help='Increase the verbosity level')
    parser.add_argument('--version', action='version', version='ownDC-cli %s ' % get_git_version())
    args = parser.parse_args()
    
    # Read the streams and timewindows to download
    if args.post_file is not None:
        fh = open(args.post_file, 'r')
    else:
        fh = sys.stdin

    lines = fh.read()
    summary = SummarizedRun()

    ds = DataSelectQuery(summary,
                         routesFile='data/ownDC-routes.xml',
                         configFile=args.config)

    outwav = open('%s.mseed' % args.output, 'wb')

    # Attempt number to download the waveforms
    attempt = 0

    while ((attempt <= args.retries) and (len(lines.splitlines()) > 0)):
        print '\n\nAttempt Nr. %d of %d' % (attempt+1, args.retries+1)

        iterObj = ds.makeQueryPOST(lines)
        
        for chunk in iterObj:
            outwav.write(chunk)
            print '.',

        print

        lines = ''
        for k, v in summary.iteritems():

            # Print summary
            totBytes = sum([l[2] for l in v])
            status = ','.join([l[1] for l in v])

            print '[%s] %s %d bytes' % ('\033[92mOK\033[0m' if totBytes else \
                                        '\033[91m' + status + '\033[0m', k, totBytes)
            # Check the total amount of bytes received
            if totBytes <= 0:
                lines = '%s%s\n' % (lines, k)

        attempt += 1

        if args.minutes:
            print 'Waiting %d minutes to retry again...' % args.minutes
            sleep(args.minutes * 60)
        else:
            seconds = 2 if args.seconds is None else args.seconds
            
            print 'Waiting %d seconds to retry again...' % seconds
            sleep(seconds)

    outwav.close()
    
    # FIXME I should decide here a nice format for the output
    # and also if it should be to stdout, a file or a port
    with open('%s.log' % args.output, 'w') as outlog:
        for k, v in summary.iteritems():
            outlog.write('%s %s %d bytes\n' % (k, [le[1] for le in v], sum([le[2] for le in v])))
开发者ID:EIDA,项目名称:owndc,代码行数:84,代码来源:ownDC-cli.py


示例10: get_git_version

from version import get_git_version

__productname__ = 'alot'
__version__ = get_git_version()
__copyright__ = "Copyright (C) 2011 Patrick Totzke"
__author__ = "Patrick Totzke"
__author_email__ = "[email protected]"
__description__ = "Terminal MUA using notmuch mail"
__url__ = "https://github.com/pazz/alot"
__license__ = "Licensed under the GNU GPL v3+."
开发者ID:0x64746b,项目名称:alot,代码行数:10,代码来源:__init__.py


示例11: build_py_with_sub_commands

from setuptools.command.build_py import build_py

class build_py_with_sub_commands(build_py):

    def run(self):
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        build_py.run(self)
    
build_py_with_sub_commands.sub_commands.append(('build_uml', None))


setup(
    name='gaphor',
    version=get_git_version(),
    url='http://gaphor.sourceforge.net',
    author='Arjan J. Molenaar',
    author_email='[email protected]',
    license='GNU General Public License',
    description='Gaphor is a UML modeling tool',
    long_description="""
Gaphor is a UML modeling tool written in Python.

It uses the GTK+ environment for user interaction.
""",
    classifiers = [
        'Development Status :: 5 - Production/Stable',
        'Environment :: X11 Applications :: GTK',
        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
开发者ID:egroeper,项目名称:gaphor,代码行数:31,代码来源:setup.py


示例12:

import version

__version__ = version.get_git_version()
开发者ID:brady-vitrano,项目名称:full-stack-django-kit,代码行数:3,代码来源:__init__.py


示例13: SystemExit

        if self.distribution.tests_require:
            cmd.extend(self.distribution.tests_require)
        errno = subprocess.call(cmd)
        if errno:
            raise SystemExit(errno)

        # reload sys.path for any new libraries installed
        import site
        site.main()
        print sys.path
        # use pytest to run tests
        pytest = __import__('pytest')
        exitcode = pytest.main(['--cov', 'pyaccumulo', '--cov-report', 'term', '-vvs', 'tests'])
        sys.exit(exitcode)

VERSION, HASH = version.get_git_version()

setup(
      name = 'pyaccumulo',
      version = VERSION,
      author = 'Jason Trost',
      author_email = 'jason.trost AT gmail.com',
      maintainer = 'Jason Trost',
      maintainer_email = 'jason.trost AT gmail.com',
      description = 'Python client library for Apache Accumulo',
      long_description = long_description,
      url = 'https://github.com/accumulo/pyaccumulo',
      keywords = 'accumulo client db distributed thrift',
      packages = ['pyaccumulo',
                  'pyaccumulo.iterators',
                  'pyaccumulo.proxy'
开发者ID:TITAN1287,项目名称:pyaccumulo,代码行数:31,代码来源:setup.py


示例14: filter

#!/usr/bin/env python

import os
from setuptools import setup, find_packages
import subprocess
import shlex
import version

reqs = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                    'requirements.txt')
REQUIRES = filter(None, open(reqs).read().splitlines())

ver = version.get_git_version()

# Listing inflection module as requirements is not working in windows for some
# reason. So install it using pip install.

setup(
    name="robotframework-pageobjects",
    version=ver,
    description="Lets you use the page object pattern with Robot Framework and plain python", 
    author="National Center for Biotechnology Information",
    install_requires=REQUIRES,
    packages=find_packages(exclude=("tests",)),
    zip_safe=False
)
开发者ID:mmguzman,项目名称:robotframework-pageobjects,代码行数:26,代码来源:setup.py


示例15: setup

        c_files,
        include_dirs=include_dirs,
        libraries=libraries,
        library_dirs=library_dirs,
        define_macros=macros,
        extra_compile_args=compile_args,
        extra_link_args=link_args,
    )
]

install_requires = []
tests_require = []

setup(
    name="pylzma",
    version=get_git_version().decode("utf-8"),
    description=descr,
    author="Joachim Bauch",
    author_email="[email protected]",
    url="http://www.joachim-bauch.de/projects/pylzma/",
    download_url="http://pypi.python.org/pypi/pylzma/",
    license="LGPL",
    keywords="lzma compression",
    long_description=long_descr,
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
开发者ID:kungpfui,项目名称:pylzma,代码行数:31,代码来源:setup.py


示例16: open

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    sys.exit()

with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
    readme = f.read()

package_data = {
}

requires = [
]

try:
    version = git_versioning.get_git_version()
except git_versioning.GitVersionNotFound:
    print >> sys.stderr, 'Could not determine git version. Please add a tag with "git tag -a" or "git tag -s"'
    sys.exit(1)

classifiers = [
    "Development Status :: 1 - Planning",
    "Development Status :: 2 - Pre-Alpha",
    "Development Status :: 3 - Alpha",
    "Development Status :: 4 - Beta",
    "Development Status :: 5 - Production/Stable",
    "Development Status :: 6 - Mature",
    "Development Status :: 7 - Inactive",
    "Environment :: Console",
    "Environment :: Console :: Curses",
    "Environment :: Console :: Framebuffer",
开发者ID:7mp,项目名称:python-skeleton,代码行数:30,代码来源:setup.py


示例17: main

def main(name, datatype, cmdargs=None):
    v = version.get_git_version()
    options, args = parse_args(datatype, cmdargs)
    if not args:
        # Help has already been printed
        return 2

    log.info("------------- %s %s -----------------", name, v)
    start_time = datetime.datetime.now().replace(microsecond=0)  # start the clock ticking

    check_python_version()

    # Load, using the first argument as the folder
    try:
        cfg = config.Configuration(datatype, options.phylogeny_program,
                                   options.save_phylofiles, options.cmdline_extras,
                                   options.cluster_weights,
                                   options.greediest_schemes,
                                   options.greediest_percent)

        # Set up the progress callback
        progress.TextProgress(cfg)
        cfg.load_base_path(args[0])

        if options.check_only:
            log.info("Exiting without processing (because of the -c/--check-only option ...")
        else:
            # Now try processing everything....
            method = analysis_method.choose_method(cfg.search)
            reporter.TextReporter(cfg)
            anal = method(cfg,
                          options.force_restart,
                          options.processes)
            results = anal.analyse()

            if options.dump_results:
                results.dump(cfg)
            elif options.compare_results:
                results.compare(cfg)

        # Successful exit
        end_time = datetime.datetime.now().replace(microsecond=0)
        processing_time = end_time - start_time

        log.info("Total processing time: %s (h:m:s)" % processing_time)
        log.info("Processing complete.")

        return 0

    except util.PartitionFinderError:
        log.error("Failed to run. See previous errors.")
        # Reraise if we were called by call_main, or if the options is set
        if options.show_python_exceptions or cmdargs is not None:
            raise

    except KeyboardInterrupt:
        log.error("User interrupted the Program")

    finally:
        # Make sure that we reset the configuration
        cfg.reset()

    return 1
开发者ID:BioinformaticsArchive,项目名称:partitionfinder,代码行数:63,代码来源:main.py


示例18: get_git_version

#!/usr/bin/env python

import os

from setuptools import setup, find_packages

from version import get_git_version
VERSION, SOURCE_HASH = get_git_version()
PROJECT = 'streamcorpus_elasticsearch'
URL = 'https://github.com/trec-kba'
AUTHOR = 'Diffeo, Inc.'
AUTHOR_EMAIL = '[email protected]'
DESC = 'Tool for loading streamcorpus.StreamItems into ElasticSearch'
LICENSE ='MIT/X11 license http://opensource.org/licenses/MIT'

def read_file(file_name):
    file_path = os.path.join(
        os.path.dirname(__file__),
        file_name
    )
    return open(file_path).read()

setup(
    name=PROJECT,
    version=VERSION,
    #source_label=SOURCE_HASH,
    license=LICENSE,
    description=DESC,
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    url=URL,
开发者ID:trec-kba,项目名称:streamcorpus-elasticsearch,代码行数:31,代码来源:setup.py


示例19: get_git_version

#source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'atrain_match'
copyright = u'2010, Adam Dybbroe, Karl-Göran Karlsson, Erik Johansson, Jakob Malm'

# 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 version import get_git_version
# The full version, including alpha/beta/rc tags.
release = get_git_version()
# The short X.Y version.
version = release.split('-')[0]

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
#unused_docs = []
开发者ID:adybbroe,项目名称:atrain_match,代码行数:31,代码来源:conf.py


示例20: use_setuptools

try:
    from setuptools import setup, find_packages
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import setup, find_packages

import version

import sys

Name = 'quantum-openvswitch-plugin'
ProjecUrl = ""
Version = version.get_git_version()
License = 'Apache License 2.0'
Author = 'Open vSwitch Team'
AuthorEmail = '[email protected]'
Maintainer = ''
Summary = 'OpenVSwitch plugin for Quantum'
ShortDescription = Summary
Description = Summary

requires = [
    'quantum-common',
    'quantum-server',
]

EagerResources = [
    'quantum',
]
开发者ID:asomya,项目名称:quantum,代码行数:30,代码来源:setup_openvswitch_plugin.py



注:本文中的version.get_git_version函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python version.get_version函数代码示例发布时间:2022-05-26
下一篇:
Python version.getVersion函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap