Beispiel #1
0
 def __init__(self):
     """Set up main command."""
     project = pkg_info()
     super(InfrascopeCLI, self).__init__(
         description=project["description"],
         version='0.1', # TODO: need to get version at runtime
         command_manager=CommandManager('infrascope.cli'),
     )
Beispiel #2
0

#
# Project Description
#
projectdir = path(__file__).dirname().abspath()
try:
    import infrascope
except ImportError:
    # Special bootstrap in our own project, in absence of an initialized virtualenv
    sys.path.insert(0, projectdir / "src")
    import infrascope
from cobblestones import tools

changelog = (projectdir / "debian" / "changelog").text("UTF-8")
project = tools.bunchify(infrascope.pkg_info())
project.update(
    # TODO: find ways to get at these during runtime, within "infrascope.pkg_info"
    version = re.search(r"(?<=\()[^)]+(?=\))", changelog).group(), # DRY principle
    packages = find_packages(projectdir / "src", exclude=["tests"]),
)


#
# Tasks
#

@task
@needs(["paver.misctasks.generate_setup", "setuptools.command.develop"])
def init():
    """initial project setup"""