[Checkins] SVN: zc.datetimewidget/trunk/ Modernized the package.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sat Nov 3 13:59:24 EDT 2007
Log message for revision 81439:
Modernized the package.
Changed:
_U zc.datetimewidget/trunk/
A zc.datetimewidget/trunk/CHANGES.txt
A zc.datetimewidget/trunk/README.txt
A zc.datetimewidget/trunk/bootstrap.py
A zc.datetimewidget/trunk/buildout.cfg
U zc.datetimewidget/trunk/setup.py
_U zc.datetimewidget/trunk/src/
U zc.datetimewidget/trunk/src/zc/datetimewidget/demo/README.txt
U zc.datetimewidget/trunk/src/zc/datetimewidget/demo/tests.py
U zc.datetimewidget/trunk/src/zc/datetimewidget/ftesting.zcml
D zc.datetimewidget/trunk/src/zc/datetimewidget/ftests.py
U zc.datetimewidget/trunk/src/zc/datetimewidget/tests.py
U zc.datetimewidget/trunk/src/zc/datetimewidget/widgets.txt
-=-
Property changes on: zc.datetimewidget/trunk
___________________________________________________________________
Name: svn:ignore
+ .installed.cfg
bin
develop-eggs
dist
parts
Added: zc.datetimewidget/trunk/CHANGES.txt
===================================================================
--- zc.datetimewidget/trunk/CHANGES.txt (rev 0)
+++ zc.datetimewidget/trunk/CHANGES.txt 2007-11-03 17:59:23 UTC (rev 81439)
@@ -0,0 +1,22 @@
+=======
+CHANGES
+=======
+
+0.5.2 (2007-11-03)
+------------------
+
+- Improve package data.
+
+- Developed proper package dependencies.
+
+- Merged functional tests into ``tests.py``.
+
+0.5.1 (2006-06-15)
+------------------
+
+- Include license and copyright headers.
+
+0.5.0 (2006-05-24)
+------------------
+
+- Initial release.
Property changes on: zc.datetimewidget/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zc.datetimewidget/trunk/README.txt
===================================================================
--- zc.datetimewidget/trunk/README.txt (rev 0)
+++ zc.datetimewidget/trunk/README.txt 2007-11-03 17:59:23 UTC (rev 81439)
@@ -0,0 +1,2 @@
+There are two types of widgets provided by this package, a date widget
+and a datetime widget.
Property changes on: zc.datetimewidget/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zc.datetimewidget/trunk/bootstrap.py
===================================================================
--- zc.datetimewidget/trunk/bootstrap.py (rev 0)
+++ zc.datetimewidget/trunk/bootstrap.py 2007-11-03 17:59:23 UTC (rev 81439)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Property changes on: zc.datetimewidget/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
+ Id
Added: zc.datetimewidget/trunk/buildout.cfg
===================================================================
--- zc.datetimewidget/trunk/buildout.cfg (rev 0)
+++ zc.datetimewidget/trunk/buildout.cfg 2007-11-03 17:59:23 UTC (rev 81439)
@@ -0,0 +1,7 @@
+[buildout]
+develop = .
+parts = test
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zc.datetimewidget [test]
Modified: zc.datetimewidget/trunk/setup.py
===================================================================
--- zc.datetimewidget/trunk/setup.py 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/setup.py 2007-11-03 17:59:23 UTC (rev 81439)
@@ -1,33 +1,79 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup for zc.datetimewidget package
+
+$Id$
+"""
+import os
from setuptools import setup, find_packages
-setup(
- name="zc.datetimewidget",
- version="0.6.1dev",
- install_requires=['zc.resourcelibrary >= 0.5',
- 'zc.i18n >= 0.5'],
- dependency_links=['http://download.zope.org/distribution/',],
-
- packages=find_packages('src', exclude=["*.tests", "*.ftests"]),
-
- package_dir= {'':'src'},
-
- namespace_packages=['zc'],
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
- package_data = {
- '': ['*.txt', '*.zcml', '*.gif', '*.js'],
- 'zc.datetimewidget': ['resources/*.css',
- 'resources/*.js',
- 'resources/*.gif',
- 'resources/lang/*'],
- },
-
- zip_safe=False,
- author='Zope Project',
- author_email='zope3-dev at zope.org',
- description="""\
-zc.datetimewidget has improved javascript based widgets for the entry of date
-and datetime information.
-""",
- license='ZPL',
- keywords="zope zope3",
- )
+setup(name='zc.datetimewidget',
+ version = '0.5.2',
+ author='Zope Corporation and Contributors',
+ author_email='zope3-dev at zope.org',
+ description='Javascript-based widgets for date and datetime fields.',
+ long_description=(
+ read('README.txt')
+ + '\n\n' +
+ 'Detailed Dcoumentation\n' +
+ '======================\n'
+ + '\n\n' +
+ read('src', 'zc', 'datetimewidget', 'widgets.txt')
+ + '\n\n' +
+ read('src', 'zc', 'datetimewidget', 'demo', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ keywords = "zope3 date datetime widget javascript",
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ url='http://cheeseshop.python.org/pypi/zc.datetimewidget',
+ license='ZPL 2.1',
+ packages=find_packages('src'),
+ package_dir = {'': 'src'},
+ namespace_packages=['zc'],
+ extras_require=dict(
+ test=['zope.app.zcmlfiles',
+ 'zope.app.securitypolicy',
+ 'zope.app.authentication',
+ 'zope.app.server',
+ 'zope.securitypolicy',
+ 'zope.testbrowser',
+ 'zope.testing',
+ ]),
+ install_requires=['pytz',
+ 'setuptools',
+ 'zc.i18n',
+ 'zc.resourcelibrary',
+ 'zope.app.form',
+ 'zope.component',
+ 'zope.datetime',
+ 'zope.interface',
+ 'zope.publisher',
+ 'zope.schema',
+ ],
+ include_package_data = True,
+ zip_safe = False,
+ )
Property changes on: zc.datetimewidget/trunk/src
___________________________________________________________________
Name: svn:ignore
+ zc.datetimewidget.egg-info
Modified: zc.datetimewidget/trunk/src/zc/datetimewidget/demo/README.txt
===================================================================
--- zc.datetimewidget/trunk/src/zc/datetimewidget/demo/README.txt 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/src/zc/datetimewidget/demo/README.txt 2007-11-03 17:59:23 UTC (rev 81439)
@@ -1,6 +1,6 @@
-======================
- Datetime Widget Demo
-======================
+====================
+Datetime Widget Demo
+====================
This demo packe provides a simple content class which uses the
zc.datetimewidget
Modified: zc.datetimewidget/trunk/src/zc/datetimewidget/demo/tests.py
===================================================================
--- zc.datetimewidget/trunk/src/zc/datetimewidget/demo/tests.py 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/src/zc/datetimewidget/demo/tests.py 2007-11-03 17:59:23 UTC (rev 81439)
@@ -1,10 +1,9 @@
import doctest
import unittest
from zope.testing.doctestunit import DocTestSuite
+
def test_suite():
-
- return unittest.TestSuite(
- (
+ return unittest.TestSuite((
DocTestSuite('zc.datetimewidget.demo.timezone',
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
),
Modified: zc.datetimewidget/trunk/src/zc/datetimewidget/ftesting.zcml
===================================================================
--- zc.datetimewidget/trunk/src/zc/datetimewidget/ftesting.zcml 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/src/zc/datetimewidget/ftesting.zcml 2007-11-03 17:59:23 UTC (rev 81439)
@@ -17,7 +17,7 @@
<include package="zope.app.authentication" />
<include package="zope.app.securitypolicy" file="meta.zcml" />
<securityPolicy
- component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
<include package="zope.app.securitypolicy" />
<include package="zc.resourcelibrary" file="meta.zcml"/>
<include package="zc.resourcelibrary" />
Deleted: zc.datetimewidget/trunk/src/zc/datetimewidget/ftests.py
===================================================================
--- zc.datetimewidget/trunk/src/zc/datetimewidget/ftests.py 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/src/zc/datetimewidget/ftests.py 2007-11-03 17:59:23 UTC (rev 81439)
@@ -1,26 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-from zope.app.testing import functional
-
-functional.defineLayer('TestLayer', 'ftesting.zcml')
-
-def test_suite():
- suite = functional.FunctionalDocFileSuite(
- 'demo/README.txt',
- )
- suite.layer = TestLayer
- return suite
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
Modified: zc.datetimewidget/trunk/src/zc/datetimewidget/tests.py
===================================================================
--- zc.datetimewidget/trunk/src/zc/datetimewidget/tests.py 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/src/zc/datetimewidget/tests.py 2007-11-03 17:59:23 UTC (rev 81439)
@@ -16,12 +16,12 @@
$Id$
"""
__docformat__ = "reStructuredText"
-
+import os
import doctest
import unittest
from zope.testing.doctestunit import DocFileSuite, DocTestSuite
-from zope.app.testing import setup
+from zope.app.testing import functional, setup
def setUp(test):
@@ -30,8 +30,13 @@
def tearDown(test):
setup.placefulTearDown()
+DTWidgetLayer = functional.ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'DTWidgetLayer', allow_teardown=True)
def test_suite():
+ DemoSuite = functional.FunctionalDocFileSuite('demo/README.txt')
+ DemoSuite.layer = DTWidgetLayer
return unittest.TestSuite(
(
DocFileSuite('widgets.txt',
@@ -40,6 +45,7 @@
DocFileSuite('datetimewidget.txt',
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
),
+ DemoSuite,
))
if __name__ == '__main__':
Modified: zc.datetimewidget/trunk/src/zc/datetimewidget/widgets.txt
===================================================================
--- zc.datetimewidget/trunk/src/zc/datetimewidget/widgets.txt 2007-11-03 17:35:22 UTC (rev 81438)
+++ zc.datetimewidget/trunk/src/zc/datetimewidget/widgets.txt 2007-11-03 17:59:23 UTC (rev 81439)
@@ -6,7 +6,7 @@
and a datetime widget.
Date Widget
-===========
+-----------
The date widget only handles datetime.date objects, which are not
timezone aware. We use the demo package here to have a content class.
@@ -41,7 +41,7 @@
datetime.date(2006, 12, 31)
Datetime Widget
-===============
+---------------
Datetimes are always stored timezone aware, and by default the utc
timezone is used.
More information about the Checkins
mailing list