示例#1
0
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()
示例#2
0
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))
示例#3
0
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()
示例#4
0
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")
示例#5
0
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()
示例#6
0
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)
示例#7
0
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")
示例#8
0
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)
示例#9
0
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()
示例#10
0
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")