예제 #1
0
def bunchify(obj, _seen=None):
    """ Recursively convert all dicts found in `obj` to Paver bunches.

        That includes `obj` itself; if it's already a `Bunch`, the original
        object is returned. Replacement of inner dicts by `Bunch` objects
        happens in-place. Other dict-like objects are scanned, but their
        type is retained.
    """
    _seen = _seen or {}
    if id(obj) in _seen:
        return _seen[id(obj)]
    _seen[id(obj)] = obj

    if type(obj) is dict:
        _seen[id(obj)] = Bunch(obj)
        obj = _seen[id(obj)]

    try:
        items = obj.iteritems
    except AttributeError:
        pass  # obj is not a dict-like object
    else:
        for key, val in items():
            obj[key] = bunchify(val, _seen)

    return obj
예제 #2
0
def setup(**kw):
    """Updates options.setup with the keyword arguments provided,
    and installs the distutils tasks for this pavement. You can
    use paver.setuputils.setup as a direct replacement for
    the distutils.core.setup or setuptools.setup in a traditional
    setup.py."""
    install_distutils_tasks()
    setup_section = tasks.environment.options.setdefault("setup", Bunch())
    setup_section.update(kw)
예제 #3
0
def info(location=None):
    """Retrieve the info at location."""
    data = Bunch()
    sio = do_bzr_cmd(cmd_version_info, False, location=location)
    sio.seek(0)

    for line in sio.readlines():
        if not ":" in line:
            continue
        key, value = line.split(":", 1)
        key = key.lower().replace(" ", "_").replace("-", "_")
        data[key] = value.strip()
    return data
예제 #4
0
setup_meta = Bunch(
    name='Paver',
    version=VERSION,
    description='Easy build, distribution and deployment scripting',
    long_description=
    """Paver is a Python-based build/distribution/deployment scripting tool along the
lines of Make or Rake. What makes Paver unique is its integration with 
commonly used Python libraries. Common tasks that were easy before remain 
easy. More importantly, dealing with *your* applications specific needs and 
requirements is also easy.""",
    author='Kevin Dangoor',
    author_email='*****@*****.**',
    maintainer='Lukas Linhart',
    maintainer_email='*****@*****.**',
    url='http://github.com/paver/paver',
    packages=['paver', 'paver.deps'],
    tests_require=['nose', 'virtualenv', 'mock', 'cogapp'],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.5",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: Implementation :: CPython",
        "Environment :: Console",
        "Topic :: Documentation",
        "Topic :: Utilities",
        "Topic :: Software Development :: Build Tools",
    ])
예제 #5
0
from path import Path
from paver.doctools import cog, html
from paver.easy import options
from paver.options import Bunch
from paver.setuputils import setup

IMPORTS = [cog, html, setup]

options(cog=Bunch(
    basedir='.',
    pattern='README.rst',
    includedir='pyunpack',
    beginspec='#--',
    endspec='--#',
    endoutput='#-#',
))

# get info from setup.py
setup_py = ''.join(
    [x for x in Path('setup.py').lines() if 'setuptools' not in x])
exec(setup_py)
예제 #6
0
파일: release.py 프로젝트: kvbik/paver
"""Release metadata for Paver."""

from paver.options import Bunch
from paver.tasks import VERSION

setup_meta = Bunch(
    name='Paver',
    version=VERSION,
    description='Easy build, distribution and deployment scripting',
    long_description=
    """Paver is a Python-based build/distribution/deployment scripting tool along the
lines of Make or Rake. What makes Paver unique is its integration with 
commonly used Python libraries. Common tasks that were easy before remain 
easy. More importantly, dealing with *your* applications specific needs and 
requirements is also easy.""",
    author='Kevin Dangoor',
    author_email='*****@*****.**',
    maintainer='Lukas Linhart',
    maintainer_email='*****@*****.**',
    url='http://paver.github.com/',
    packages=['paver', 'paver.cog'])
예제 #7
0
CWD = os.path.abspath(os.curdir)

BASKET = os.environ.get("BASKET", "")
if BASKET:
    sys.stdout.write("Using Environment BASKET '%s'." % BASKET)

Dep = collections.namedtuple('Dep', ['name', 'repo', 'uri'])

# Paver global options we'll add to:
easy.options(

    # Defaults for environment:
    env=Bunch(
        name="conductor",
        script_root=path(os.path.abspath(os.environ.get("SCRIPTROOT", CWD))),
        dev_live_dir=path(os.environ.get("SCRIPTROOT", CWD)) / 'install',
    ),

    # Add extra packages i.e. virtualenv into the paver system for use in installing:
    minilib=Bunch(extra_files=[
        'virtual',
    ]),

    # Where bootstrap and install get information from
    development_env=Bunch(
        install_root=path(os.environ.get("INSTALL_ROOT", CWD)),
        env_dir="env",  # relative to install root.
        env_root="",  # will be configured in bootstrap() at runtime.
        src="",  # will be set
        bootstrap=
예제 #8
0
from paver.doctools import cog
from paver.easy import options
from paver.options import Bunch

EXPORTED_TASKS = [cog]

options(cog=Bunch(
    basedir='.',
    pattern='README.rst',
    includedir='pyscreenshot',
    beginspec='<==',
    endspec='==>',
    endoutput='<==end==>',
))
예제 #9
0
CLIENTDIR = path(
    os.path.abspath(os.path.join(CWD, "nozama-cloudsearch-client"))
)

MODELDIR = path(
    os.path.abspath(os.path.join(CWD, "nozama-cloudsearch-data"))
)


# Paver global options we'll add to:
easy.options(

    # Defaults for environment:
    develop=Bunch(
        basket=None,
        target_dir=None,
    ),

    sdist=Bunch(
        target_dir=None,
    ),

    bdist_egg=Bunch(
        target_dir=None,
    ),

    DEV_PKGS_IN_DEP_ORDER=[
        MODELDIR,
        SERVICEDIR,
        CLIENTDIR,
    ],
예제 #10
0
from path import Path

from paver.doctools import cog, html
from paver.easy import options
from paver.options import Bunch
from paver.setuputils import setup

IMPORTS = [cog, html, setup]

options(cog=Bunch(
    basedir=".",
    pattern="README.rst",
    includedir="pyscreenshot",
    beginspec="#--",
    endspec="--#",
    endoutput="#-#",
))

# get info from setup.py
setup_py = "".join(
    [x for x in Path("setup.py").lines() if "setuptools" not in x])
exec(setup_py)
예제 #11
0
from path import Path

from paver.doctools import cog, html
from paver.easy import options
from paver.options import Bunch
from paver.setuputils import setup

IMPORTS = [cog, html, setup]

options(cog=Bunch(
    basedir=".",
    pattern="README.rst",
    includedir="entrypoint2",
    beginspec="#--",
    endspec="--#",
    endoutput="#-#",
))

# get info from setup.py
setup_py = "".join(
    [x for x in Path("setup.py").lines() if "setuptools" not in x])
exec(setup_py)
예제 #12
0
"""
from . import util
from paver.easy import options, task, sh, needs, path
from paver.options import Bunch

__all__ = [
    'pycheckall', 'sloccount', 'findimports', 'pyflakes', 'pychecker', 'nose',
    'tox'
]

util.update(
    options.paved,
    dict(pycheck=Bunch(
        nose=Bunch(param='--with-xunit --verbose', ),
        sloccount=Bunch(param='--wide --details', ),
        findimports=Bunch(param='', ),
        pyflakes=Bunch(param='', ),
        pychecker=Bunch(param='--stdlib --only --limit 100', ),
    ), ))


@task
def sloccount():
    '''Print "Source Lines of Code" and export to file.

    Export is hudson_ plugin_ compatible: sloccount.sc

    requirements:
     - sloccount_ should be installed.
     - tee and pipes are used
예제 #13
0
from path import Path
from paver.doctools import cog, html
from paver.easy import options
from paver.options import Bunch
from paver.setuputils import setup


IMPORTS = [cog, html, setup]

options(
    cog=Bunch(
        basedir='.',
        pattern='README.rst',
        includedir='pyscreenshot',
        beginspec='#--',
        endspec='--#',
        endoutput='#-#',
    )
)


# get info from setup.py
setup_py = ''.join(
    [x for x in Path('setup.py').lines() if 'setuptools' not in x])
exec(setup_py)
예제 #14
0
from path import Path

from paver.doctools import cog, html
from paver.easy import options
from paver.options import Bunch
from paver.setuputils import setup

IMPORTS = [cog, html, setup]

options(cog=Bunch(
    basedir=".",
    pattern="README.rst",
    includedir="pyvirtualdisplay",
    beginspec="#--",
    endspec="--#",
    endoutput="#-#",
))

# get info from setup.py
setup_py = "".join(
    [x for x in Path("setup.py").lines() if "setuptools" not in x])
exec(setup_py)
예제 #15
0
    author="Sungkwang Lee",
    author_email="*****@*****.**",
    license="MIT",
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
    ],
    package_data={'pygritia': ['py.typed']},
    packages=['pygritia'],
)

options(
    minilib=Bunch(
        extra_files=['doctools'],
        versioned_name=False,
        extra_packages=[],
    ),
    sphinx=Bunch(
        docroot='sphinx',
        builddir='build',
        sourcedir='source',
        apidoc_opts=['-e'],
    ),
)

setup(**setup_params)


@task
@no_help