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

Python dist.getScripts函数代码示例

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

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



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

示例1: main

def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    # On Python 3, use setup3.py until Python 3 port is done:
    if sys.version_info[0] > 2:
        import setup3
        setup3.main()
        return

    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    requirements = ["zope.interface >= 3.6.0"]

    from twisted.python.dist import (
        STATIC_PACKAGE_METADATA, getExtensions, getScripts,
        setup, _EXTRAS_REQUIRE)

    setup_args = STATIC_PACKAGE_METADATA.copy()

    setup_args.update(dict(
        packages=setuptools.find_packages(),
        install_requires=requirements,
        conditionalExtensions=getExtensions(),
        scripts=getScripts(),
        include_package_data=True,
        zip_safe=False,
        extras_require=_EXTRAS_REQUIRE,
    ))

    setup(**setup_args)
开发者ID:wellbehavedsoftware,项目名称:wbs-graphite,代码行数:33,代码来源:setup.py


示例2: main

def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')
    from twisted import copyright
    from twisted.python.dist import getDataFiles, getExtensions, getScripts, \
        getPackages, setup, twisted_subprojects

    # "" is included because core scripts are directly in bin/
    projects = [''] + [x for x in os.listdir('bin')
                       if os.path.isdir(os.path.join("bin", x))
                       and x in twisted_subprojects]

    scripts = []
    for i in projects:
        scripts.extend(getScripts(i))

    setup_args = dict(
        # metadata
        name="Twisted",
        version=copyright.version,
        description="An asynchronous networking framework written in Python",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="Glyph Lefkowitz",
        maintainer_email="[email protected]",
        url="http://twistedmatrix.com/",
        license="MIT",
        long_description="""\
An extensible framework for Python programming, with special focus
on event-based network programming and multiprotocol integration.
""",
        packages = getPackages('twisted'),
        conditionalExtensions = getExtensions(),
        scripts = scripts,
        data_files=getDataFiles('twisted'),
        classifiers=[
            "Programming Language :: Python :: 2.5",
            "Programming Language :: Python :: 2.6",
            "Programming Language :: Python :: 2.7",
            ])

    if 'setuptools' in sys.modules:
        from pkg_resources import parse_requirements
        requirements = ["zope.interface"]
        try:
            list(parse_requirements(requirements))
        except:
            print """You seem to be running a very old version of setuptools.
This version of setuptools has a bug parsing dependencies, so automatic
dependency resolution is disabled.
"""
        else:
            setup_args['install_requires'] = requirements
        setup_args['include_package_data'] = True
        setup_args['zip_safe'] = False
    setup(**setup_args)
开发者ID:bahtou,项目名称:twisted,代码行数:60,代码来源:setup.py


示例3: test_noScriptsInSubproject

 def test_noScriptsInSubproject(self):
     """
     When calling getScripts for a project which doesn't actually
     have any scripts in the context of that project's individual
     project structure, an empty list should be returned.
     """
     basedir = self.mktemp()
     os.mkdir(basedir)
     scripts = dist.getScripts('noscripts', basedir=basedir)
     self.assertEquals(scripts, [])
开发者ID:Almad,项目名称:twisted,代码行数:10,代码来源:test_dist.py


示例4: test_noScriptsInSVN

 def test_noScriptsInSVN(self):
     """
     When calling getScripts for a project which doesn't actually
     have any scripts, in the context of an SVN checkout, an
     empty list should be returned.
     """
     basedir = self.mktemp()
     os.mkdir(basedir)
     os.mkdir(os.path.join(basedir, 'bin'))
     os.mkdir(os.path.join(basedir, 'bin', 'otherproj'))
     scripts = dist.getScripts('noscripts', basedir=basedir)
     self.assertEquals(scripts, [])
开发者ID:Almad,项目名称:twisted,代码行数:12,代码来源:test_dist.py


示例5: test_excludedPreamble

 def test_excludedPreamble(self):
     """
     L{dist.getScripts} includes neither C{"_preamble.py"} nor
     C{"_preamble.pyc"}.
     """
     basedir = FilePath(self.mktemp())
     bin = basedir.child('bin')
     bin.makedirs()
     bin.child('_preamble.py').setContent('some preamble code\n')
     bin.child('_preamble.pyc').setContent('some preamble byte code\n')
     bin.child('program').setContent('good program code\n')
     scripts = dist.getScripts(basedir=basedir.path)
     self.assertEqual(scripts, [bin.child('program').path])
开发者ID:Architektor,项目名称:PySnip,代码行数:13,代码来源:test_dist.py


示例6: test_excludedPreamble

 def test_excludedPreamble(self):
     """
     L{dist.getScripts} includes neither C{"_preamble.py"} nor
     C{"_preamble.pyc"}.
     """
     basedir = FilePath(self.mktemp())
     bin = basedir.child("bin")
     bin.makedirs()
     bin.child("_preamble.py").setContent("some preamble code\n")
     bin.child("_preamble.pyc").setContent("some preamble byte code\n")
     bin.child("program").setContent("good program code\n")
     scripts = dist.getScripts("", basedir=basedir.path)
     self.assertEqual(scripts, [bin.child("program").path])
开发者ID:hanwei2008,项目名称:ENV,代码行数:13,代码来源:test_dist.py


示例7: test_scriptsInRelease

 def test_scriptsInRelease(self):
     """
     getScripts should return the scripts associated with a project
     in the context of a released subproject tarball.
     """
     basedir = self.mktemp()
     os.mkdir(basedir)
     os.mkdir(os.path.join(basedir, 'bin'))
     f = open(os.path.join(basedir, 'bin', 'exy'), 'w')
     f.write('yay')
     f.close()
     scripts = dist.getScripts(basedir=basedir)
     self.assertEqual(len(scripts), 1)
     self.assertEqual(os.path.basename(scripts[0]), 'exy')
开发者ID:Architektor,项目名称:PySnip,代码行数:14,代码来源:test_dist.py


示例8: test_scriptsInSVN

 def test_scriptsInSVN(self):
     """
     getScripts should return the scripts associated with a project
     in the context of Twisted SVN.
     """
     basedir = self.mktemp()
     os.mkdir(basedir)
     os.mkdir(os.path.join(basedir, 'bin'))
     os.mkdir(os.path.join(basedir, 'bin', 'proj'))
     f = open(os.path.join(basedir, 'bin', 'proj', 'exy'), 'w')
     f.write('yay')
     f.close()
     scripts = dist.getScripts('proj', basedir=basedir)
     self.assertEquals(len(scripts), 1)
     self.assertEquals(os.path.basename(scripts[0]), 'exy')
开发者ID:Almad,项目名称:twisted,代码行数:15,代码来源:test_dist.py


示例9: test_scriptsInSVN

 def test_scriptsInSVN(self):
     """
     getScripts should return the scripts associated with a project
     in the context of Twisted SVN.
     """
     basedir = self.mktemp()
     os.mkdir(basedir)
     os.mkdir(os.path.join(basedir, "bin"))
     os.mkdir(os.path.join(basedir, "bin", "proj"))
     f = open(os.path.join(basedir, "bin", "proj", "exy"), "w")
     f.write("yay")
     f.close()
     scripts = dist.getScripts("proj", basedir=basedir)
     self.assertEqual(len(scripts), 1)
     self.assertEqual(os.path.basename(scripts[0]), "exy")
开发者ID:hanwei2008,项目名称:ENV,代码行数:15,代码来源:test_dist.py


示例10: test_getScriptsTopLevel

    def test_getScriptsTopLevel(self):
        """
        getScripts returns scripts that are (only) in the top level bin
        directory.
        """
        basedir = FilePath(self.mktemp())
        basedir.createDirectory()
        bindir = basedir.child("bin")
        bindir.createDirectory()
        included = bindir.child("included")
        included.setContent("yay included")
        subdir = bindir.child("subdir")
        subdir.createDirectory()
        subdir.child("not-included").setContent("not included")

        scripts = dist.getScripts(basedir=basedir.path)
        self.assertEqual(scripts, [included.path])
开发者ID:Architektor,项目名称:PySnip,代码行数:17,代码来源:test_dist.py


示例11: main

def main():
    # Make sure the to-be-installed version of Twisted is used, if available,
    # since we're importing from it:
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    from twisted.python.dist import STATIC_PACKAGE_METADATA, getScripts

    args = STATIC_PACKAGE_METADATA.copy()
    args.update(dict(
        cmdclass={
            'build_py': PickyBuildPy,
            'build_scripts': PickyBuildScripts,
        },
        packages=find_packages(),
        install_requires=["zope.interface >= 4.0.2"],
        zip_safe=False,
        include_package_data=True,
        scripts=getScripts(),
    ))

    setup(**args)
开发者ID:wellbehavedsoftware,项目名称:wbs-graphite,代码行数:22,代码来源:setup3.py


示例12: getScripts

    author="Twisted Matrix Laboratories",
    author_email="[email protected]",
    maintainer="Glyph Lefkowitz",
    url="http://twistedmatrix.com/",
    license="MIT",
    long_description="""\
This is the core of Twisted, including:
 * Networking support (twisted.internet)
 * Trial, the unit testing framework (twisted.trial)
 * AMP, the Asynchronous Messaging Protocol (twisted.protocols.amp)
 * Twisted Spread, a remote object system (twisted.spread)
 * Utility code (twisted.python)
 * Basic abstractions that multiple subprojects use
   (twisted.cred, twisted.application, twisted.plugin)
 * Database connectivity support (twisted.enterprise)
 * A few basic protocols and protocol abstractions (twisted.protocols)
""",

    # build stuff
    packages=getPackages('twisted',
                         ignore=twisted_subprojects + ['plugins']),
    plugins=plugins,
    data_files=getDataFiles('twisted', ignore=twisted_subprojects),
    conditionalExtensions=extensions,
    scripts = getScripts(""),
)


if __name__ == '__main__':
    setup(**setup_args)
开发者ID:Varriount,项目名称:Colliberation,代码行数:30,代码来源:setup.py


示例13:

                "Development Status :: 4 - Beta",
                "Environment :: No Input/Output (Daemon)",
                "Intended Audience :: Developers :: Telecommunications Industry",
                "License :: OSI Approved :: MIT License",
                "Programming Language :: Python",
                "Topic :: Telephony :: Framework",
                "Topic :: Internet",
                "Topic :: Software Development :: Libraries :: Python Modules",
            ]
        )
    else:
        extraMeta = {}

    dist.setup(
        twisted_subproject="fats",
        scripts=dist.getScripts("fats"),
        # metadata
        name="Twisted FATS",
        description="Twisted FATS contains FastAGI and AMI protocols implementation.",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="Alexander Burtsev",
        maintainer_email="[email protected]",
        url="http://fats.burus.org",
        license="MIT",
        long_description="""\
Twisted framework based enhancement. Project contains protocols
implementation for the FastAGI and AMI. Allow to make your
Asterisk IP-PBX server faster and easy to use.
""",
        **extraMeta
开发者ID:BramaBrama,项目名称:fats,代码行数:31,代码来源:setup.py


示例14:

                "Environment :: No Input/Output (Daemon)",
                "Intended Audience :: Developers",
                "Intended Audience :: End Users/Desktop",
                "Intended Audience :: System Administrators",
                "License :: OSI Approved :: MIT License",
                "Programming Language :: Python",
                "Topic :: Internet",
                "Topic :: Security",
                "Topic :: Software Development :: Libraries :: Python Modules",
                "Topic :: Terminals",
            ])
    else:
        extraMeta = {}

    dist.setup(
        twisted_subproject="conch",
        scripts=dist.getScripts("conch"),
        # metadata
        name="Twisted Conch",
        description="Twisted SSHv2 implementation.",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="Paul Swartz",
        url="http://twistedmatrix.com/trac/wiki/TwistedConch",
        license="MIT",
        long_description="""\
Conch is an SSHv2 implementation using the Twisted framework.  It
includes a server, client, a SFTP client, and a key generator.
""",
        **extraMeta)
开发者ID:AmirKhooj,项目名称:VTK,代码行数:30,代码来源:setup.py


示例15: OSCAR

            "Development Status :: 4 - Beta",
            "Environment :: No Input/Output (Daemon)",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: MIT License",
            "Programming Language :: Python",
            "Topic :: Communications :: Chat",
            "Topic :: Communications :: Chat :: AOL Instant Messenger",
            "Topic :: Communications :: Chat :: ICQ",
            "Topic :: Communications :: Chat :: Internet Relay Chat",
            "Topic :: Internet",
            "Topic :: Software Development :: Libraries :: Python Modules",
        ])

    dist.setup(
        twisted_subproject="words",
        scripts=dist.getScripts("words"),
        # metadata
        name="Twisted Words",
        description="Twisted Words contains Instant Messaging implementations.",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="Jp Calderone",
        url="http://twistedmatrix.com/trac/wiki/TwistedWords",
        license="MIT",
        long_description="""\
Twisted Words contains implementations of many Instant Messaging protocols,
including IRC, Jabber, OSCAR (AIM & ICQ), and some functionality for creating
bots, inter-protocol gateways, and a client application for many of the
protocols.

In support of Jabber, Twisted Words also contains X-ish, a library for
开发者ID:Bobboya,项目名称:vizitown_plugin,代码行数:31,代码来源:setup.py


示例16: SystemExit

# See LICENSE for details.

import sys

try:
    from twisted.python import dist
except ImportError:
    raise SystemExit(
        "twisted.python.dist module not found.  Make sure you "
        "have installed the Twisted core package before "
        "attempting to install any other Twisted projects."
    )

if __name__ == "__main__":
    dist.setup(
        twisted_subproject="lore",
        scripts=dist.getScripts("lore"),
        # metadata
        name="Twisted Lore",
        description="Twisted documentation system",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="Andrew Bennetts",
        url="http://twistedmatrix.com/trac/wiki/TwistedLore",
        license="MIT",
        long_description="""\
Twisted Lore is a documentation generator with HTML and LaTeX support,
used in the Twisted project.
""",
    )
开发者ID:Code-Alliance-Archive,项目名称:oh-mainline,代码行数:30,代码来源:setup.py


示例17:

            classifiers=[
                "Development Status :: 4 - Beta",
                "Environment :: No Input/Output (Daemon)",
                "Intended Audience :: Developers",
                "License :: OSI Approved :: MIT License",
                "Programming Language :: Python",
                "Topic :: Communications :: Email :: Post-Office :: IMAP",
                "Topic :: Communications :: Email :: Post-Office :: POP3",
                "Topic :: Software Development :: Libraries :: Python Modules",
            ])
    else:
        extraMeta = {}

    dist.setup(
        twisted_subproject="mail",
        scripts=dist.getScripts("mail"),
        # metadata
        name="Twisted Mail",
        description="A Twisted Mail library, server and client.",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="Jp Calderone",
        maintainer_email="[email protected]",
        url="http://twistedmatrix.com/trac/wiki/TwistedMail",
        license="MIT",
        long_description="""\
An SMTP, IMAP and POP protocol implementation together with clients
and servers.

Twisted Mail contains high-level, efficient protocol implementations
for both clients and servers of SMTP, POP3, and IMAP4. Additionally,
开发者ID:claude-lee,项目名称:saymeando,代码行数:31,代码来源:setup.py


示例18: Copyright

# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

import sys

try:
    from twisted.python import dist
except ImportError:
    raise SystemExit("twisted.python.dist module not found.  Make sure you "
                     "have installed the Twisted core package before "
                     "attempting to install any other Twisted projects.")

if __name__ == '__main__':
    dist.setup(
        twisted_subproject="web",
        scripts=dist.getScripts("web"),
        # metadata
        name="Twisted Web",
        description="Twisted web server, programmable in Python.",
        author="Twisted Matrix Laboratories",
        author_email="[email protected]",
        maintainer="James Knight",
        url="http://twistedmatrix.com/trac/wiki/TwistedWeb",
        license="MIT",
        long_description="""\
Twisted Web is a complete web server, aimed at hosting web
applications using Twisted and Python, but fully able to serve static
pages, also.
""",
        )
开发者ID:AmirKhooj,项目名称:VTK,代码行数:30,代码来源:setup.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python dist.setup函数代码示例发布时间:2022-05-27
下一篇:
Python deprecate.getDeprecationWarningString函数代码示例发布时间: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