Commits

Ronny Pfannschmidt committed 573e68c

remove the current cli support

  • Participants
  • Parent commits 8b7ce80

Comments (0)

Files changed (8)

File bin/kij

-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-kij script
-~~~~~~~~~~
-"""
-
-from kij.commands import kij_script
-
-
-if __name__ == '__main__':
-    kij_script.main()
-

File kij/commands/__init__.py

-
-"""
-    kij.commands
-    ~~~~~~~~~~~~
-
-    Command line interface to kij
-"""
-
-
-import os
-
-import py
-
-from sanescript import Script, Command, Option
-
-from build import BuildCommand
-
-
-class KijScript(Script):
-
-    options = [
-        Option(
-            'source',
-            help='The source code directory',
-            default=py.path.local(os.getcwd()),
-            processor=py.path.local
-        ),
-    ]
-
-
-class KijCommand(Command):
-    """The base Kij command
-    """
-
-kij_script = KijScript()
-kij_script.add_command(BuildCommand)
-

File kij/commands/build.py

-"""
-
-    :license: MIT/PSF
-    :copyright: 2010 by Ali Afshar <aafshar@gmail.com>
-"""
-
-import sys
-
-from sanescript import Command, Option
-
-from kij.task_queue import Queue
-from kij.tasks.build import Build
-
-
-VERSION_INFO = tuple(sys.version_info[:2])
-
-
-def build_command(config, queue):
-    build = config.source.ensure('build', dir=True)
-    build_lib = build.ensure('lib', dir=True)
-    #build_scripts = build.ensure('scripts-%s.%s' % VERSION_INFO, dir=True)
-    config.build_scripts = build.ensure('scripts-%s.%s' % VERSION_INFO, dir=True) #XXX: hackish
-    config.build_lib = build_lib
-
-    task = Build(config)
-    queue.add(task)
-
-
-class BuildCommand(Command):
-
-    name = 'build'
-
-    def __call__(self, config):
-        queue = Queue()
-        build_command(config, queue)
-        queue.run_all()
-

File kij/commands/install.py

-"""
-
-    :license: MIT/PSF
-    :copyright: 2010 by Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
-"""
-from kij.tasks.install import LinkPTH
-
-
-def link_command(config, queue):
-    #XXX: handle fscked paths?
-    #XXX: scripts
-    queue.add(LinkPTH(config))

File tests/cli/__init__.py

Empty file removed.

File tests/cli/test_build.py

-
-import sys
-VERSION_INFO = tuple(sys.version_info[:2])
-
-from kij.commands.build import BuildCommand
-from kij.commands import kij_script
-from kij.task_queue import Queue
-
-def test_build_command(script, fullsource, build_lib, build_scripts):
-    script.main(['kij', 'build'])
-    assert build_lib.check()
-    assert build_scripts.check()
-

File tests/cli/test_install.py

-from kij.commands.install import link_command
-from kij.task_queue import Queue
-
-
-def test_link_command(config, site):
-    queue = Queue()
-    link_command(config, queue)
-    queue.run_all()
-    assert len(site.listdir()) == 1

File tests/conftest.py

 
-from sanescript.config import Config
 
-from kij.commands import kij_script
+class Config(object):
+    def __init__(self, vars):
+        self.__dict__.update(vars)
 
 
 # python stuff
     for name, subdir in dirs.items():
         paths[name] = tmpdir.ensure(subdir, dir=1)
 
-    config = Config()
-    config.grab_from_dict(paths)
-    return config
-
-def pytest_funcarg__script(request):
-    config = request.getfuncargvalue('config')
-    kij_script._config.grab_from_ns(config)
-    return kij_script
-
+    return Config(paths)