当前位置: 首页>>代码示例>>Python>>正文


Python setuptools.find_packages方法代码示例

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


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

示例1: create_setup_file

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def create_setup_file():
    lib_version = VersionInfo("spotify_tensorflow").version_string()
    contents_for_setup_file = """
    import setuptools
    
    if __name__ == "__main__":
        setuptools.setup(
            name="spotify_tensorflow_dataflow",
            packages=setuptools.find_packages(),
            install_requires=[
                "spotify-tensorflow=={version}"
        ])
    """.format(version=lib_version)  # noqa: W293
    setup_file_path = os.path.join(tempfile.mkdtemp(), "setup.py")
    with open(setup_file_path, "w") as f:
        f.writelines(textwrap.dedent(contents_for_setup_file))
    return setup_file_path 
开发者ID:spotify,项目名称:spotify-tensorflow,代码行数:19,代码来源:utils.py

示例2: main

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def main():
    if sys.version_info < (3, 5, 3):
        raise RuntimeError("Peony requires Python 3.5.3+")

    dirname = os.path.dirname(inspect.getfile(inspect.currentframe()))

    # get metadata and keywords from peony/__init__.py
    kwargs = get_metadata(os.path.join(dirname, 'peony', '__init__.py'))

    # get requirements from requirements.txt
    kwargs.update(get_requirements(os.path.join(dirname, 'requirements.txt')))

    # get extras requirements from extras_require.txt
    extras = os.path.join(dirname, 'extras_require.txt')
    extras_require = get_requirements(extras)

    # get long description from README.md
    with open('README.rst') as stream:
        long_description = stream.read()

    setup(long_description=long_description,
          packages=find_packages(include=["peony*"]),
          extras_require=extras_require,
          python_requires='>=3.5.3',
          **kwargs) 
开发者ID:odrling,项目名称:peony-twitter,代码行数:27,代码来源:setup.py

示例3: _parse_packages

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def _parse_packages(self, value):
        """Parses `packages` option value.

        :param value:
        :rtype: list
        """
        find_directive = 'find:'

        if not value.startswith(find_directive):
            return self._parse_list(value)

        # Read function arguments from a dedicated section.
        find_kwargs = self.parse_section_packages__find(
            self.sections.get('packages.find', {}))

        from setuptools import find_packages

        return find_packages(**find_kwargs) 
开发者ID:sofia-netsurv,项目名称:python-netsurv,代码行数:20,代码来源:config.py

示例4: main

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def main():
    setuptools.setup(
        name='mobly',
        version='1.10',
        maintainer='Ang Li',
        maintainer_email='mobly-github@googlegroups.com',
        description='Automation framework for special end-to-end test cases',
        license='Apache2.0',
        url='https://github.com/google/mobly',
        download_url='https://github.com/google/mobly/tarball/1.10',
        packages=setuptools.find_packages(exclude=['tests']),
        include_package_data=False,
        scripts=['tools/sl4a_shell.py', 'tools/snippet_shell.py'],
        tests_require=[
            'mock',
            # Needed for supporting Python 2 because this release stopped supporting Python 2.
            'pytest<5.0.0',
            'pytz',
        ],
        install_requires=install_requires,
        cmdclass={'test': PyTest},
    ) 
开发者ID:google,项目名称:mobly,代码行数:24,代码来源:setup.py

示例5: main

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def main():
    setup(
        name='tffm',
        version='1.0.0a1',
        author="Mikhail Trofimov",
        author_email="mikhail.trofimov@phystech.edu",
        url='https://github.com/geffy/tffm',
        description=('TensforFlow implementation of arbitrary order '
                     'Factorization Machine'),
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Intended Audience :: Science/Research',
            'Topic :: Scientific/Engineering',
            'License :: OSI Approved :: MIT License',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3',
        ],
        license='MIT',
        install_requires=[
            'scikit-learn',
            'numpy',
            'tqdm'
        ],
        packages=find_packages()
    ) 
开发者ID:PacktPublishing,项目名称:Deep-Learning-with-TensorFlow-Second-Edition,代码行数:27,代码来源:setup.py

示例6: main

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def main():
    setup(name='fftoptionlib',
          version=__version__,
          author='ArrayStream (Yu Zheng, Ran Fan)',
          author_email='team@arraystream.com',
          url='https://github.com/arraystream/fftoptionlib',
          description='FFT-based Option Pricing Method in Python',
          long_description='FFT-based Option Pricing Method in Python',
          classifiers=[
              'Development Status :: 5 - Production/Stable',
              'Programming Language :: Python :: 3',
              'Programming Language :: Python :: 3.3',
              'Programming Language :: Python :: 3.4',
              'Programming Language :: Python :: 3.5',
              'Topic :: Scientific/Engineering :: Mathematics',
              'Intended Audience :: Financial and Insurance Industry'
          ],
          license='BSD',
          packages=find_packages(include=['fftoptionlib']),
          install_requires=['numpy', 'scipy', 'pandas', 'autograd'],
          platforms='any') 
开发者ID:arraystream,项目名称:fftoptionlib,代码行数:23,代码来源:setup.py

示例7: test_valid_setup_py

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def test_valid_setup_py(self, testdir):
        """
        Test to make sure that pytest ignores valid setup.py files when ran
        with --doctest-modules
        """
        p = testdir.makepyfile(
            setup="""
            from setuptools import setup, find_packages
            setup(name='sample',
                  version='0.0',
                  description='description',
                  packages=find_packages()
            )
        """
        )
        result = testdir.runpytest(p, "--doctest-modules")
        result.stdout.fnmatch_lines(["*collected 0 items*"]) 
开发者ID:pytest-dev,项目名称:pytest,代码行数:19,代码来源:test_doctest.py

示例8: find_packages

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def find_packages():
    modules = [
        "twisted.plugins",
    ]

    def is_package(path):
        return (
            os.path.isdir(path) and
            os.path.isfile(os.path.join(path, "__init__.py"))
        )

    for pkg in filter(is_package, os.listdir(".")):
        modules.extend([pkg, ] + [
            "{}.{}".format(pkg, subpkg)
            for subpkg in setuptools_find_packages(pkg)
        ])
    return modules 
开发者ID:apple,项目名称:ccs-twistedextensions,代码行数:19,代码来源:setup.py

示例9: convert_path

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def convert_path(pathname):
        """
        Local copy of setuptools.convert_path used by find_packages (only used
        with distutils which is missing the find_packages feature)
        """
        if os.sep == '/':
            return pathname
        if not pathname:
            return pathname
        if pathname[0] == '/':
            raise ValueError("path '%s' cannot be absolute" % pathname)
        if pathname[-1] == '/':
            raise ValueError("path '%s' cannot end with '/'" % pathname)
        paths = string.split(pathname, '/')
        while '.' in paths:
            paths.remove('.')
        if not paths:
            return os.curdir
        return os.path.join(*paths) 
开发者ID:mitodl,项目名称:pylti,代码行数:21,代码来源:setup.py

示例10: find_packages

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def find_packages(where='.', exclude=()):
        """
        Local copy of setuptools.find_packages (only used with distutils which
        is missing the find_packages feature)
        """
        out = []
        stack = [(convert_path(where), '')]
        while stack:
            where, prefix = stack.pop(0)
            for name in os.listdir(where):
                fn = os.path.join(where, name)
                isdir = os.path.isdir(fn)
                has_init = os.path.isfile(os.path.join(fn, '__init__.py'))
                if '.' not in name and isdir and has_init:
                    out.append(prefix + name)
                    stack.append((fn, prefix + name + '.'))
        for pat in list(exclude) + ['ez_setup', 'distribute_setup']:
            from fnmatch import fnmatchcase

            out = [item for item in out if not fnmatchcase(item, pat)]
        return out 
开发者ID:mitodl,项目名称:pylti,代码行数:23,代码来源:setup.py

示例11: setup_package

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def setup_package():
    # Some helper variables
    version = VERSION

    install_reqs=[],

    setup(
        name=NAME,
        version=version,
        url=URL,
        description=DESCRIPTION,
        author=AUTHOR,
        author_email=EMAIL,
        license=LICENSE,
        keywords='philips hue light rgb xy',
        packages=setuptools.find_packages(),
        install_requires=install_reqs
    ) 
开发者ID:benknight,项目名称:hue-python-rgb-converter,代码行数:20,代码来源:setup.py

示例12: get_setup_file

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def get_setup_file(name, packages=None):
  if not packages:
    packages = []
  return """
from setuptools import find_packages
from setuptools import setup
setup(
    name="{name}",
    version="0.1",
    packages=find_packages(),
    install_requires={pypi_packages}
)
""".format(name=name, pypi_packages=str(list(packages))) 
开发者ID:akzaidi,项目名称:fine-lm,代码行数:15,代码来源:cloud_mlengine.py

示例13: packages

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def packages():
    return ["pymoo"] + ["pymoo." + e for e in setuptools.find_packages(where='pymoo')] 
开发者ID:msu-coinlab,项目名称:pymoo,代码行数:4,代码来源:setup.py

示例14: main

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def main(**kwargs):

    write_version_py(VERSION, ISRELEASED, 'mdentropy/version.py')

    setup(
        name=NAME,
        version=VERSION,
        platforms=("Windows", "Linux", "Mac OS-X", "Unix",),
        classifiers=(
            'Intended Audience :: Science/Research',
            'License :: OSI Approved :: MIT License',
            'Programming Language :: Python',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3.4',
            'Programming Language :: Python :: 3.5',
            'Operating System :: Unix',
            'Operating System :: MacOS',
            'Operating System :: Microsoft :: Windows',
            'Topic :: Information Analysis',
        ),
        keywords="molecular dynamics entropy analysis",
        author="Carlos Xavier Hernández",
        author_email="cxh@stanford.edu",
        url='https://github.com/msmbuilder/%s' % NAME,
        download_url='https://github.com/msmbuilder/%s/tarball/master' % NAME,
        license='MIT',
        packages=find_packages(),
        include_package_data=True,
        package_data={
            '': ['README.md',
                 'requirements.txt'],
        },
        zip_safe=False,
        entry_points={
            'console_scripts': [
                'mdent = mdentropy.cli.main:main',
            ],
        },
        **kwargs
    ) 
开发者ID:msmbuilder,项目名称:mdentropy,代码行数:42,代码来源:setup.py

示例15: main

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import find_packages [as 别名]
def main():
    setup(
        name='py',
        description='library with cross-python path, ini-parsing, io, code, log facilities',
        long_description=open('README.rst').read(),
        use_scm_version={"write_to": "py/_version.py"},
        setup_requires=["setuptools-scm"],
        url='https://py.readthedocs.io/',
        license='MIT license',
        platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
        python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
        author='holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others',
        author_email='pytest-dev@python.org',
        classifiers=['Development Status :: 6 - Mature',
                     'Intended Audience :: Developers',
                     'License :: OSI Approved :: MIT License',
                     'Operating System :: POSIX',
                     'Operating System :: Microsoft :: Windows',
                     'Operating System :: MacOS :: MacOS X',
                     'Topic :: Software Development :: Testing',
                     'Topic :: Software Development :: Libraries',
                     'Topic :: Utilities',
                     'Programming Language :: Python',
                     'Programming Language :: Python :: 2',
                     'Programming Language :: Python :: 2.7',
                     'Programming Language :: Python :: 3',
                     'Programming Language :: Python :: 3.5',
                     'Programming Language :: Python :: 3.6',
                     'Programming Language :: Python :: 3.7',
                     'Programming Language :: Python :: Implementation :: CPython',
                     'Programming Language :: Python :: Implementation :: PyPy',
                    ],
        packages=find_packages(exclude=['tasks', 'testing']),
        include_package_data=True,
        zip_safe=False,
        package_data={
            "": ["py.typed"],
        },
    ) 
开发者ID:pytest-dev,项目名称:py,代码行数:41,代码来源:setup.py


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