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

Python setuptools.setup函数代码示例

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

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



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

示例1: __call__

    def __call__(self, options, args):
        sys.argv = [sys.argv[0]] + args
        assert setup is not None, "You must have setuptools installed to use SetupCLI"
        here = os.path.dirname(os.path.abspath(__file__))
        try:
            filename = os.path.join(here, 'README.txt')
            description = file(filename).read()
        except:    
            description = ''
        os.chdir(here)

        setup(name='ManifestDestiny',
              version=version,
              description="Universal manifests for Mozilla test harnesses",
              long_description=description,
              classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
              keywords='mozilla manifests',
              author='Jeff Hammel',
              author_email='[email protected]',
              url='https://wiki.mozilla.org/Auto-tools/Projects/ManifestDestiny',
              license='MPL',
              zip_safe=False,
              py_modules=['manifestparser'],
              install_requires=[
                  # -*- Extra requirements: -*-
                  ],
              entry_points="""
              [console_scripts]
              manifestparser = manifestparser:main
              """,
              )
开发者ID:Anachid,项目名称:mozilla-central,代码行数:31,代码来源:manifestparser.py


示例2: main

def main():
    if float(sys.version[:3])<2.6 or float(sys.version[:3])>=2.8:
        sys.stderr.write("CRITICAL: Python version must be 2.6 or 2.7!\n")
        sys.exit(1)

    setup(name="AREM",
          version="1.0.1",
          description="Aligning Reads by Expectation-Maximization.\nBased on MACS (Model Based Analysis for ChIP-Seq data)",
          author='Jake Biesinger; Daniel Newkirk; Alvin Chon; Yong Zhang; Tao (Foo) Liu',
          author_email='[email protected]; [email protected]; [email protected]; [email protected]; [email protected]',
          url='http://cbcl.ics.uci.edu/AREM',
          long_description=read('README'),
          package_dir={'AREM' : 'AREM'},
          packages=['AREM', 'AREM.IO'],
          scripts=['bin/arem','bin/elandmulti2bed','bin/elandresult2bed','bin/elandexport2bed',
                   'bin/sam2bed', 'bin/wignorm'],
          license = "Creative",
          classifiers=[
              'Development Status :: 4 - Beta',
              'Environment :: Console',
              'Intended Audience :: Developers',
              'Intended Audience :: Science/Research',
              'License :: OSI Approved :: Artistic License',
              'Operating System :: MacOS :: MacOS X',
              'Operating System :: Microsoft :: Windows',
              'Operating System :: POSIX',
              'Programming Language :: Python :: 2.6',
              'Programming Language :: Python :: 2.7',
              'Topic :: Scientific/Engineering :: Bio-Informatics'
              ],
          )
开发者ID:dnewkirk,项目名称:AREM,代码行数:31,代码来源:setup.py


示例3: main

def main():
    import io
    with io.open(os.path.join(HERE, 'README.rst'), 'r') as readme:
        setup(
            name                 = __project__,
            version              = __version__,
            description          = __doc__,
            long_description     = readme.read(),
            classifiers          = __classifiers__,
            author               = __author__,
            author_email         = __author_email__,
            url                  = __url__,
            license              = [
                c.rsplit('::', 1)[1].strip()
                for c in __classifiers__
                if c.startswith('License ::')
                ][0],
            keywords             = __keywords__,
            packages             = find_packages(),
            package_data         = {},
            include_package_data = True,
            platforms            = __platforms__,
            install_requires     = __requires__,
            extras_require       = __extra_requires__,
            zip_safe             = False,
            entry_points         = __entry_points__,
            )
开发者ID:waveform80,项目名称:ratbot,代码行数:27,代码来源:setup.py


示例4: main

def main(with_binary):
    if with_binary:
        features = {'speedups': speedups}
    else:
        features = {}

    extra = {}

    # Python 3: run 2to3
    if sys.version_info >= (3,):
        extra['use_2to3'] = True

    setup(
        name='http-parser',
        version=VERSION,
        description=DESCRIPTION,
        long_description=LONG_DESCRIPTION,
        author='Benoit Chesneau',
        author_email='[email protected]',
        license='MIT',
        url='http://github.com/benoitc/http-parser',
        classifiers=CLASSIFIERS,
        packages=find_packages(),
        platforms=['any'],
        # data_files=[('http_parser',
        #     ['LICENSE', 'MANIFEST.in', 'NOTICE', 'README.rst', 'THANKS']
        # )],
        features=features,
        **extra
    )
开发者ID:georgemarshall,项目名称:http-parser,代码行数:30,代码来源:setup.py


示例5: run_setup

def run_setup(with_cext):
    kwargs = {}
    if with_cext:
        kwargs['ext_modules'] = ext_modules
    else:
        kwargs['ext_modules'] = []

    setup(
        name='Logbook',
        version=__version__,
        license='BSD',
        url='http://logbook.pocoo.org/',
        author='Armin Ronacher, Georg Brandl',
        author_email='[email protected]',
        description='A logging replacement for Python',
        long_description=__doc__,
        packages=['logbook'],
        zip_safe=False,
        platforms='any',
        cmdclass=cmdclass,
        tests_require=['pytest'],
        classifiers=[
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3.2',
            'Programming Language :: Python :: 3.3',
            'Programming Language :: Python :: 3.4',
            'Programming Language :: Python :: 3.5',
        ],
        extras_require=extras_require,
        distclass=Distribution,
        **kwargs
    )
开发者ID:Python-PyBD,项目名称:logbook,代码行数:33,代码来源:setup.py


示例6: run_setup

def run_setup(ext_modules, run_make):
    if run_make:
        make()
    setup(
        name='gevent',
        version=__version__,
        description='Coroutine-based network library',
        long_description=read('README.rst'),
        author='Denis Bilenko',
        author_email='[email protected]',
        url='http://www.gevent.org/',
        packages=['gevent'],
        include_package_data=include_package_data,
        ext_modules=ext_modules,
        cmdclass=dict(build_ext=my_build_ext, sdist=sdist),
        install_requires=install_requires,
        zip_safe=False,
        classifiers=[
            "License :: OSI Approved :: MIT License",
            "Programming Language :: Python :: 2.6",
            "Programming Language :: Python :: 2.7",
            "Programming Language :: Python :: 3.3",
            "Programming Language :: Python :: 3.4",
            "Programming Language :: Python :: Implementation :: CPython",
            "Programming Language :: Python :: Implementation :: PyPy",
            "Operating System :: MacOS :: MacOS X",
            "Operating System :: POSIX",
            "Operating System :: Microsoft :: Windows",
            "Topic :: Internet",
            "Topic :: Software Development :: Libraries :: Python Modules",
            "Intended Audience :: Developers",
            "Development Status :: 4 - Beta"]
    )
开发者ID:Squarecap,项目名称:gevent,代码行数:33,代码来源:setup.py


示例7: main

def main():
    install_requires = [
        ]
    packages = [full_package_name] + [(full_package_name + '.' + x) for x
                                     in find_packages(exclude=['tests'])]

    setup(
        name=full_package_name,
        version=version_str,
        description='a version of dict that keeps keys in '\
                    'insertion resp. sorted order',
        install_requires=[
        ],
        #install_requires=install_requires,
        long_description=open('README.rst').read(),
        url='https://bitbucket.org/ruamel/' + package_name,
        author='Anthon van der Neut',
        author_email='a.van.der.neut[email protected]',
        license="MIT license",
        package_dir={full_package_name: '.'},
        namespace_packages=[name_space],
        packages=packages,
        ext_modules = [module1],
        cmdclass={'install_lib': MyInstallLib},
        classifiers=[
            'Development Status :: 4 - Beta',
            'Intended Audience :: System Administrators',
            'License :: OSI Approved :: MIT License',
            'Operating System :: POSIX :: Linux',
            'Programming Language :: Python',
        ],
    )
开发者ID:ruamel,项目名称:ordereddict,代码行数:32,代码来源:setup.py


示例8: run_setup

def run_setup(with_binary):
    cmdclass = dict(test=TestCommand)
    if with_binary:
        kw = dict(
            ext_modules = [
                Extension("simplejson._speedups", ["simplejson/_speedups.c"]),
            ],
            cmdclass=dict(cmdclass, build_ext=ve_build_ext),
        )
    else:
        kw = dict(cmdclass=cmdclass)

    setup(
        name="simplejson",
        version=VERSION,
        description=DESCRIPTION,
        long_description=LONG_DESCRIPTION,
        classifiers=CLASSIFIERS,
        author="Bob Ippolito",
        author_email="[email protected]",
        url="http://github.com/simplejson/simplejson",
        license="MIT License",
        packages=['simplejson', 'simplejson.tests'],
        platforms=['any'],
        **kw)
开发者ID:JBaldachino,项目名称:simplejson,代码行数:25,代码来源:setup.py


示例9: install

def install(the_package,version,date):
    
    # imports
    try:
        from setuptools import setup
    except ImportError:
        from distutils.core import setup
        
    # test for requirements
    import_tests()
    
    # list all SUAVE sub packages
    #print 'Listing Packages and Sub-Packages:'
    packages = list_subpackages(the_package,verbose=False)
    packages = map( '.'.join, packages )

    # run the setup!!!
    setup(
        name = the_package,
        version = version, 
        description = 'SUAVE: Stanford University Aerospace Vehicle Environment',
        author = 'Stanford University Aerospace Design Lab (ADL)',
        author_email = '[email protected]',
        maintainer = 'The Developers',
        url = 'suave.stanford.edu',
        packages = packages,
        include_package_data = True,
        license = 'CC BY-NC-SA 4.0',
        platforms = ['Win, Linux, Unix, Mac OS-X'],
        zip_safe  = False,
        long_description = read('../README.md')
    )  
    
    return
开发者ID:Aircraft-Design-UniNa,项目名称:SUAVE,代码行数:34,代码来源:setup.py


示例10: run_setup

def run_setup(extensions):
    kw = {'cmdclass': {'doc': DocCommand, 'gevent_nosetests': gevent_nosetests}}
    if extensions:
        kw['cmdclass']['build_ext'] = build_extensions
        kw['ext_modules'] = extensions

    dependencies = ['futures', 'scales', 'blist']
    if platform.python_implementation() != "CPython":
        dependencies.remove('blist')

    setup(
        name='cassandra-driver',
        version=__version__,
        description='Python driver for Cassandra',
        long_description=long_description,
        url='http://github.com/datastax/python-driver',
        author='Tyler Hobbs',
        author_email='[email protected]',
        packages=['cassandra', 'cassandra.io'],
        include_package_data=True,
        install_requires=dependencies,
        tests_require=['nose', 'mock', 'ccm', 'unittest2', 'PyYAML', 'pytz'],
        classifiers=[
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: Apache Software License',
            'Natural Language :: English',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7',
            'Topic :: Software Development :: Libraries :: Python Modules'
        ],
        **kw)
开发者ID:JeremyOT,项目名称:python-driver,代码行数:35,代码来源:setup.py


示例11: run_setup

def run_setup():
    if sys.argv[1] == 'build':
        shutil.copy('.libs/frontend.so', 'frontend.so')

    setup(name = 'thrift-py',
        version = '0.9.0',
        description = 'Thrift python compiler',
        author = ['Thrift Developers'],
        author_email = ['[email protected]'],
        url = 'http://thrift.apache.org',
        license = 'Apache License 2.0',
        packages = [
            'thrift_compiler',
            'thrift_compiler.generate',
        ],
        package_dir = {'thrift_compiler' : '.'},
        package_data = {'thrift_compiler':['frontend.so']},
        classifiers = [
            'Development Status :: 5 - Production/Stable',
            'Environment :: Console',
            'Intended Audience :: Developers',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2',
            'Topic :: Software Development :: Libraries',
            'Topic :: System :: Networking'
        ],
        zip_safe = False,
    )
开发者ID:191919,项目名称:fbthrift,代码行数:28,代码来源:setup.py


示例12: main

def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print(s % (name, version, required_python_version))
        sys.exit(1)
    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in list(INSTALL_SCHEMES.values()):
        scheme['data'] = scheme['purelib']

    setup(
        name=name,
        version=version,
        description=desc,
        long_description=long_desc,
        classifiers=classifiers,
        author=author,
        author_email=author_email,
        url=url,
        license=cp_license,
        packages=packages,
        data_files=data_files,
        scripts=scripts,
        cmdclass=cmd_class,
    )
开发者ID:CBIR-LL,项目名称:py-cbir-image-search-engine,代码行数:25,代码来源:setup.py


示例13: main

def main():
    base_dir = dirname(__file__)
    install_requires = ['requests>=2.4.3', 'six>=1.4.0', 'requests-toolbelt>=0.4.0']
    redis_requires = ['redis>=2.10.3']
    jwt_requires = ['pyjwt>=1.3.0', 'cryptography>=0.9.2']
    if version_info < (3, 4):
        install_requires.append('enum34>=1.0.4')
    elif version_info < (2, 7):
        install_requires.append('ordereddict>=1.1')
    setup(
        name='boxsdk',
        version='1.3.2',
        description='Official Box Python SDK',
        long_description=open(join(base_dir, 'README.rst')).read(),
        author='Box',
        author_email='[email protected]',
        url='http://opensource.box.com',
        packages=find_packages(exclude=['demo', 'docs', 'test']),
        install_requires=install_requires,
        extras_require={'jwt': jwt_requires, 'redis': redis_requires},
        tests_require=['pytest', 'pytest-xdist', 'mock', 'sqlalchemy', 'bottle', 'jsonpatch'],
        cmdclass={'test': PyTest},
        classifiers=CLASSIFIERS,
        keywords='box oauth2 sdk',
        license=open(join(base_dir, 'LICENSE')).read(),
    )
开发者ID:bhh1988,项目名称:box-python-sdk,代码行数:26,代码来源:setup.py


示例14: main

def main():
    install_requires = ["py>=1.4.29"]  # pluggy is vendored in _pytest.vendored_packages
    extras_require = {}
    if has_environment_marker_support():
        extras_require[':python_version=="2.6" or python_version=="3.0" or python_version=="3.1"'] = ["argparse"]
        extras_require[':sys_platform=="win32"'] = ["colorama"]
    else:
        if sys.version_info < (2, 7) or (3,) <= sys.version_info < (3, 2):
            install_requires.append("argparse")
        if sys.platform == "win32":
            install_requires.append("colorama")

    setup(
        name="pytest",
        description="pytest: simple powerful testing with Python",
        long_description=long_description,
        version=get_version(),
        url="http://pytest.org",
        license="MIT license",
        platforms=["unix", "linux", "osx", "cygwin", "win32"],
        author="Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others",
        author_email="holger at merlinux.eu",
        entry_points=make_entry_points(),
        classifiers=classifiers,
        cmdclass={"test": PyTest},
        # the following should be enabled for release
        install_requires=install_requires,
        extras_require=extras_require,
        packages=["_pytest", "_pytest.assertion", "_pytest._code", "_pytest.vendored_packages"],
        py_modules=["pytest"],
        zip_safe=False,
    )
开发者ID:ClearcodeHQ,项目名称:pytest,代码行数:32,代码来源:setup.py


示例15: _setup

def _setup(longdescription):
    setup(name=PKG,
          version=version,
          description='Python wrappers for a few algorithms from the Crypto++ library',
          long_description=longdescription,
          author='Zooko Wilcox-O\'Hearn',
          author_email='[email protected]',
          url='https://tahoe-lafs.org/trac/' + PKG,
          license='GNU GPL', # see README.rst for details -- there is also an alternative licence
          packages=["pycryptopp",
                    "pycryptopp.cipher",
                    "pycryptopp.hash",
                    "pycryptopp.publickey",
                    "pycryptopp.publickey.ed25519",
                    "pycryptopp.test",
                    ],
          include_package_data=True,
          exclude_package_data={
              '': [ '*.cpp', '*.hpp', ]
              },
          data_files=data_files,
          package_dir={"pycryptopp": "src/pycryptopp"},
          setup_requires=setup_requires,
          install_requires=install_requires,
          dependency_links=dependency_links,
          classifiers=trove_classifiers,
          ext_modules=ext_modules,
          test_suite=PKG+".test",
          zip_safe=False, # I prefer unzipped for easier access.
          cmdclass=commands,
          )
开发者ID:Phoul,项目名称:pycryptopp,代码行数:31,代码来源:setup.py


示例16: setup_cclib

def setup_cclib():

    doclines = __doc__.split("\n")

    setuptools.setup(
        name="cclib",
        version="1.5.3",
        url="http://cclib.github.io/",
        author="cclib development team",
        author_email="[email protected]",
        maintainer="cclib development team",
        maintainer_email="[email protected]",
        license="BSD 3-Clause License",
        description=doclines[0],
        long_description="\n".join(doclines[2:]),
        classifiers=classifiers.split("\n"),
        platforms=["Any."],
        packages=setuptools.find_packages(exclude=['*test*']),
        entry_points={
            'console_scripts': [
                'ccget=cclib.scripts.ccget:ccget',
                'ccwrite=cclib.scripts.ccwrite:main',
                'cda=cclib.scripts.cda:main'
            ]
        }

    )
开发者ID:felixplasser,项目名称:cclib,代码行数:27,代码来源:setup.py


示例17: build_extension

def build_extension(dir_name, extension_name, target_pydevd_name, force_cython, extended=False, has_pxd=False):
    pyx_file = os.path.join(os.path.dirname(__file__), dir_name, "%s.pyx" % (extension_name,))

    if target_pydevd_name != extension_name:
        # It MUST be there in this case!
        # (otherwise we'll have unresolved externals because the .c file had another name initially).
        import shutil

        # We must force cython in this case (but only in this case -- for the regular setup in the user machine, we
        # should always compile the .c file).
        force_cython = True

        new_pyx_file = os.path.join(os.path.dirname(__file__), dir_name, "%s.pyx" % (target_pydevd_name,))
        new_c_file = os.path.join(os.path.dirname(__file__), dir_name, "%s.c" % (target_pydevd_name,))
        shutil.copy(pyx_file, new_pyx_file)
        pyx_file = new_pyx_file
        if has_pxd:
            pxd_file = os.path.join(os.path.dirname(__file__), dir_name, "%s.pxd" % (extension_name,))
            new_pxd_file = os.path.join(os.path.dirname(__file__), dir_name, "%s.pxd" % (target_pydevd_name,))
            shutil.copy(pxd_file, new_pxd_file)
        assert os.path.exists(pyx_file)

    try:
        if force_cython:
            from Cython.Build import cythonize  # @UnusedImport
            ext_modules = cythonize([
                "%s/%s.pyx" % (dir_name, target_pydevd_name,),
            ])
        else:
            # Always compile the .c (and not the .pyx) file (which we should keep up-to-date by running build_tools/build.py).
            from distutils.extension import Extension
            ext_modules = [Extension("%s%s.%s" % (dir_name, "_ext" if extended else "", target_pydevd_name,),
                                     [os.path.join(dir_name, "%s.c" % target_pydevd_name), ],
                                     # uncomment to generate pdbs for visual studio.
                                     # extra_compile_args=["-Zi", "/Od"],
                                     # extra_link_args=["-debug"],
                                     )]

        setup(
            name='Cythonize',
            ext_modules=ext_modules
        )
    finally:
        if target_pydevd_name != extension_name:
            try:
                os.remove(new_pyx_file)
            except:
                import traceback
                traceback.print_exc()
            try:
                os.remove(new_c_file)
            except:
                import traceback
                traceback.print_exc()
            if has_pxd:
                try:
                    os.remove(new_pxd_file)
                except:
                    import traceback
                    traceback.print_exc()
开发者ID:andrewgu12,项目名称:config,代码行数:60,代码来源:setup_cython.py


示例18: main

def main():
    name = "tangods-pynutaq"

    version = "0.5.0"

    description = "Device server for the Nutaq platform."

    author = "Antonio Milan Otero"

    author_email = "[email protected]"

    license = "GPLv3"

    url = "http://www.maxlab.lu.se"

    package_dir = {'': 'src'}

    exclude=["interlocksdiags"]
    packages = find_packages('src', exclude=exclude)

    scripts = [
        'scripts/Nutaq',
        'scripts/NutaqDiags'
    ]
    setup(name=name,
          version=version,
          description=description,
          author=author,
          author_email=author_email,
          license=license,
          url=url,
          package_dir=package_dir,
          packages=packages,
          scripts=scripts
    )
开发者ID:amilan,项目名称:dev-maxiv-pynutaq,代码行数:35,代码来源:setup.py


示例19: main

def main():
    setup(
        name='hookbox',
        version=hookbox.__version__,
        author='Michael Carter',
        author_email='[email protected]',
        url='http://hookbox.org',
        license='MIT License',
        description='HookBox is a Comet server and message queue that tightly integrates with your existing web application via web hooks and a REST interface.',
        long_description='',
        packages= find_packages(),
        package_data = find_package_data(),
        zip_safe = False,
        install_requires = _install_requires,
        entry_points = '''    
            [console_scripts]
            hookbox = hookbox.start:main
        ''',
        
        classifiers = [
            'Development Status :: 4 - Beta',
            'Environment :: Console',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: MIT License',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Topic :: Software Development :: Libraries :: Python Modules'
        ],        
    )
开发者ID:rootart,项目名称:hookbox,代码行数:29,代码来源:setup.py


示例20: setup_package

def setup_package():
    setupinfo.set_version(version)

    setupinfo.write_version_py()

    setup(
        name=name,
        version=setupinfo.get_version(),
        description=description,
        long_description=long_description,
        url=url,
        author=author,
        author_email=author_email,
        keywords=keywords.strip(),
        license=license,
        packages=find_packages(),
        ext_modules=setupinfo.get_extensions(),
        install_requires=setupinfo.get_install_requirements(),
        tests_require=setupinfo.get_test_requirements(),
        test_suite="pyamf.tests.get_suite",
        zip_safe=False,
        extras_require=setupinfo.get_extras_require(),
        classifiers=(
            filter(None, classifiers.strip().split('\n')) +
            setupinfo.get_trove_classifiers()
        ),
        **setupinfo.extra_setup_args())
开发者ID:UnforeseenOcean,项目名称:PlayfulMesh,代码行数:27,代码来源:setup.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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