コード例 #1
0
ファイル: pavement.py プロジェクト: whitmo/opengeo-suite
def auto(default_conf=APPCONF):
    env = os.environ.get('VIRTUAL_ENV')
    if env is None:
        env = path("./").abspath()

    cp = ConfigParser()
    cp.read(default_conf)
    options(config=cp,
            env=env,
            conf_fp=default_conf)
コード例 #2
0
ファイル: pavement.py プロジェクト: whitmo/nunatak
def checkup_app():
    suite = path("src") / "opengeo-suite"
    options(app_resources=suite / "Resources")
    if not suite.exists():
        with pushd("src"): 
            info("Checking out opengeo suite application")
            sh("git clone [email protected]:whitmo/opengeo-suite.git")
        return 

    info("Updating opengeo suite application")
    with pushd(suite):
        sh("git pull")
コード例 #3
0
ファイル: pavement.py プロジェクト: whitmo/nunatak
def auto(default_conf=DEF_CONF):
    env = os.environ.get('VIRTUAL_ENV')
    if env is None:
        env = path("./").abspath()
    cp = ConfigParser()

    if not path(default_conf).exists():
        # write default conf
        conf = path(get_resource("starter-stack-config.cfg"))
        conf.copy(path(os.curdir) / default_conf)
    
    #@@ make an option to allow extension
    cp.read(default_conf)
    options(config=cp,
            env=env,
            conf_fp=default_conf)
コード例 #4
0
ファイル: pavement.py プロジェクト: mdunhem/duplicates-old
def print_failure_message(message):
    """Print a message indicating failure in red color to STDERR.

    :param message: the message to print
    :type message: :class:`str`
    """
    try:
        import colorama
        print(colorama.Fore.RED + message + colorama.Fore.RESET,
              file=sys.stderr)
    except ImportError:
        print(message, file=sys.stderr)


options(setup=setup_dict)

install_distutils_tasks()

## Task-related functions


def _doc_make(*make_args):
    """Run make in sphinx' docs directory.

    :return: exit code
    """
    if sys.platform == 'win32':
        # Windows
        make_cmd = ['make.bat']
    else:
コード例 #5
0
ファイル: pavement.py プロジェクト: smithav/geonode
import glob

assert sys.version_info >= (2, 6), SystemError("GeoNode Build requires python 2.6 or better")


options(
    config=Bunch(ini=path("shared/build.ini"), package_dir=path("shared/package")),
    minilib=Bunch(extra_files=["virtual", "doctools", "misctasks"]),
    sphinx=Bunch(docroot="docs", builddir="_build", sourcedir="source"),
    virtualenv=Bunch(
        packages_to_install=["http://bitbucket.org/ianb/pip/get/2cb1db7b2baf.gz#egg=pip", "jstools", "virtualenv"],
        dest_dir="./",
        install_paver=True,
        script_name="bootstrap.py",
        paver_command_line="post_bootstrap",
    ),
    deploy=Bunch(
        pavement=path("shared/package/pavement.py"),
        req_file=path("shared/package/deploy-libs.txt"),
        packages_to_install=["pip"],
        dest_dir="./",
        install_paver=True,
        paver_command_line="post_bootstrap",
    ),
    host=Bunch(bind="localhost"),
)

venv = os.environ.get("VIRTUAL_ENV")
bundle = path("shared/geonode.pybundle")
dl_cache = "--download-cache=./build"
dlname = "geonode.bundle"
コード例 #6
0
                        options, sh, task)


reqs = (open('requirements_docs.txt', 'r').read().strip().splitlines() +
        open('requirements_test.txt', 'r').read().strip().splitlines())
reqs = filter(lambda s: not s.startswith('paver'), reqs)

options(
    bootstrap=Bunch(no_site_packages=True),
    sphinx=Bunch(
        # See `sphinx-apidoc --help` for details on apidoc options
        apidoc_excludes=[],
        apidoc_moduledir='sphinxcontrib',
        apidoc_outputdir='docs/source',  # -o DESTDIR, --output-dir=DESTDIR
        apidoc_overwrite=True,  # -f, --force
        builddir='build',
        docroot='docs',
        sourcedir='source'
    ),
    virtualenv=Bunch(
        no_site_packages=True,
        packages_to_install=reqs,
    ),
)


@task
@consume_args
def bootstrap():
    """Create a virtualenv in the specified directory.
コード例 #7
0
options(
    setup=setup_dict,
    star=Bunch(sdir=path('temposeqcount/download'),
               bindir=path('temposeqcount/bin')),
    FastQC=Bunch(
        url=
        'http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.2.zip',
        downloads=path('temposeqcount/download'),
        installdir=join(sys.prefix, 'lib')),
    fastx_lib=Bunch(
        url=
        'https://github.com/agordon/libgtextutils/releases/download/0.7/libgtextutils-0.7.tar.gz',
        downloads=path('temposeqcount/download'),
        installdir=join(sys.prefix, 'lib', 'libgtextutils')),
    fastx=Bunch(
        url=
        'https://github.com/agordon/fastx_toolkit/releases/download/0.0.14/fastx_toolkit-0.0.14.tar.bz2',
        downloads=path('temposeqcount/download'),
        installdir=join(sys.prefix, 'lib', 'fastx_toolkit')),
    ngsutils=Bunch(
        url=
        'https://github.com/ngsutils/ngsutils/archive/ngsutils-0.5.7.tar.gz',
        downloads=path('temposeqcount/download'),
    ),
    auto_barcode=Bunch(
        url='https://github.com/mfcovington/auto_barcode/archive/2.1.2.tar.gz',
        downloads=path('temposeqcount/download')),
    R=Bunch(url='https://cran.r-project.org/src/base/R-3/R-3.2.3.tar.gz',
            downloads=path('temposeqcount/download'),
            installdir=join(sys.prefix, 'lib', "R-3.2.3")),
    rpy2=Bunch(
        url='https://pypi.python.org/packages/source/r/rpy2/rpy2-2.7.8.tar.gz',
        downloads=path('temposeqcount/download')),
    seqtk=Bunch(url='https://github.com/lh3/seqtk.git',
                downloads=path('temposeqcount/download')),
    environ=Bunch(installdir=path('temposeqcount/lib')),
    settings=Bunch(shell_file=path('temposeqcount/files/settings.sh')),
    samtools=Bunch(sdir=path('temposeqcount/download'),
                   bindir=path('temposeqcount/bin')),
    help2man=Bunch(
        sdir=path('temposeqcount/download'),
        url='http://ftp.gnu.org/gnu/help2man/help2man-1.43.3.tar.gz',
    ),
    libtool=Bunch(
        sdir=path('temposeqcount/download'),
        url='http://gnu.mirror.constant.com/libtool/libtool-2.4.tar.gz'),
    textinfo=Bunch(sdir=path('temposeqcount/download'),
                   url='http://ftp.gnu.org/gnu/texinfo/texinfo-6.1.tar.gz'),
    graphviz=Bunch(
        sdir=path('temposeqcount/download'),
        url=
        'https://github.com/ellson/graphviz/releases/download/Nightly/graphviz-2.41.20170103.1755.tar.gz'
    ),
    virtualenv=Bunch(packages_to_install=[], no_site_packages=True))
コード例 #8
0
ファイル: pavement.py プロジェクト: AnSavvides/celery
import sys
from paver.easy import task, sh, cmdopts, path, needs, options, Bunch
from paver import doctools  # noqa
from paver.setuputils import setup  # noqa

PYCOMPILE_CACHES = ['*.pyc', '*$py.class']

options(
    sphinx=Bunch(builddir='.build'),
)


def sphinx_builddir(options):
    return path('docs') / options.sphinx.builddir / 'html'


@task
def clean_docs(options):
    sphinx_builddir(options).rmtree()


@task
@needs('clean_docs', 'paver.doctools.html')
def html(options):
    destdir = path('Documentation')
    destdir.rmtree()
    builtdocs = sphinx_builddir(options)
    builtdocs.move(destdir)


@task
コード例 #9
0
from StringIO import StringIO
from urllib2 import urlopen
import zipfile

from paver.easy import (Bunch, call_task, cmdopts, info, options,
                        path, pushd, sh, task)

BASEDIR = os.path.abspath(os.path.dirname(__file__))

options(
    base=Bunch(
        home=path(BASEDIR),
        docs=path('%s/docs' % BASEDIR),
        instance=path('%s/instance' % BASEDIR),
        pot=path('%s/GeoHealthCheck/translations/en/LC_MESSAGES/messages.po' %
                 BASEDIR),
        static_docs=path('%s/GeoHealthCheck/static/docs' % BASEDIR),
        static_lib=path('%s/GeoHealthCheck/static/lib' % BASEDIR),
        tmp=path(tempfile.mkdtemp()),
        translations=path('%s/GeoHealthCheck/translations' % BASEDIR)
    ),
)


@task
def setup():
    """setup plugin dependencies"""

    config_file = options.base.home / 'GeoHealthCheck/config_main.py'
    config_site = options.base.instance / 'config_site.py'
コード例 #10
0
ファイル: pavement.py プロジェクト: whitmo/opengeo-suite
import pwd
import re
import shutil
import subprocess


version = "0.0"

curdir = os.path.abspath(os.curdir)

options(
    virtualenv=Bunch(script_name="build_app_env",
                     #packages_to_install=['supervisor',
                     #                     'tempita',
                     #                     'paste',
                     #                     'jstools'],
                     paver_command_line="after_bootstrap"
                     ),
               #    sphinx=Bunch(docroot="src/trunk/docsrc",
               #                 builddir=path(curdir) / "built")
    )

APPCONF = "app-conf.cfg"
_DIRS = "src", "var", "etc", "var/logs", "usr",

@task
def auto(default_conf=APPCONF):
    env = os.environ.get('VIRTUAL_ENV')
    if env is None:
        env = path("./").abspath()
コード例 #11
0
ファイル: pavement.py プロジェクト: plaes/numpy
DMG_CONTENT = paver.path.path("numpy-macosx-installer") / "content"

# Where to put the final installers, as put on sourceforge
RELEASE_DIR = "release"
INSTALLERS_DIR = os.path.join(RELEASE_DIR, "installers")

# XXX: fix this in a sane way
MPKG_PYTHON = {
    "25": "/Library/Frameworks/Python.framework/Versions/2.5/bin/python",
    "26": "/Library/Frameworks/Python.framework/Versions/2.6/bin/python",
}

options(
    sphinx=Bunch(builddir="build", sourcedir="source", docroot="doc"),
    virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT, packages_to_install=["sphinx==0.6.1"]),
    wininst=Bunch(pyver="2.5", scratch=True),
)

# Bootstrap stuff
@task
def bootstrap():
    """create virtualenv in ./install"""
    install = paver.path.path(BOOTSTRAP_DIR)
    if not install.exists():
        install.mkdir()
    call_task("paver.virtual.bootstrap")
    sh("cd %s; %s bootstrap.py" % (BOOTSTRAP_DIR, sys.executable))


@task
コード例 #12
0
options(
    sphinx=Bunch(
        docroot='.',
        builddir='build',
        sourcedir='source',
        warnerror=True,
    ),

    # Some of the files include [[[ as part of a nested list data
    # structure, so change the tags cog looks for to something
    # less likely to appear.
    cog=Bunch(
        beginspec='{{{cog',
        endspec='}}}',
        endoutput='{{{end}}}',
    ),
    pdf=Bunch(
        builder='latex',
        docroot='.',
        builddir='build',
        sourcedir='source',
        pdflatex='xelatex',
    ),
    website=Bunch(
        # What server hosts the website?
        server='pymotw.com',
        server_path='/home/douhel3shell/pymotw.com/3/',
    ),
    testsite=Bunch(
        # Where do we put the files for local testing?
        local_path='/Users/dhellmann/Sites/pymotw.com/3', ),
    sitemap_gen=Bunch(
        # Where is the config file for sitemap_gen.py?
        config='sitemap_gen_config.xml', ),
    migrate=Bunch(old_locs=[
        '../../Python2/book-git/PyMOTW/',
        '../../Python2/src/PyMOTW/',
    ], ),
    blog=Bunch(
        outdir='blog_posts',
        in_file='index.html',
        out_file='blog.html',
        no_edit=False,
        url_base='https://pymotw.com/3/',
    ),
)
コード例 #13
0
ファイル: pavement.py プロジェクト: rackerlabs/VersionHub
#!/usr/bin/env python

import sys
from os.path import dirname

import paver.doctools
from paver.easy import options
from paver.setuputils import setup, find_packages

# make sure the current directory is in the python import path
sys.path.append(dirname(__file__))

# default task options
options(root_dir=dirname(__file__))

# import our tasks
from task.tests import *
from task.virtualenv import *

#
# project dependencies
#

install_requires = [
    'cerberus',
    'coverage==3.6',
    'motor',
    'python-dateutil',
    'python3-memcached',
    'pytz',
    'pyyaml==3.10',
コード例 #14
0
import sys
from paver.easy import task, sh, cmdopts, path, needs, options, Bunch
from paver import doctools  # noqa
from paver.setuputils import setup  # noqa

PYCOMPILE_CACHES = ['*.pyc', '*$py.class']

options(
    sphinx=Bunch(builddir='.build'),
)


def sphinx_builddir(options):
    return path('docs') / options.sphinx.builddir / 'html'


@task
def clean_docs(options):
    sphinx_builddir(options).rmtree()


@task
@needs('clean_docs', 'paver.doctools.html')
def html(options):
    destdir = path('Documentation')
    destdir.rmtree()
    builtdocs = sphinx_builddir(options)
    builtdocs.move(destdir)


@task
コード例 #15
0
from paver.easy import Bunch, cmdopts, error, options, path, task

options(
    plugin=Bunch(
        name="planet_explorer",
        ext_libs=path("planet_explorer/extlibs"),
        ext_src=path("planet_explorer/ext-src"),
        source_dir=path("planet_explorer"),
        package_dir=path("."),
        tests=["test", "tests"],
        excludes=[
            "*.pyc",
            ".git",
            ".DS_Store",
            "bin",
            "pe_options.png",
            "request-result-samples",
            "thumbnails",
            "metadata.txt",
            "qgis_resources.py",
            "pe_analytics.py",
            "pe_utils.py",
        ],
        path_to_settings="Raster --> Planet Explorer --> Settings...",
        # skip certain files inadvertently found by exclude pattern globbing
        skip_exclude=[],
    ), )


@task
コード例 #16
0
                          ('software_version', VERSION), ('url', URL)])
LIB_PROPERTIES = PROPERTIES.copy()
LIB_PROPERTIES.update(
    OrderedDict([('author', 'Christian Fobel'),
                 ('author_email', '*****@*****.**'),
                 ('short_description', 'Template project '
                  'demonstrating use of Arduino base node '
                  'RPC framework.'), ('version', VERSION),
                 ('long_description', ''), ('category', 'Communication'),
                 ('architectures', 'avr')]))

options(pointer_width=32,
        rpc_module=rpc_module,
        PROPERTIES=PROPERTIES,
        LIB_PROPERTIES=LIB_PROPERTIES,
        base_classes=[
            'BaseNodeSerialHandler',
        ],
        rpc_classes=['multispeq1::Node'],
        DEFAULT_ARDUINO_BOARDS=DEFAULT_ARDUINO_BOARDS,
        setup=dict(name=package_name,
                   version=VERSION,
                   description=LIB_PROPERTIES['short_description'],
                   author='Christian Fobel',
                   author_email='*****@*****.**',
                   url=URL,
                   license='GPLv2',
                   install_requires=['base-node-rpc>=0.12.post11'],
                   include_package_data=True,
                   packages=[str(PROJECT_PREFIX)]))
コード例 #17
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)
コード例 #18
0
ファイル: paved.py プロジェクト: rtirrell/paved
# -*- coding: utf-8 -*-
"""paved -- common paver tasks.
"""
from json.encoder import JSONEncoder
from paver.easy import options, path, task, Bunch, environment, needs
import json

__cwd__ = path('.').abspath()


options(
    paved = Bunch(
        cwd = __cwd__,
        
        clean = Bunch(
            patterns = ["*.pyc", "*~", "*.pyo", "*#", ".#*", "*.lock", "*.log*", "*.orig"],
            dirs = [__cwd__]
            ),
        ),
    )

__all__ = ['clean', 'printoptions']


@task
@needs('paver.doctools.doc_clean')
def clean(options, info):
    """Clean up extra files littering the source tree.

    options.paved.clean.dirs: directories to search recursively
    options.paved.clean.patterns: patterns to search for and remove
コード例 #19
0
ファイル: pavement.py プロジェクト: Petlja/Primer_Prirucnik
from paver.easy import options, Bunch
import paver.setuputils
import pkg_resources
#pylint: disable=unused-import
from runestone import build  # build is called implicitly by the paver driver.

paver.setuputils.install_distutils_tasks()

sys.path.append(os.getcwd())

home_dir = os.getcwd()
master_url = 'http://127.0.0.1:8000'
master_app = 'runestone'
serving_dir = "./_build"
dest = "../../static"


options(
    sphinx = Bunch(docroot=".",),

    build = Bunch(
        builddir="./_build",
        sourcedir="_sources",
        outdir="./_build",
        confdir=".",
        project_name = "Primer_prirucnik",

        # leave template_args empty, use html_context from conf.py
        template_args= {}
    )
)
コード例 #20
0
ファイル: pavement.py プロジェクト: hrbonz/celery
import sys
from paver.easy import task, sh, cmdopts, path, needs, options, Bunch
from paver import doctools  # noqa
from paver.setuputils import setup  # noqa

PYCOMPILE_CACHES = ["*.pyc", "*$py.class"]

options(sphinx=Bunch(builddir=".build"))


def sphinx_builddir(options):
    return path("docs") / options.sphinx.builddir / "html"


@task
def clean_docs(options):
    sphinx_builddir(options).rmtree()


@task
@needs("clean_docs", "paver.doctools.html")
def html(options):
    destdir = path("Documentation")
    destdir.rmtree()
    builtdocs = sphinx_builddir(options)
    builtdocs.move(destdir)


@task
@needs("paver.doctools.html")
def qhtml(options):
コード例 #21
0
    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,
    ],
)


#
@easy.task
def runserver(options):
コード例 #22
0
dest = "/var/www/html/pdcbook/"

options(
    sphinx=Bunch(docroot=".", ),
    build=Bunch(
        builddir=serving_dir,
        sourcedir="_sources",
        outdir=serving_dir,
        confdir=".",
        template_args={
            'login_required': 'false',
            'loglevel': 0,
            'course_title': project_name,
            'python3': 'true',
            'dburl': '',
            'default_ac_lang': 'cpp',
            'jobe_server': 'https://jobe.calvin.edu',
            'proxy_uri_runs': '/jobe/index.php/restapi/runs/',
            'proxy_uri_files': '/jobe/index.php/restapi/files/',
            'downloads_enabled': 'false',
            'enable_chatcodes': 'false',
            'allow_pairs': 'false',
            'dynamic_pages': False,
            'use_services': 'false',
            'basecourse': project_name,
            'course_id': project_name,
            # These are used for non-dynamic books.
            'appname': 'runestone',
            'course_url': master_url,
        }))

# if we are on runestone-deploy then use the proxy server not canterbury
コード例 #23
0
    :type message: :class:`str`
    """
    try:
        import colorama
        print(colorama.Fore.RED + message + colorama.Fore.RESET,
              file=sys.stderr)
    except ImportError:
        print(message, file=sys.stderr)


options(
    # see here for more options:
    # <http://packages.python.org/distribute/setuptools.html>
    setup=setup_dict,
    sphinx=Bunch(
        builddir='build',
        sourcedir='source',
    ),
    minilib=Bunch(
        extra_files=['doctools'],
    ),
)

install_distutils_tasks()

## Task-related functions


def _lint():
    """Run lint and return an exit code."""
    # Flake8 doesn't have an easy way to run checks using a Python function, so
    # just fork off another process to do it.
コード例 #24
0
from StringIO import StringIO
from urllib2 import urlopen
import zipfile

from paver.easy import (Bunch, call_task, cmdopts, info, needs, options,
                        path, pushd, sh, task)

BASEDIR = os.path.abspath(os.path.dirname(__file__))

options(
    base=Bunch(
        home=path(BASEDIR),
        docs=path('%s/docs' % BASEDIR),
        instance=path('%s/instance' % BASEDIR),
        pot=path('%s/GeoHealthCheck/translations/en/LC_MESSAGES/messages.po' %
                 BASEDIR),
        static_docs=path('%s/GeoHealthCheck/static/docs' % BASEDIR),
        static_lib=path('%s/GeoHealthCheck/static/lib' % BASEDIR),
        tmp=path(tempfile.mkdtemp()),
        translations=path('%s/GeoHealthCheck/translations' % BASEDIR)
    ),
)


@task
def setup():
    """setup plugin dependencies"""

    config_file = options.base.home / 'GeoHealthCheck/config_main.py'
    config_site = options.base.instance / 'config_site.py'
                 ('short_description',
                  '{{cookiecutter.project_short_description}}'),
                 ('version', VERSION), ('long_description', ''),
                 ('category', '{{cookiecutter.arduino_category}}'),
                 ('architectures', '{{cookiecutter.arduino_architectures}}')]))

options(rpc_module=rpc_module,
        PROPERTIES=PROPERTIES,
        LIB_PROPERTIES=LIB_PROPERTIES,
        base_classes=[
            'BaseNodeSerialHandler', 'BaseNodeEeprom', 'BaseNodeI2c',
            'BaseNodeI2cHandler<Handler>',
            'BaseNodeConfig<ConfigMessage, Address>',
            'BaseNodeState<StateMessage>'
        ],
        rpc_classes=['{{cookiecutter.project_module_name}}::Node'],
        setup=dict(name=PROPERTIES['name'],
                   version=VERSION,
                   description='{{cookiecutter.project_short_description}}',
                   author='{{cookiecutter.full_name}}',
                   author_email='{{cookiecutter.email}}',
                   url=PROPERTIES['url'],
                   license='BSD',
                   install_requires=['wheeler.base_node_rpc>=0.23'],
                   include_package_data=True,
                   packages=['{{cookiecutter.project_module_name}}']))


@task
@needs('base_node_rpc.pavement_base.generate_all_code')
def build_firmware():
    sh('pio run')
コード例 #26
0
ファイル: pavement.py プロジェクト: chiossif/geonode
options(
    config=Bunch(
        ini=path('shared/build.ini'),
        package_dir = path('shared/package')
    ),
    minilib=Bunch(extra_files=['virtual', 'doctools', 'misctasks']),
    sphinx=Bunch(
        docroot='docs',
        builddir="_build",
        sourcedir="source"
    ),
    virtualenv=Bunch(
        packages_to_install=[
            'pip',
            'jstools',
            'virtualenv'
        ],
        dest_dir='./',
        install_paver=True,
        script_name='bootstrap.py',
        paver_command_line='post_bootstrap'
    ),
    deploy=Bunch(
        req_file=path('shared/package/requirements.txt'),
        packages_to_install=['pip'],
        dest_dir='./',
    ),
    host=Bunch(
    	bind='localhost'
    )
)
コード例 #27
0
    [paste.app_factory]
    main=jstools.proxy:make_proxy [proxy]
    """,
    extras_require=dict(yuicompressor=["Paver"],
                        sphinx=['Jinja2'],
                        proxy=['WSGIProxy']),
    
    test_suite='nose.collector',
    tests_require=['nose']
    )

options(virtualenv=Bunch(script_name="install_jstools",
                         packages_to_install=['nose', 'setuptools_git'], # packages for testing and packaging
                         paver_command_line="install_jstools"
                         ),
        yui_compressor=Bunch(compressor_version = "2.4.2",
                             zip_name = lambda: "yuicompressor-%s.zip" % options.compressor_version,
                             url = lambda: "http://www.julienlecomte.net/yuicompressor/%s" % \
                             options.zip_name,
                             )
        )

@task
@needs(['get_yuicomp', 'setuptools.command.develop'])
def install_jstools():
    info("All Done")

DEFAULT_CFG = ".jstools.cfg"

@task
def create_jstools_userconfig():
    current_dir = path.getcwd()
コード例 #28
0
ファイル: pavement.py プロジェクト: williecui/scipy
# Hardcoded build/install dirs, virtualenv options, etc.
#-------------------------------------------------------

# Default python version
PYVER = "2.7"

# Paver options object, holds all default dirs
options(
    bootstrap=Bunch(bootstrap_dir="bootstrap"),
    virtualenv=Bunch(packages_to_install=["sphinx==1.1.3", "numpydoc"],
                     no_site_packages=False),
    sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'),
    superpack=Bunch(builddir="build-superpack",
                    bindir=os.path.join("build-superpack", "binaries")),
    installers=Bunch(releasedir="release",
                     installersdir=os.path.join("release", "installers")),
    doc=Bunch(doc_root="doc",
              sdir=os.path.join("doc", "source"),
              bdir=os.path.join("doc", "build"),
              bdir_latex=os.path.join("doc", "build", "latex"),
              destdir_pdf=os.path.join("build_doc", "pdf")),
    html=Bunch(builddir=os.path.join("build", "html")),
    dmg=Bunch(python_version=PYVER),
    bdist_wininst_simple=Bunch(python_version=PYVER),
)

# Where we can find BLAS/LAPACK/ATLAS on Windows/Wine
SITECFG = {
    "sse3": {
        'BLAS': 'None',
        'LAPACK': 'None',
        'ATLAS': r'C:\local\lib\atlas\sse3'
コード例 #29
0
ファイル: pavement.py プロジェクト: ragnvald/GeoHealthCheck
# =================================================================

import os
import shutil
from StringIO import StringIO
from urllib2 import urlopen
import zipfile

from paver.easy import (Bunch, info, options, path, sh, task)

BASEDIR = os.path.abspath(os.path.dirname(__file__))

options(
    base=Bunch(
        home=path(BASEDIR),
        instance=path('%s/instance' % BASEDIR),
        static_lib=path('%s/GeoHealthCheck/static/lib' % BASEDIR),
    ),
)


@task
def setup():
    """setup plugin dependencies"""

    config_file = options.base.home / 'GeoHealthCheck/config.py'

    # setup dirs
    if not os.path.exists(options.base.static_lib):
        options.base.static_lib.mkdir()
    if not os.path.exists(options.base.instance):
コード例 #30
0
import glob

assert sys.version_info >= (2,6), \
       SystemError("GeoNode Build requires python 2.6 or better")

options(
    config=Bunch(ini=path('shared/build.ini'),
                 package_dir=path('shared/package')),
    minilib=Bunch(extra_files=['virtual', 'doctools', 'misctasks']),
    sphinx=Bunch(docroot='docs', builddir="_build", sourcedir="source"),
    virtualenv=Bunch(packages_to_install=[
        'http://bitbucket.org/ianb/pip/get/2cb1db7b2baf.gz#egg=pip', 'jstools',
        'virtualenv'
    ],
                     dest_dir='./',
                     install_paver=True,
                     script_name='bootstrap.py',
                     paver_command_line='post_bootstrap'),
    deploy=Bunch(
        #        pavement=path('shared/package/pavement.py'),
        req_file=path('shared/package/deploy-libs.txt'),
        packages_to_install=['pip'],
        dest_dir='./',
        #        install_paver=True,
        #        paver_command_line='post_bootstrap'
    ),
    host=Bunch(bind='localhost'))

venv = os.environ.get('VIRTUAL_ENV')
bundle = path('shared/geonode.pybundle')
dl_cache = "--download-cache=./build"
dlname = 'geonode.bundle'
コード例 #31
0
)


# 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,
        CLIENTDIR,
        ADMINCTLDIR,
        SERVICEDIR,
    ],
)


#
@easy.task
コード例 #32
0
ファイル: pavement.py プロジェクト: koudi/Cat-Interop
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# =================================================================

import os
import shutil
from urllib.request import urlopen

from paver.easy import Bunch, cmdopts, options, path, task

options(app=Bunch(
    home=path('app'),
    voc=
    'https://raw.githubusercontent.com/OSGeo/Cat-Interop/{}/LinkPropertyLookupTable.csv',  # noqa
    build=path('app/build'),
    version=open('VERSION.txt').read().strip()))


@task
def setup():
    """setup install"""

    if not os.path.exists(options.app.build):
        options.app.build.mkdir()
    if not os.path.exists(options.app.build / 'LinkPropertyLookupTable.csv'):
        if options.app.version.endswith('-dev'):  # master
            url = options.app.voc.format('master')
        else:
            url = options.app.voc.format(options.app.version)
コード例 #33
0
ファイル: pavement.py プロジェクト: Cloudxtreme/pyscreenshot
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==>',
))
コード例 #34
0
ファイル: pavement.py プロジェクト: ponty/EasyProcess
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='easyprocess',
        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)
コード例 #35
0
ファイル: pavement.py プロジェクト: georgiee/lip-sync-lpc
BOOTSTRAP_DIR = "bootstrap"
BOOTSTRAP_PYEXEC = "%s/bin/python" % BOOTSTRAP_DIR
BOOTSTRAP_SCRIPT = "%s/bootstrap.py" % BOOTSTRAP_DIR

#setup(
#    name=common.DISTNAME,
#    namespace_packages=['scikits'],
#    packages=setuptools.find_packages(),
#    install_requires=common.INSTALL_REQUIRE,
#    version=common.VERSION,
#    include_package_data=True,
#)

options(
        sphinx=Bunch(builddir="build", sourcedir="src"),
        virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT,
            packages_to_install=["sphinx==0.6.1", "numpydoc"])
)

# Bootstrap stuff
@task
def bootstrap():
    """create virtualenv in ./install"""
    install = paver.path.path(BOOTSTRAP_DIR)
    if not install.exists():
        install.mkdir()
    call_task('paver.virtual.bootstrap')
    sh('cd %s; %s bootstrap.py' % (BOOTSTRAP_DIR, sys.executable))

def macosx_version():
    st = subprocess.Popen(["sw_vers"], stdout=subprocess.PIPE)
コード例 #36
0
ファイル: pavement.py プロジェクト: Geoneer/QGIS
BASEDIR = os.path.abspath(os.path.dirname(__file__))
USERDIR = os.path.expanduser('~')

with open('metadata.txt') as mf:
    cp = ConfigParser()
    cp.readfp(mf)
    VERSION = cp.get('general', 'version')

options(
    base=Bunch(
        home=BASEDIR,
        plugin=path(BASEDIR),
        ui=path(BASEDIR) / 'plugin' / PLUGIN_NAME / 'ui',
        install=path('%s/.qgis2/python/plugins/MetaSearch' % USERDIR),
        ext_libs=path('plugin/MetaSearch/ext-libs'),
        tmp=path(path('%s/MetaSearch-dist' % USERDIR)),
        version=VERSION
    ),
    upload=Bunch(
        host='plugins.qgis.org',
        port=80,
        endpoint='plugins/RPC2/'
    )
)


@task
def clean():
    """clean environment"""

    if os.path.exists(options.base.install):
        if os.path.islink(options.base.install):
コード例 #37
0
ファイル: pavement.py プロジェクト: mrywhh/lip-sync-lpc
# Virtualenv bootstrap stuff
BOOTSTRAP_DIR = "bootstrap"
BOOTSTRAP_PYEXEC = "%s/bin/python" % BOOTSTRAP_DIR
BOOTSTRAP_SCRIPT = "%s/bootstrap.py" % BOOTSTRAP_DIR

#setup(
#    name=common.DISTNAME,
#    namespace_packages=['scikits'],
#    packages=setuptools.find_packages(),
#    install_requires=common.INSTALL_REQUIRE,
#    version=common.VERSION,
#    include_package_data=True,
#)

options(sphinx=Bunch(builddir="build", sourcedir="src"),
        virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT,
                         packages_to_install=["sphinx==0.6.1", "numpydoc"]))


# Bootstrap stuff
@task
def bootstrap():
    """create virtualenv in ./install"""
    install = paver.path.path(BOOTSTRAP_DIR)
    if not install.exists():
        install.mkdir()
    call_task('paver.virtual.bootstrap')
    sh('cd %s; %s bootstrap.py' % (BOOTSTRAP_DIR, sys.executable))


def macosx_version():
コード例 #38
0
ファイル: pavement.py プロジェクト: ant1441/planner
from os.path import exists

from paver.easy import options, task, needs, sh, Bunch
from paver.runtime import BuildFailure
from paver.setuputils import install_distutils_tasks
from paver.virtual import virtualenv

install_distutils_tasks()

options(setup=dict(name='Planner',
                   version='0.0.0',
                   packages=['planner'],
                   include_package_data=True,
                   author="James Salt",
                   author_email="*****@*****.**",
                   license="MIT"),
        virtualenv=Bunch(packages_to_install=[
            'SQLAlchemy', 'Flask', 'wtforms', 'virtualenv', 'flake8',
            'ipython', 'coverage'
        ],
                         script_name='bootstrap.py',
                         dest_dir='venv'))


@task
@needs(['paver.setuputils.develop', 'db'])
@virtualenv(dir='venv')
def dbrepl():
    """Open ipython with session to live db
    """
    sh('ipython -i scripts/dbrepl.py')
コード例 #39
0
ファイル: paved.py プロジェクト: ponty/paved
"""
from json.encoder import JSONEncoder
from paver.easy import options, path, task, Bunch, environment, needs
import json

__cwd__ = path('.').abspath()


options(
    paved = Bunch(
        cwd = __cwd__,

        clean = Bunch(
            patterns = ["*.pyc", "*~", "*.pyo", "*#", ".#*", "*.lock", "*.log*", "*.orig"],
            dirpatterns = ['__pycache__', # python3 .pyc files
                           '*.egg-info'
                           ],
            dirs = [__cwd__],
            rmdirs = [
                           '.tox', # default tox build directory
                      ],
            ),
        ),
    )

__all__ = ['clean', 'printoptions']


@task
@needs('paver.doctools.doc_clean')
def clean(options, info):
    """Clean up extra files littering the source tree.
コード例 #40
0
ファイル: pavement.py プロジェクト: shimon/geonode
options(
    config=Bunch(
        ini=path('shared/build.ini'),
        package_dir = path('shared/package')
    ),
    minilib=Bunch(extra_files=['virtual', 'doctools', 'misctasks']),
    sphinx=Bunch(
        docroot='docs',
        builddir="_build",
        sourcedir="source"
    ),
    virtualenv=Bunch(
        packages_to_install=[
            'http://bitbucket.org/ianb/pip/get/2cb1db7b2baf.gz#egg=pip',
            'urlgrabber',
            'jstools',
            'virtualenv'
        ],
        dest_dir='./',
        install_paver=True,
        script_name='bootstrap.py',
        paver_command_line='post_bootstrap'
    ),
    deploy=Bunch(
        pavement=path('shared/package/pavement.py'),
        req_file=path('shared/package/deploy-libs.txt'),
        packages_to_install=['pip'],
        dest_dir='./',
        install_paver=True,
        paver_command_line='post_bootstrap'      
    ),
    host=Bunch(
    	bind='localhost'
    )
)
コード例 #41
0
ファイル: pavement.py プロジェクト: pombredanne/pp-pkglib
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=
        "bootstrap.py",  # will be configured in bootstrap() at runtime.
    ),
    DEV_PKGS_IN_DEP_ORDER=[
        Dep('pp-templates', 'hg',
            'ssh://[email protected]/python_pro/pp-templates'),
        Dep('pp-bookingsys-backend', 'hg',
            'ssh://[email protected]/python_pro/pp-bookingsys-backend'),
        Dep('pp-bookingsys-frontend', 'hg',
            'ssh://[email protected]/python_pro/pp-bookingsys-frontend'),
        Dep('pp-bookingsys-restclient', 'hg',
            'ssh://[email protected]/python_pro/pp-bookingsys-restclient'),
    ],
)
コード例 #42
0
ファイル: pavement.py プロジェクト: shin1023/talkbox
import paver.doctools
from paver.easy import Bunch, options, task, needs, dry, sh
from paver.setuputils import setup

import common

setup(
    name=common.DISTNAME,
    namespace_packages=['scikits'],
    packages=setuptools.find_packages(),
    install_requires=common.INSTALL_REQUIRE,
    version=common.VERSION,
    include_package_data=True,
)

options(sphinx=Bunch(builddir="build", sourcedir="src"),
        virtualenv=Bunch(script_name="install/bootstrap.py"))


def macosx_version():
    st = subprocess.Popen(["sw_vers"], stdout=subprocess.PIPE)
    out = st.stdout.readlines()
    import re
    ver = re.compile("ProductVersion:\s+([0-9]+)\.([0-9]+)\.([0-9]+)")
    for i in out:
        m = ver.match(i)
        if m:
            return m.groups()


def mpkg_name():
    maj, min = macosx_version()[:2]
コード例 #43
0
ファイル: pavement.py プロジェクト: pythonpro-dev/pp-pkglib
# 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="bootstrap.py", # will be configured in bootstrap() at runtime.
    ),

    DEV_PKGS_IN_DEP_ORDER=[
        Dep('pp-templates', 'hg', 'ssh://[email protected]/python_pro/pp-templates'),
        Dep('pp-bookingsys-backend', 'hg', 'ssh://[email protected]/python_pro/pp-bookingsys-backend'),
        Dep('pp-bookingsys-frontend', 'hg', 'ssh://[email protected]/python_pro/pp-bookingsys-frontend'),
        Dep('pp-bookingsys-restclient', 'hg', 'ssh://[email protected]/python_pro/pp-bookingsys-restclient'),
    ],
)
コード例 #44
0
ファイル: pavement.py プロジェクト: y-martinez/PyZombis
options(
    sphinx=Bunch(docroot=".", ),
    build=Bunch(
        builddir=serving_dir,
        sourcedir="_sources",
        outdir=serving_dir,
        confdir=".",
        project_name="PyZombisDev",
        template_args={
            "login_required": "false",
            "loglevel": 10,
            "course_title": project_name,
            "python3": "true",
            "dburl": "postgresql://*****:*****@localhost/runestone",
            "default_ac_lang": "python",
            "downloads_enabled": "false",
            "enable_chatcodes": "false",
            "allow_pairs": "false",
            "use_services": "true",
            "basecourse": project_name,
            "course_id": project_name,
            "jobe_server": "http://jobe2.cosc.canterbury.ac.nz",
            "proxy_uri_runs": "/jobe/index.php/restapi/runs/",
            "proxy_uri_files": "/jobe/index.php/restapi/files/",
            "appname": master_app,
            "course_url": master_url,
        },
    ),
)
コード例 #45
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)
コード例 #46
0
ファイル: pavement.py プロジェクト: arthornsby/numpy
#-------------------------------------------------------
DEFAULT_PYTHON = "2.6"

# Where to put the final installers, as put on sourceforge
SUPERPACK_BUILD = 'build-superpack'
SUPERPACK_BINDIR = os.path.join(SUPERPACK_BUILD, 'binaries')

options(bootstrap=Bunch(bootstrap_dir="bootstrap"),
        virtualenv=Bunch(packages_to_install=["sphinx==1.1.3", "numpydoc"],
                         no_site_packages=False),
        sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'),
        superpack=Bunch(builddir="build-superpack"),
        installers=Bunch(releasedir="release",
                         installersdir=os.path.join("release", "installers")),
        doc=Bunch(doc_root="doc",
            sdir=os.path.join("doc", "source"),
            bdir=os.path.join("doc", "build"),
            bdir_latex=os.path.join("doc", "build", "latex"),
            destdir_pdf=os.path.join("build_doc", "pdf")
        ),
        html=Bunch(builddir=os.path.join("build", "html")),
        dmg=Bunch(python_version=DEFAULT_PYTHON),
        bdist_wininst_simple=Bunch(python_version=DEFAULT_PYTHON),
)

MPKG_PYTHON = {
        "2.5": ["/Library/Frameworks/Python.framework/Versions/2.5/bin/python"],
        "2.6": ["/Library/Frameworks/Python.framework/Versions/2.6/bin/python"],
        "2.7": ["/Library/Frameworks/Python.framework/Versions/2.7/bin/python"],
        "3.1": ["/Library/Frameworks/Python.framework/Versions/3.1/bin/python3"],
        "3.2": ["/Library/Frameworks/Python.framework/Versions/3.2/bin/python3"],
コード例 #47
0
ファイル: pavement.py プロジェクト: ericyao2013/GIS-QGIS
PLUGIN_NAME = 'MetaSearch'
BASEDIR = os.path.abspath(os.path.dirname(__file__))
USERDIR = os.path.expanduser('~')

with open('metadata.txt') as mf:
    cp = ConfigParser()
    cp.readfp(mf)
    VERSION = cp.get('general', 'version')

options(base=Bunch(home=BASEDIR,
                   plugin=path(BASEDIR),
                   ui=path(BASEDIR) / 'plugin' / PLUGIN_NAME / 'ui',
                   install=path('%s/.qgis3/python/plugins/MetaSearch' %
                                USERDIR),
                   ext_libs=path('plugin/MetaSearch/ext-libs'),
                   tmp=path(path('%s/MetaSearch-dist' % USERDIR)),
                   version=VERSION),
        upload=Bunch(host='plugins.qgis.org',
                     port=80,
                     endpoint='plugins/RPC2/'))


@task
def clean():
    """clean environment"""

    if os.path.exists(options.base.install):
        if os.path.islink(options.base.install):
            os.unlink(options.base.install)
        else:
コード例 #48
0
ファイル: pavement.py プロジェクト: the-kid89/pyunpack
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)
コード例 #49
0
ファイル: pavement.py プロジェクト: yongshengma/pyrakoon
options(
    setup=Bunch(
        name='pyrakoon',
        version=pyrakoon.__version__,
        author=pyrakoon.__author__,
        author_email='*****@*****.**',
        description='Python Arakoon client',
        license=pyrakoon.__license__,
        url='http://www.arakoon.org',

        platforms=('Any', ),

        packages=[
            'pyrakoon',
            'pyrakoon.client',
            'pyrakoon.protocol',
        ],

        test_suite = 'nose.collector',
    ),

    sphinx=Bunch(
        docroot='doc',
        builddir='_build',
    ),

    minilib=Bunch(
        extra_files=['doctools', ],
    ),
)
コード例 #50
0
import os
import sys
import time
import subprocess

# Import parameters from the setup file.
sys.path.append('.')
from setup import (setup_dict, get_project_files, print_success_message,
                   print_failure_message, _lint, _test, _test_all,
                   CODE_DIRECTORY, DOCS_DIRECTORY, TESTS_DIRECTORY,
                   PYTEST_FLAGS)

from paver.easy import options, task, needs, consume_args
from paver.setuputils import install_distutils_tasks

options(setup=setup_dict)

install_distutils_tasks()

## Miscellaneous helper functions


def print_passed():
    # generated on http://patorjk.com/software/taag/#p=display&f=Small&t=PASSED
    print_success_message(r'''  ___  _   ___ ___ ___ ___
 | _ \/_\ / __/ __| __|   \
 |  _/ _ \\__ \__ \ _|| |) |
 |_|/_/ \_\___/___/___|___/
''')

コード例 #51
0
name = PROJECT_PREFIX.replace('_', '-')
package_name = 'wheeler.' + name
rpc_module = import_module(PROJECT_PREFIX)
VERSION = version.getVersion()
URL='http://github.com/wheeler-microfluidics/%s.git' % name
PROPERTIES = OrderedDict([('name', PROJECT_PREFIX),
                          ('manufacturer', 'Wheeler Lab'),
                          ('software_version', VERSION),
                          ('url', URL)])

options(
    rpc_module=rpc_module,
    PROPERTIES=PROPERTIES,
    base_classes=['BaseNodeSerialHandler',
                  'BaseNodeEeprom',
                  'BaseNodeI2c',
                  'BaseNodeI2cHandler<Handler>',
                  'BaseNodeConfig<ConfigMessage, Address>'],
    rpc_classes=['rpc_stream::Node'],
    DEFAULT_ARDUINO_BOARDS=DEFAULT_ARDUINO_BOARDS,
    setup=dict(name='wheeler.' + PROJECT_PREFIX.replace('_', '-'),
               version=VERSION,
               description='Arduino RPC node packaged as Python package.',
               author='Christian Fobel',
               author_email='*****@*****.**',
               url=URL,
               license='GPLv2',
               install_requires=['wheeler.base_node_rpc>=0.11.post6'],
               include_package_data=True,
               packages=[str(PROJECT_PREFIX)]))
コード例 #52
0
# Start/end of the log (from git)
LOG_START = 'svn/tags/0.7.0'
LOG_END = 'master'

# Virtualenv bootstrap stuff
BOOTSTRAP_DIR = "bootstrap"
BOOTSTRAP_PYEXEC = "%s/bin/python" % BOOTSTRAP_DIR
BOOTSTRAP_SCRIPT = "%s/bootstrap.py" % BOOTSTRAP_DIR

# Where to put the final installers, as put on sourceforge
RELEASE_DIR = 'release'
INSTALLERS_DIR = os.path.join(RELEASE_DIR, 'installers')

options(sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'),
        virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT,
                         packages_to_install=["sphinx==0.6.1"]),
        wininst=Bunch(pyver="2.5", scratch=True))


def parse_numpy_version(pyexec):
    cmd = [pyexec, "-c", '"import numpy; print numpy.version.version"']

    # Execute in shell because launching python from python does not work
    # (hangs)
    p = subprocess.Popen(" ".join(cmd), stdout=subprocess.PIPE, shell=True)
    out = p.communicate()[0]
    if p.returncode:
        raise RuntimeError("Command %s failed" % " ".join(cmd))

    a = re.compile("^([0-9]+)\.([0-9]+)\.([0-9]+)")
    if a:
コード例 #53
0
#!/usr/bin/env python

import os
import shutil
import sys

from paver.easy import task, needs, Bunch, options, call_task, sh, cmdopts

# default options
options(
    root_dir=".",
    bootstrap=Bunch(bootstrap_dir="."),
    virtualenv=Bunch()
)


@task
@cmdopts([('root_dir=', 'd', 'location of virtualenv to destroy')])
def destroy_virtualenv(options):
    """ destroy virtual environment """

    for d in ['build', 'dist', 'bin', 'include', 'lib',
              'vcenter_api.egg-info']:
        directory = os.path.join(options.root_dir, d)
        if os.path.exists(directory):
            shutil.rmtree(directory)

    for f in ['bootstrap.py', '.Python']:
        directory = os.path.join(options.root_dir, f)
        if os.path.exists(directory):
            os.remove(f)
コード例 #54
0
options(
    sphinx=Bunch(docroot='.', ),
    build=Bunch(
        builddir=serving_dir,
        sourcedir='_sources',
        outdir=serving_dir,
        confdir='.',
        template_args={
            'login_required': 'false',
            'loglevel': 10,
            'course_title': project_name,
            'python3': 'true',
            'dburl': '',
            'default_ac_lang': 'python',
            'jobe_server': 'http://jobe2.cosc.canterbury.ac.nz',
            'proxy_uri_runs': '/jobe/index.php/restapi/runs/',
            'proxy_uri_files': '/jobe/index.php/restapi/files/',
            'downloads_enabled': 'false',
            'enable_chatcodes': 'false',
            'allow_pairs': 'false',
            'dynamic_pages': True,
            'use_services': 'true',
            'basecourse': project_name,
            # If ``dynamic_pages`` is 'True', then the following values are
            # ignored, since they're provided by the server.
            'course_id': project_name,
            'appname': 'runestone',
            'course_url': master_url,
        }))
コード例 #55
0
import tarfile
import urllib
from urllib import urlretrieve
import glob

assert sys.version_info >= (2,6),\
SystemError("GeoNode Build requires python 2.6 or better")

options(config=Bunch(ini=path('shared/build.ini'),
                     package_dir=path('shared/package')),
        minilib=Bunch(extra_files=['virtual', 'doctools', 'misctasks']),
        sphinx=Bunch(docroot='docs', builddir="_build", sourcedir="source"),
        virtualenv=Bunch(packages_to_install=['pip', 'jstools', 'virtualenv'],
                         dest_dir='./',
                         install_paver=True,
                         script_name='bootstrap.py',
                         paver_command_line='post_bootstrap'),
        deploy=Bunch(
            req_file=path('shared/package/requirements.txt'),
            packages_to_install=['pip'],
            dest_dir='./',
        ),
        host=Bunch(bind='localhost'))

venv = os.environ.get('VIRTUAL_ENV')
bundle = path('shared/geonode.pybundle')
dl_cache = "--download-cache=./build"
dlname = 'geonode.bundle'
gs_data = "gs-data"
geoserver_target = path('src/geoserver-geonode-ext/target/geoserver.war')
geonetwork_target = path('webapps/geonetwork.war')
コード例 #56
0
options(
    setup=setup_dict,
    star=Bunch(sdir=path('puticr/download'), bindir=path('puticr/bin')),
    FastQC=Bunch(
        url=
        'http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.2.zip',
        downloads=path('puticr/download'),
        installdir=join(sys.prefix, 'lib')),
    cgmaptools=Bunch(
        url='https://github.com/guoweilong/cgmaptools/archive/v0.1.2.tar.gz',
        downloads=path('puticr/download'),
        installdir=join(sys.prefix, 'download', 'cgmaptools-0.1.2',
                        'cgmaptools')),
    trimg=Bunch(
        url='https://github.com/FelixKrueger/TrimGalore/archive/0.5.0.tar.gz',
        downloads=path('puticr/download')),
    settings=Bunch(shell_file=path('puticr/files/settings.sh'),
                   binDir=path("puticr/bin")),
    bsseeker2=Bunch(
        url=
        "https://github.com/BSSeeker/BSseeker2/archive/BSseeker2-v2.1.8.tar.gz",
        downloads=path('puticr/download'),
        binDir=path("puticr/bin")),
    bedops=Bunch(
        url=
        "https://github.com/bedops/bedops/releases/download/v2.4.35/bedops_linux_x86_64-v2.4.35.tar.bz2",
        downloads=path('puticr/download'),
        binDir=path("puticr/bin"),
        installdir=join(sys.prefix, 'download', 'bedops24')),
    samtools=Bunch(sdir=path('puticr/download'), bindir=path('puticr/bin')),
    bowtie2=Bunch(url=path(
        'https://github.com/BenLangmead/bowtie2/releases/download/v2.3.4.3/bowtie2-2.3.4.3-linux-x86_64.zip'
    ),
                  downloads=path('puticr/download'),
                  olink=path('puticr/bin')),
    # environ=Bunch(
    # installdir=path('puticr/lib')

    # ),
    # settings=Bunch(
    # shell_file=path('puticr/files/settings.sh')
    # ),
    # samtools=Bunch(
    # sdir=path('puticr/download'),
    # bindir=path('puticr/bin')
    # ),
    # help2man=Bunch(
    # sdir=path('puticr/download'),
    # url='http://ftp.gnu.org/gnu/help2man/help2man-1.43.3.tar.gz',
    # ),
    libtool=Bunch(sdir=path('puticr/download'),
                  url='https://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz'),
    textinfo=Bunch(sdir=path('puticr/download'),
                   url='http://ftp.gnu.org/gnu/texinfo/texinfo-6.1.tar.gz'),
    graphviz=Bunch(
        sdir=path('puticr/download'),
        url=
        'https://github.com/ellson/graphviz/releases/download/Nightly/graphviz-2.41.20170103.1755.tar.gz'
    ),
    virtualenv=Bunch(packages_to_install=[], no_site_packages=True))
コード例 #57
0
                                   ('short_description', 'Control firmware and'
                                    ' driver for DropBot DX.'),
                                   ('version', VERSION),
                                   ('long_description', ''),
                                   ('category', 'Communication'),
                                   ('architectures', 'avr')]))

options(
    rpc_module=rpc_module,
    PROPERTIES=PROPERTIES,
    LIB_PROPERTIES=LIB_PROPERTIES,
    base_classes=['BaseNodeSerialHandler',
                  'BaseNodeEeprom',
                  'BaseNodeI2c',
                  'BaseNodeI2cHandler<Handler>',
                  'BaseNodeConfig<ConfigMessage, Address>',
                  'BaseNodeState<StateMessage>'],
    rpc_classes=['dropbot_dx::Node'],
    DEFAULT_ARDUINO_BOARDS=DEFAULT_ARDUINO_BOARDS,
    setup=dict(name=PROJECT_PREFIX.replace('_', '-'),
               version=VERSION,
               description=LIB_PROPERTIES['short_description'],
               author=LIB_PROPERTIES['author'],
               author_email=LIB_PROPERTIES['author_email'],
               url=URL,
               license='GPLv2',
               install_requires=['base_node_rpc>=0.13',
                                 'arduino-servo'],
               include_package_data=True,
               packages=[str(PROJECT_PREFIX)]))
コード例 #58
0
ファイル: pavement.py プロジェクト: has2k1/scikit-misc-wheels
from paver.easy import Bunch, options, task, sh

#-----------------------------------
# Things to be changed for a release
#-----------------------------------

# Path to the release notes
RELEASE_NOTES = 'doc/source/release/1.18.0-notes.rst'

#-------------------------------------------------------
# Hardcoded build/install dirs, virtualenv options, etc.
#-------------------------------------------------------

# Where to put the release installers
options(installers=Bunch(releasedir="release",
                         installersdir=os.path.join("release",
                                                    "installers")), )

#-----------------------------
# Generate the release version
#-----------------------------

sys.path.insert(0, os.path.dirname(__file__))
try:
    setup_py = __import__("setup")
    FULLVERSION = setup_py.VERSION
    # This is duplicated from setup.py
    if os.path.exists('.git'):
        GIT_REVISION = setup_py.git_version()
    elif os.path.exists('numpy/version.py'):
        # must be a source distribution, use existing version file
コード例 #59
0
                                   ('short_description', 'Arduino-based pulse '
                                    'counting firmware and Python driver.'),
                                   ('version', VERSION),
                                   ('long_description', ''),
                                   ('category', 'Communication'),
                                   ('architectures', 'avr')]))

options(
    rpc_module=rpc_module,
    PROPERTIES=PROPERTIES,
    LIB_PROPERTIES=LIB_PROPERTIES,
    base_classes=['BaseNodeSerialHandler',
                  'BaseNodeEeprom',
                  'BaseNodeI2c',
                  'BaseNodeI2cHandler<Handler>',
                  'BaseNodeConfig<ConfigMessage, Address>',
                  'BaseNodeState<StateMessage>'],
    rpc_classes=['pulse_counter_rpc::Node'],
    DEFAULT_ARDUINO_BOARDS=DEFAULT_ARDUINO_BOARDS,
    setup=dict(name=package_name,
               version=VERSION,
               description=LIB_PROPERTIES['short_description'],
               author='Christian Fobel',
               author_email='*****@*****.**',
               url=URL,
               license='GPLv2',
               install_requires=['base-node-rpc>=0.12.post23',
                                 'arduino-helpers>=0.3.post16'],
               include_package_data=True,
               packages=[str(PROJECT_PREFIX)]))