Esempio n. 1
0
def get_yuicomp():
    current_dir = path.getcwd()
    lib_dir = current_dir / "lib" 
    if not lib_dir.exists():
        lib_dir.mkdir()
    yui_dir = lib_dir / ("yuicompressor-%s" % options.compressor_version)
    jst_conf = current_dir / DEFAULT_CFG

    if getattr(options, "overwrite", False) and yui_dir.exists():
        sh("rm -rf %s" %yui_dir)
    
    if not yui_dir.exists():
        zip_file = lib_dir / options.zip_name
        lib_dir.chdir()
        if not zip_file.exists():
            info("Downloading %s", options.url)
            sh("curl -O %s" % options.url)
        sh("unzip %s" % options.zip_name)
        set_yui_version(jst_conf, options.compressor_version, yui_dir)
        current_dir.chdir()
        return True

    info("yui compressor already downloaded")
    
    if getattr(options, 'set_as_default', None):
        set_yui_version(jst_conf, options.compressor_version, yui_dir)
Esempio n. 2
0
def get_yuicomp():
    current_dir = path.getcwd()
    lib_dir = current_dir / "lib"
    if not lib_dir.exists():
        lib_dir.mkdir()
    yui_dir = lib_dir / ("yuicompressor-%s" % options.compressor_version)
    jst_conf = current_dir / DEFAULT_CFG

    if getattr(options, "overwrite", False) and yui_dir.exists():
        sh("rm -rf %s" % yui_dir)

    if not yui_dir.exists():
        zip_file = lib_dir / options.zip_name
        lib_dir.chdir()
        if not zip_file.exists():
            info("Downloading %s", options.url)
            sh("curl -O %s" % options.url)
        sh("unzip %s" % options.zip_name)
        set_yui_version(jst_conf, options.compressor_version, yui_dir)
        current_dir.chdir()
        return True

    info("yui compressor already downloaded")

    if getattr(options, 'set_as_default', None):
        set_yui_version(jst_conf, options.compressor_version, yui_dir)
Esempio n. 3
0
def tarball(options):
    if not installDir.isdir():
        info('Please run \'paver install\' before tarball')

        return

    tarball = path.getcwd() / path('dist') / tarballFileName

    if tarball.exists():
        tarball.unlink()

    if not tarball.parent.exists():
        tarball.parent.mkdir()

    with installDir.parent:
        sh('tar cjf %s %s/' % (tarball, tarballRootDir))

    sh('ls -l dist/%s' % (tarballFileName))
Esempio n. 4
0
    from paver import setuputils
    setuputils.install_distutils_tasks()
    PAVER_VER = '1.0'
except ImportError:
    # 0.8
    from paver.defaults import *
    from paver.runtime import path as paver_path
    from paver.runtime import sh as paver_sh
    PAVER_VER = '0.8'

import sys, os
import glob
import paver.doctools
from setuptools import find_packages, command

sys.path.insert(0, str(paver_path.getcwd()))

from fedora.release import *

options(
    setup = Bunch(
        name=NAME,
        version=VERSION,
        description=DESCRIPTION,
        author=AUTHOR,
        author_email=EMAIL,
        license=LICENSE,
        keywords='Fedora Python Modules',
        url=URL,
        download_url=DOWNLOAD_URL,
        packages=find_packages(),
Esempio n. 5
0
def create_jstools_userconfig():
    current_dir = path.getcwd()
    jst_conf = current_dir / DEFAULT_CFG
    if not jst_conf.exists():
        info("Creating %s" %jst_conf)
        jst_conf.touch()
Esempio n. 6
0
def create_jstools_userconfig():
    current_dir = path.getcwd()
    jst_conf = current_dir / DEFAULT_CFG
    if not jst_conf.exists():
        info("Creating %s" % jst_conf)
        jst_conf.touch()
Esempio n. 7
0
    from paver import setuputils
    setuputils.install_distutils_tasks()
    PAVER_VER = '1.0'
except ImportError:
    # 0.8
    from paver.defaults import *
    from paver.runtime import path as paver_path
    from paver.runtime import sh as paver_sh
    PAVER_VER = '0.8'

import sys, os
import glob
import paver.doctools
from setuptools import find_packages, command

sys.path.insert(0, str(paver_path.getcwd()))

from fedora.release import *

options(
    setup = Bunch(
        name=NAME,
        version=VERSION,
        description=DESCRIPTION,
        author=AUTHOR,
        author_email=EMAIL,
        license=LICENSE,
        keywords='Fedora Python Webservices',
        url=URL,
        download_url=DOWNLOAD_URL,
        packages=find_packages(),
Esempio n. 8
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from paver.easy import environment, path


if environment.pavement:
    ROOT = path.getcwd().joinpath(environment.pavement.__file__).dirname()
else:
    ROOT = path.getcwd()

LOGS = ROOT.joinpath('var/log')