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
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)
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
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", ])
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)
"""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'])
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=
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==>', ))
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, ],
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)
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)
""" 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
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)
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)
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