[KSS-checkins] r46033 - in kukit/kss.base/trunk: . kss kss/base
jvloothuis at codespeak.net
jvloothuis at codespeak.net
Mon Aug 27 16:29:45 CEST 2007
Author: jvloothuis
Date: Mon Aug 27 16:29:42 2007
New Revision: 46033
Added:
kukit/kss.base/trunk/kss/
kukit/kss.base/trunk/kss/__init__.py
kukit/kss.base/trunk/kss/base/
kukit/kss.base/trunk/kss/base/README.txt
- copied, changed from r44899, kukit/kss.commands/trunk/kss/commands/README.txt
kukit/kss.base/trunk/kss/base/__init__.py
kukit/kss.base/trunk/kss/base/commands.py
- copied, changed from r44898, kukit/kss.commands/trunk/kss/commands/commands.py
kukit/kss.base/trunk/kss/base/commandset.py
- copied unchanged from r43316, kukit/kss.pluginregistry/trunk/kss/pluginregistry/commandset.py
kukit/kss.base/trunk/kss/base/corecommands.py
- copied, changed from r44898, kukit/kss.commands/trunk/kss/commands/corecommands.py
kukit/kss.base/trunk/kss/base/pluginregistry.txt
- copied, changed from r45138, kukit/kss.pluginregistry/trunk/kss/pluginregistry/README.txt
kukit/kss.base/trunk/kss/base/selectors.py
- copied unchanged from r44898, kukit/kss.commands/trunk/kss/commands/selectors.py
kukit/kss.base/trunk/kss/base/selectors.txt
- copied, changed from r44898, kukit/kss.commands/trunk/kss/commands/selectors.txt
kukit/kss.base/trunk/kss/base/tests.py
- copied, changed from r44898, kukit/kss.commands/trunk/kss/commands/tests.py
kukit/kss.base/trunk/setup.py
Log:
Completed merge of kss.commands and kss.pluginregistry
Added: kukit/kss.base/trunk/kss/__init__.py
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/kss/__init__.py Mon Aug 27 16:29:42 2007
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Copied: kukit/kss.base/trunk/kss/base/README.txt (from r44899, kukit/kss.commands/trunk/kss/commands/README.txt)
==============================================================================
--- kukit/kss.commands/trunk/kss/commands/README.txt (original)
+++ kukit/kss.base/trunk/kss/base/README.txt Mon Aug 27 16:29:42 2007
@@ -11,7 +11,7 @@
for create the KSS response. We will now take a look at an example to see it
in action.
- >>> from kss.commands import KSSCommands
+ >>> from kss.base import KSSCommands
The constructor takes no arguments.
@@ -21,7 +21,7 @@
also need to create a selector. In this case we will use the CSS selector.
For more information about selectors look at the selector documentation.
- >>> from kss.commands.selectors import CSS
+ >>> from kss.base.selectors import CSS
>>> commands.add('replaceHTML', CSS('#someid'), html='some value')
Now we have added a command. The first argument is the name of the action
@@ -99,7 +99,7 @@
We will now take a look at the base class for all commandsets.
- >>> from kss.commands import KSSCommandSet
+ >>> from kss.base.commands import KSSCommandSet
>>> commands = KSSCommands()
>>> commandset = KSSCommandSet(commands)
@@ -120,7 +120,7 @@
First we will need to create our command set.
- >>> from kss.commands import KSSCoreCommands
+ >>> from kss.base.corecommands import KSSCoreCommands
>>> commands = KSSCommands()
>>> core = KSSCoreCommands(commands)
@@ -140,7 +140,7 @@
We will now demonstrate this in the next example. First we need to load the
registry.
- >>> from kss.pluginregistry import command_set_registry
+ >>> from kss.base.registry import command_set_registry
Now we can register our command set. For more information about the registry look at the documentation of kss.pluginregistry.
Added: kukit/kss.base/trunk/kss/base/__init__.py
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/kss/base/__init__.py Mon Aug 27 16:29:42 2007
@@ -0,0 +1,9 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
+
+
+from kss.base.commands import KSSCommands
Copied: kukit/kss.base/trunk/kss/base/commands.py (from r44898, kukit/kss.commands/trunk/kss/commands/commands.py)
==============================================================================
--- kukit/kss.commands/trunk/kss/commands/commands.py (original)
+++ kukit/kss.base/trunk/kss/base/commands.py Mon Aug 27 16:29:42 2007
@@ -1,6 +1,6 @@
from xml.sax.saxutils import quoteattr
from xml.parsers.expat import ParserCreate, ExpatError
-from kss.pluginregistry import command_set_registry
+from kss.base.registry import command_set_registry
kss_response_header = '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:kukit="http://www.kukit.org/commands/1.0"><body><kukit:commands>'''
Copied: kukit/kss.base/trunk/kss/base/corecommands.py (from r44898, kukit/kss.commands/trunk/kss/commands/corecommands.py)
==============================================================================
--- kukit/kss.commands/trunk/kss/commands/corecommands.py (original)
+++ kukit/kss.base/trunk/kss/base/corecommands.py Mon Aug 27 16:29:42 2007
@@ -1,4 +1,4 @@
-from commands import KSSCommandSet
+from kss.base.commands import KSSCommandSet
class KSSCoreCommands(KSSCommandSet):
def replace_inner_html(self, selector, value):
Copied: kukit/kss.base/trunk/kss/base/pluginregistry.txt (from r45138, kukit/kss.pluginregistry/trunk/kss/pluginregistry/README.txt)
==============================================================================
--- kukit/kss.pluginregistry/trunk/kss/pluginregistry/README.txt (original)
+++ kukit/kss.base/trunk/kss/base/pluginregistry.txt Mon Aug 27 16:29:42 2007
@@ -14,7 +14,7 @@
Using the registry is pretty simple.
- >>> from kss.pluginregistry import command_set_registry
+ >>> from kss.base.registry import command_set_registry
First we will create a simple factory for our command set. Note that any
callable object will do. For more information on command sets look at the
Copied: kukit/kss.base/trunk/kss/base/selectors.txt (from r44898, kukit/kss.commands/trunk/kss/commands/selectors.txt)
==============================================================================
--- kukit/kss.commands/trunk/kss/commands/selectors.txt (original)
+++ kukit/kss.base/trunk/kss/base/selectors.txt Mon Aug 27 16:29:42 2007
@@ -7,7 +7,7 @@
A base class is provided for all selectors.
- >>> from kss.commands import Selector
+ >>> from kss.base.selectors import Selector
>>> selector = Selector('type', 'value')
The selector now has a type and value property.
@@ -24,7 +24,7 @@
In the core package you can find a few standard selectors. The most
basic selectors are the CSS and HTML id selectors.
- >>> from kss.commands.selectors import CSS, HTMLId
+ >>> from kss.base.selectors import CSS, HTMLId
They both need a value to operate on.
@@ -44,7 +44,7 @@
in that it selects the same node that was used to call the server
action. Also note that it does not accept any arguments.
- >>> from kss.commands.selectors import SameNode
+ >>> from kss.base.selectors import SameNode
>>> selector = SameNode()
>>> selector.type
'samenode'
@@ -55,7 +55,7 @@
query which only operates on nodes that are the parent (or
grandparents).
- >>> from kss.commands.selectors import ParentNode
+ >>> from kss.base.selectors import ParentNode
>>> selector = ParentNode('a')
>>> selector.type
'parentnode'
Copied: kukit/kss.base/trunk/kss/base/tests.py (from r44898, kukit/kss.commands/trunk/kss/commands/tests.py)
==============================================================================
--- kukit/kss.commands/trunk/kss/commands/tests.py (original)
+++ kukit/kss.base/trunk/kss/base/tests.py Mon Aug 27 16:29:42 2007
@@ -5,8 +5,9 @@
suite = unittest.TestSuite((
doctest.DocFileSuite(
'README.txt', 'selectors.txt',
- package='kss.commands',
- optionflags=doctest.ELLIPSIS,
+ 'pluginregistry.txt',
+ package='kss.base',
+ optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
),
))
return suite
Added: kukit/kss.base/trunk/setup.py
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/setup.py Mon Aug 27 16:29:42 2007
@@ -0,0 +1,34 @@
+from setuptools import setup, find_packages
+import sys, os
+
+version = '0.1'
+
+setup(name='kss.base',
+ version=version,
+ description="KSS (Kinetic Style Sheets) framework",
+ long_description="""\
+""",
+ # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+ classifiers=[
+ "Programming Language :: Python",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
+ keywords='',
+ author='KSS Project',
+ author_email='kss-devel at codespeak.net',
+ url='http://kssproject.org',
+ license='LGPL',
+ packages=find_packages(exclude=['ez_setup']),
+ namespace_packages=['kss'],
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=[
+ 'setuptools',
+ ],
+ entry_points={
+ 'kss.commandset': [
+ 'core=kss.base.corecommands:KSSCoreCommands'
+ ],
+ },
+ test_suite='kss.base.tests.test_suite',
+)
More information about the Kukit-checkins
mailing list