from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() for option in ("doc", "github", "travis", "pypi", "coveralls", "readthedocs", "landscape"): pkg_cfg = add_option(option, pkg_cfg) pkg_cfg['base']['pkgname'] = 'toto' pkg_cfg['pysetup']['intended_versions'] = ["27", "34", "35"] write_pkg_config(pkg_cfg) rg()
def test_manage_add_opt_raise_error_if_already_installed(): env = create_env(default_cfg) env = add_option("base", env) assert_raises(UserWarning, lambda: add_option('base', env))
from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() pkg_cfg = add_option('license', pkg_cfg) cfg = pkg_cfg['base'] cfg['pkgname'] = 'toto' write_pkg_config(pkg_cfg) rg()
from subprocess import call from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() pkg_cfg = add_option('pysetup', pkg_cfg) pkg_cfg['base']['pkgname'] = 'toto' pkg_cfg['pysetup']['intended_versions'] = ["27", "34", "35"] write_pkg_config(pkg_cfg) rg() call("pmg example test") rg() call("nosetests")
from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() pkg_cfg = add_option('pypi', pkg_cfg) pkg_cfg['base']['pkgname'] = 'toto' pkg_cfg['pysetup']['intended_versions'] = ["27", "34", "35"] write_pkg_config(pkg_cfg) rg()
def test_manage_add_opt_raise_error_if_already_installed(): cfg = Config(default_cfg) cfg = add_option("base", cfg) with pytest.raises(UserWarning): add_option('base', cfg)
from subprocess import call from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() pkg_cfg = add_option('pysetup', pkg_cfg) pkg_cfg = add_option('coverage', pkg_cfg) pkg_cfg['base']['pkgname'] = 'toto' pkg_cfg['pysetup']['intended_versions'] = ["27", "34", "35"] write_pkg_config(pkg_cfg) rg() call("pmg example test") rg() call("nosetests")
from subprocess import call from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() pkg_cfg = add_option('pysetup', pkg_cfg) pkg_cfg = add_option('sphinx', pkg_cfg) pkg_cfg['base']['pkgname'] = 'toto' pkg_cfg['pysetup']['intended_versions'] = ["27", "34", "35"] write_pkg_config(pkg_cfg) rg() call("pmg example test") rg() call("python setup.py build_sphinx", shell=True)
from tuto_tools import initialize, rg initialize() from pkglts.manage import add_option, get_pkg_config, write_pkg_config pkg_cfg = get_pkg_config() pkg_cfg = add_option('version', pkg_cfg) cfg = pkg_cfg['base'] cfg['pkgname'] = 'toto' write_pkg_config(pkg_cfg) rg()
from os import makedirs from os.path import dirname, exists from subprocess import call from tuto_tools import initialize, rg initialize() from pkglts.manage import (add_option, get_pkg_config, install_example_files, write_pkg_config) pkg_cfg = get_pkg_config() pkg_cfg = add_option('pysetup', pkg_cfg) pkg_cfg = add_option('data', pkg_cfg) pkg_cfg['base']['pkgname'] = 'toto' pkg_cfg['base']['namespace'] = None pkg_cfg['pysetup']['intended_versions'] = ["27", "34", "35"] write_pkg_config(pkg_cfg) rg() # write some data for name in ("toto.txt", "titi.txt", "sub/tata.txt"): pth = "src/toto_data/" + name if not exists(dirname(pth)): makedirs(dirname(pth)) with open(pth, 'w') as f: f.write("lorem ipsum\n")