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

Python setuptools.Command类代码示例

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

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



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

示例1: __init__

    def __init__(self, *args, **kwargs):
        os.environ['DJANGO_SETTINGS_MODULE'] = 'RestAuth.testsettings'

        Command.__init__(self, *args, **kwargs)

        # import here so coverage results are not tainted:
        from Users.models import user_permissions
        from Users.models import prop_permissions
        from Groups.models import group_permissions
        from common.cli import helpers
        from Services.cli import parsers as service_parser
        from Users.cli import parsers as user_parser
        from Groups.cli import parsers as group_parser
        from common.cli import parsers as import_parser

        # generate files for cli-scripts:
        service_parser.parser.prog = '|bin-restauth-service|'
        user_parser.parser.prog = '|bin-restauth-user|'
        group_parser.parser.prog = '|bin-restauth-group|'
        import_parser.parser.prog = '|bin-restauth-import|'

        # create necesarry folders:
        if not os.path.exists('doc/_static'):
            os.mkdir('doc/_static')
        if not os.path.exists('doc/gen'):
            os.mkdir('doc/gen')

        for parser, name in [(service_parser, 'restauth-service'),
                             (user_parser, 'restauth-user'),
                             (group_parser, 'restauth-group'),
                             (import_parser, 'restauth-import')]:

            for suffix in ['usage', 'commands', 'parameters']:
                filename = 'doc/gen/%s-%s.rst' % (name, suffix)
                if self.should_generate(parser.__file__, filename):
                    func = getattr(helpers, 'write_%s' % suffix)

                    with open(filename, 'w') as f:
                        func(f, parser.parser, name)

        # generate permissions:
        self.write_perm_table('users', user_permissions)
        self.write_perm_table('properties', prop_permissions)
        self.write_perm_table('groups', group_permissions)

        pythonpath = os.environ.get('PYTHONPATH')
        if pythonpath:
            os.environ['PYTHONPATH'] += ':.'
        else:
            os.environ['PYTHONPATH'] = '.'
        common_path = os.path.abspath(os.path.join('..', 'RestAuthCommon', 'python'))
        if os.path.exists(common_path):
            os.environ['PYTHONPATH'] += ':%s' % common_path

        version = get_version()
        os.environ['SPHINXOPTS'] = '-D release=%s -D version=%s' \
            % (version, version)
        os.environ['RESTAUTH_LATEST_RELEASE'] = LATEST_RELEASE
开发者ID:asd1355215911,项目名称:server,代码行数:58,代码来源:setup.py


示例2: __init__

    def __init__(self, dist):
        Command.__init__(self, dist)

        self.debug_client = None
        self.scp_version = 2
        self.splunk_home = os.environ['SPLUNK_HOME']
        self.app_name = self.distribution.metadata.name
        self.app_source = os.path.join(project_dir, 'package')

        return
开发者ID:splkfinn,项目名称:splunk-sdk-python,代码行数:10,代码来源:setup.py


示例3: __init__

    def __init__(self, dist):
        Command.__init__(self, dist)

        self.oonisupportdir = dirname(dirname(abspath(__file__)))
        self.pkgdir = join(self.oonisupportdir, 'mlab-ns-simulator')
        self.testdir = join(self.pkgdir, 'build', 'test')
        self.venvdir = join(self.testdir, 'venv')

        bindir = join(self.venvdir, 'bin')
        self.pip = join(bindir, 'pip')
        self.coverage = join(bindir, 'coverage')
        self.trial = join(bindir, 'trial')
开发者ID:hellais,项目名称:ooni-support,代码行数:12,代码来源:setup.py


示例4: __init__

    def __init__(self, dist):
        Command.__init__(self, dist)
        join = os.path.join

        self.basedir = os.path.dirname(os.path.abspath(__file__))
        self.pymod = join(self.basedir, PACKAGENAME)
        self.testdir = join(self.basedir, 'build', 'test')
        self.venvdir = join(self.testdir, 'venv')

        self.bindir = os.path.join(self.venvdir, 'bin')
        self.trial = os.path.join(self.bindir, 'trial')
        self.pip = os.path.join(self.bindir, 'pip')
        self.coverage = os.path.join(self.bindir, 'coverage')
开发者ID:nejucomo,项目名称:c2c,代码行数:13,代码来源:setup.py


示例5: __init__

 def __init__(self, *args):
     self.args = args[0]  # so we can pass it to other classes
     Command.__init__(self, *args)
开发者ID:kirpit,项目名称:Mathics,代码行数:3,代码来源:setup.py


示例6: __init__

 def __init__ ( self, *args, **kwargs ):
     # super ( NoseTest, self ).__init__ ( *args, **kwargs )
     Command.__init__ ( self, *args, **kwargs )
开发者ID:cjxiaohao,项目名称:libstorages,代码行数:3,代码来源:setup.py


示例7: __init__

    def __init__(self, dist, **kw):
        from babel.messages import frontend as babel

        self.babel_compile_messages = babel.compile_catalog(dist)
        Command.__init__(self, dist, **kw)
开发者ID:Bevaz,项目名称:OctoPrint,代码行数:5,代码来源:setup.py


示例8: __init__

 def __init__(self, *args):
     self.args = args[0]
     Command.__init__(self, *args)
开发者ID:iambernie,项目名称:fractalsfun,代码行数:3,代码来源:setup.py


示例9: __init__

 def __init__(self, dist, **kw):
     # underlying commands are old-style classes on Python 2 :-(
     Command.__init__(self, dist, **kw)
开发者ID:wtforms,项目名称:wtforms,代码行数:3,代码来源:setup.py


示例10: __init__

 def __init__(self, dist):
     self.compiler = None
     Command.__init__(self, dist)
开发者ID:zjc5415,项目名称:pyq,代码行数:3,代码来源:setup.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python setuptools.Distribution类代码示例发布时间:2022-05-27
下一篇:
Python setuptools.setup函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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