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


Python setuptools.findall函数代码示例

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


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

示例1: _getDataFiles

def _getDataFiles(x):
    """
    Returns a fully populated data_files ready to be fed to setup()

    WARNING: when creating a bdist_egg we need to include files inside bin,
    doc, config & htdocs into the egg therefore we cannot fetch indico.conf
    values directly because they will not refer to the proper place. We
    include those files in the egg's root folder.
    """

    # setup expects a list like this (('foo/bar/baz', 'wiki.py'),
    #                                 ('a/b/c', 'd.jpg'))
    #
    # What we do below is transform a list like this:
    #                                (('foo', 'bar/baz/wiki.py'),
    #                                 ('a', 'b/c/d.jpg'))
    #
    # first into a dict and then into a pallatable form for setuptools.

    # This re will be used to filter out etc/*.conf files and therefore not overwritting them
    isAConfRe = re.compile('etc\/[^/]+\.conf$')

    dataFiles = _generateDataPaths((('bin',           findall('bin'), 4),
                                    ('doc', ['doc/UserGuide.pdf','doc/AdminUserGuide.pdf'], 4),
                                    ('etc', [xx for xx in findall('etc') if not isAConfRe.search(xx)], 4),
                                    #('MaKaC',              findall('indico/MaKaC'), 13),
                                    ('htdocs',        findall('indico/htdocs'), 14)))
    return dataFiles
开发者ID:lukasnellen,项目名称:indico,代码行数:28,代码来源:setup.py

示例2: subdir_findall

def subdir_findall(dir, subdir):
    """
    Find all files in a subdirectory and return paths relative to dir
    This is similar to (and uses) setuptools.findall
    However, the paths returned are in the form needed for package_data
    """
    strip_n = len(dir.split('/'))
    path = '/'.join((dir, subdir))
    return ['/'.join(s.split('/')[strip_n:]) for s in setuptools.findall(path)]
开发者ID:ewiger,项目名称:runstat,代码行数:9,代码来源:setup.py

示例3: findsome

def findsome(subdir, extensions):
    """Find files under subdir having specified extensions

    Leading directory (datalad) gets stripped
    """
    return [
        f.split(pathsep, 1)[1] for f in findall(opj('datalad', subdir))
        if splitext(f)[-1].lstrip('.') in extensions
    ]
开发者ID:datalad,项目名称:datalad,代码行数:9,代码来源:setup.py

示例4: _generateDataPaths

def _generateDataPaths(x):

    dataFilesDict = {}

    for (baseDstDir, srcDir) in x:
        for f in findall(srcDir):
            dst_dir = os.path.join(baseDstDir,
                                   os.path.relpath(os.path.dirname(f), srcDir))
            if dst_dir not in dataFilesDict:
                dataFilesDict[dst_dir] = []
            dataFilesDict[dst_dir].append(f)

    dataFiles = []
    for k, v in dataFilesDict.items():
        dataFiles.append((k, v))

    return dataFiles
开发者ID:pferreir,项目名称:indico-backup,代码行数:17,代码来源:setup.py

示例5: setup

#!/usr/bin/env python
import os
from setuptools import setup, find_packages, findall

setup(
    name = "openstack_dashboard",
    version = "1.0",
    url = 'https://launchpad.net/openstack-dashboard',
    license = 'Apache 2.0',
    description = "Django based reference implementation of a web based management interface for OpenStack.",
    packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "local"]),
    package_data = {'openstack_dashboard':
                        [s[len('openstack_dashboard/'):] for s in
                        findall('openstack_dashboard/templates') +
                        findall('openstack_dashboard/wsgi') +
                        findall('openstack_dashboard/locale') +
                        findall('openstack_dashboard/static')],
                    },
    data_files = [('/etc/openstack_dashboard/local', findall('local')), ('/var/lib/openstack_dashboard', set())],
    classifiers = [
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)
开发者ID:griddynamics,项目名称:osc-robot-openstack-dashboard,代码行数:27,代码来源:setup.py

示例6: disaster

    "./bin/get_person.py",
    "./bin/search_person.py",
    "./bin/get_character.py",
    "./bin/get_first_character.py",
    "./bin/get_company.py",
    "./bin/search_character.py",
    "./bin/search_company.py",
    "./bin/get_first_company.py",
    "./bin/get_keyword.py",
    "./bin/search_keyword.py",
    "./bin/get_top_bottom_movies.py",
]

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [("doc", [f for f in setuptools.findall("docs") if ".svn" not in f]), ("etc", ["docs/imdbpy.cfg"])]


# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature("compile the C module", standard=True, ext_modules=[cutils])

featLxml = setuptools.dist.Feature("add lxml dependency", standard=True, install_requires=["lxml"])

# XXX: it seems there's no way to specify that we need EITHER
#      SQLObject OR SQLAlchemy.
featSQLObject = setuptools.dist.Feature(
    "add SQLObject dependency", standard=True, install_requires=["SQLObject"], require_features="sql"
)
开发者ID:ibrahimcesar,项目名称:filmmaster,代码行数:31,代码来源:setup.py

示例7: setup

#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.


import gettext
import glob
import os
import subprocess
import sys

from setuptools import setup, find_packages, findall


setup(
    name="horizon-billing",
    version="0.0.2",
    license="GNU GPL v3",
    description="Django based interface for billing",
    author="Alessio Ababilov (GridDynamics Openstack Core Team, (c) Grid Dynamics)",
    author_email="[email protected]",
    url="http://www.griddynamics.com/openstack",
    packages=find_packages(exclude=["bin", "smoketests", "tests"]),
    package_data={"horizon_billing": [s[len("horizon_billing/") :] for s in findall("horizon_billing/templates")]},
    py_modules=[],
    test_suite="tests",
)
开发者ID:hjlailx,项目名称:horizon-billing,代码行数:30,代码来源:setup.py

示例8: setup


setup(
    name="steer",
    version=version.canonical_version_string(),
    url="https://github.com/x7/steer/",
    license="Apache 2.0",
    description="A Django interface for X7.",
    long_description=read("README"),
    author="Devin Carlen",
    author_email="[email protected]",
    packages=find_packages(),
    package_data={
        "steer": [
            s[len("steer/") :]
            for s in findall("steer/templates")
            + findall("steer/dashboards/engine/templates")
            + findall("steer/dashboards/syspanel/templates")
            + findall("steer/dashboards/settings/templates")
        ]
    },
    install_requires=["setuptools", "mox>=0.5.3", "django_nose"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
    ],
开发者ID:wendy-king,项目名称:x7_venv,代码行数:29,代码来源:setup.py

示例9: disaster

cutils = setuptools.Extension('imdb.parser.sql.cutils',
                                ['imdb/parser/sql/cutils.c'])

scripts = ['./bin/get_first_movie.py',
            './bin/get_movie.py', './bin/search_movie.py',
            './bin/get_first_person.py', './bin/get_person.py',
            './bin/search_person.py', './bin/get_character.py',
            './bin/get_first_character.py', './bin/get_company.py',
            './bin/search_character.py', './bin/search_company.py',
            './bin/get_first_company.py', './bin/get_keyword.py',
            './bin/search_keyword.py', './bin/get_top_bottom_movies.py']

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [('doc', setuptools.findall('docs')), ('etc', ['docs/imdbpy.cfg'])]


# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature('compile the C module', standard=True,
        ext_modules=[cutils])

featLxml = setuptools.dist.Feature('add lxml dependency', standard=True,
        install_requires=['lxml'])

# XXX: it seems there's no way to specify that we need EITHER
#      SQLObject OR SQLAlchemy.
featSQLObject = setuptools.dist.Feature('add SQLObject dependency',
开发者ID:Arthedian,项目名称:imdbpy,代码行数:30,代码来源:setup.py

示例10: not_py

        elif re.match(r'\s*-f\s+', line):
            pass
        else:
            requirements.append(line)
    return requirements


def not_py(file_path):
    return not (file_path.endswith('.py') or file_path.endswith('.pyc'))


core_packages = find_packages()
core_package_data = {}
for package in core_packages:
    package_path = package.replace('.', '/')
    core_package_data[package] = filter(not_py, findall(package_path))
setup(
    name='django-press',
    version=version,
    description='',
    long_description=open('README.rst').read(),
    author='Marcos Daniel Petry',
    author_email='[email protected]',
    url='https://github.com/petry/django-press',
    license='BSD',
    packages=core_packages,
    package_data=core_package_data,
    include_package_data=True,
    zip_safe=True,
    classifiers=[
        'Development Status :: 4 - Beta',
开发者ID:petry,项目名称:django-press,代码行数:31,代码来源:setup.py

示例11: read

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "django-openstack",
    version = "0.3",
    url = 'https://launchpad.net/django-openstack/',
    license = 'Apache 2.0',
    description = "A Django interface for OpenStack.",
    long_description = read('README'),
    author = 'Devin Carlen',
    author_email = '[email protected]',
    packages = find_packages('src'),
    package_dir = {'': 'src'},
    package_data = {'django_openstack':
                        [s[len('src/django_openstack/'):] for s in
                         findall('src/django_openstack/templates')]},
    install_requires = ['setuptools', 'boto==1.9b', 'mox>=0.5.0',
                        'nova-adminclient'],
    classifiers = [
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)

开发者ID:Mirantis,项目名称:openstack-dashboard,代码行数:29,代码来源:setup.py

示例12: disaster

cutils = setuptools.Extension('imdb.parser.sql.cutils',
                                ['imdb/parser/sql/cutils.c'])

scripts = ['./bin/get_first_movie.py',
            './bin/get_movie.py', './bin/search_movie.py',
            './bin/get_first_person.py', './bin/get_person.py',
            './bin/search_person.py', './bin/get_character.py',
            './bin/get_first_character.py', './bin/get_company.py',
            './bin/search_character.py', './bin/search_company.py',
            './bin/get_first_company.py', './bin/get_keyword.py',
            './bin/search_keyword.py', './bin/get_top_bottom_movies.py']

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [('doc', [f for f in setuptools.findall('docs')
                if '.svn' not in f]), ('etc', ['docs/imdbpy.cfg'])]


# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature('compile the C module', standard=True,
        ext_modules=[cutils])

featLxml = setuptools.dist.Feature('add lxml dependency', standard=True,
        install_requires=['lxml'])

# XXX: it seems there's no way to specify that we need EITHER
#      SQLObject OR SQLAlchemy.
开发者ID:Black0wL,项目名称:webtechproject,代码行数:30,代码来源:setup.py

示例13: test_findall

def test_findall(example_source):
    found = list(setuptools.findall(str(example_source)))
    expected = ['readme.txt', 'foo/bar.py']
    expected = [example_source.join(fn) for fn in expected]
    assert found == expected
开发者ID:pypa,项目名称:setuptools,代码行数:5,代码来源:test_setuptools.py

示例14: jsCompress

 def jsCompress(self):
     from MaKaC.consoleScripts.installBase import jsCompress
     jsCompress()
     self.dataFiles += _generateDataPaths([('htdocs/js/presentation/pack', findall('indico/htdocs/js/presentation/pack'), 35),
                                          ('htdocs/js/indico/pack', findall('indico/htdocs/js/indico/pack'), 29)])
开发者ID:lukasnellen,项目名称:indico,代码行数:5,代码来源:setup.py

示例15: wish

    keywords=['testing', 'monkey', 'exerciser'],  # arbitrary keywords
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Indicate who your project is intended for
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python',
    ],
    entry_points={
        'console_scripts': [
            'droidbot=droidbot.start:main',
        ],
    },
    package_data={
        'droidbot': [os.path.relpath(x, 'droidbot') for x in findall('droidbot/resources/')]
    },
    # androidviewclient doesnot support pip install, thus you should install it with easy_install
    install_requires=['androguard', 'networkx', 'Pillow'],
)
开发者ID:chubbymaggie,项目名称:droidbot,代码行数:30,代码来源:setup.py


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