[Checkins] SVN: z3c.filetype/trunk/ - Added documentation to ``long_description``.
Michael Howitz
mh at gocept.com
Mon Aug 16 02:45:30 EDT 2010
Log message for revision 115688:
- Added documentation to ``long_description``.
- Added license (ZPL 2.1).
- Fixed tests to run with current package versions.
- Using python's ``doctest`` package instead of deprecated
``zope.testing.doctestunit``.
Changed:
U z3c.filetype/trunk/CHANGES.txt
U z3c.filetype/trunk/buildout.cfg
U z3c.filetype/trunk/setup.py
U z3c.filetype/trunk/src/z3c/filetype/README.txt
U z3c.filetype/trunk/src/z3c/filetype/TODO.txt
U z3c.filetype/trunk/src/z3c/filetype/tests.py
-=-
Modified: z3c.filetype/trunk/CHANGES.txt
===================================================================
--- z3c.filetype/trunk/CHANGES.txt 2010-08-16 06:44:53 UTC (rev 115687)
+++ z3c.filetype/trunk/CHANGES.txt 2010-08-16 06:45:29 UTC (rev 115688)
@@ -1,41 +1,49 @@
-=======================
-Changes in z3c.filetype
-=======================
+=======
+Changes
+=======
-After
-=====
+1.2.2 (unreleased)
+==================
-2009/04/20 1.2.1
-================
+ - Added documentation to ``long_description``.
- - added a mime.types file for additional file extensions for pythons
+ - Added license (ZPL 2.1).
+
+ - Fixed tests to run with current package versions.
+
+ - Using python's ``doctest`` package instead of deprecated
+ ``zope.testing.doctestunit``.
+
+1.2.1 (2009-04-20)
+==================
+
+ - Added a mime.types file for additional file extensions for pythons
mimetypes module.
- - added interface for WMA-Audio
- Note : with the current magic.mimes file it is not possible to detect WMA
- files. All WMA files are detected as video/x-ms-asf.
- api.getInterfacesFor(filename='xxx.wma') can be used to detect files
- with extension "wma" as audio/x-ms-wma.
-2009/01/19 1.2.0
-================
+ - Added interface for WMA-Audio **Note:** with the current magic.mimes file
+ it is not possible to detect WMA files. All WMA files are detected as
+ video/x-ms-asf. api.getInterfacesFor(filename='xxx.wma') can be used to
+ detect files with extension "wma" as audio/x-ms-wma.
- - added interfaces for Microsoft office files
- Note : with the current magic.mimes file it is not possible to reliably
- detect Microsoft Office files. All Office files are detected as
- application/msword. The only way for now is to use the filename to
- detect the type. (see README.txt)
+1.2.0 (2009-01-19)
+==================
-2007/12/21 1.1.1
-================
+ - Added interfaces for Microsoft office files **Note:** with the current
+ magic.mimes file it is not possible to reliably detect Microsoft Office
+ files. All Office files are detected as application/msword. The only way
+ for now is to use the filename to detect the type. (see README.txt)
- - added an interface for BMP image files
- - make sure unknown formats are not recognized as a default format
+1.1.1 (2007-12-21)
+==================
+ - Added an interface for BMP image files.
+ - Make sure unknown formats are not recognized as a default format.
+
- Because tests failed and the author of the changes did not fixed them after
a year I reverted trunk to version 82160.
-2007/12/06 1.1.0
-================
+1.1.0 (2007/12/06)
+==================
- new mimetype interface IAudioMPEGType
- mimetype extension for audio/mpeg layer 3
Modified: z3c.filetype/trunk/buildout.cfg
===================================================================
--- z3c.filetype/trunk/buildout.cfg 2010-08-16 06:44:53 UTC (rev 115687)
+++ z3c.filetype/trunk/buildout.cfg 2010-08-16 06:45:29 UTC (rev 115688)
@@ -5,4 +5,4 @@
[test]
recipe = zc.recipe.testrunner
-eggs = z3c.filetype
+eggs = z3c.filetype [test]
Modified: z3c.filetype/trunk/setup.py
===================================================================
--- z3c.filetype/trunk/setup.py 2010-08-16 06:44:53 UTC (rev 115687)
+++ z3c.filetype/trunk/setup.py 2010-08-16 06:45:29 UTC (rev 115688)
@@ -16,8 +16,12 @@
$Id: setup.py 82381 2007-12-21 10:08:32Z jukart $
"""
+import os.path
from setuptools import setup, find_packages
+def read(*path_elements):
+ return "\n\n" + file(os.path.join(*path_elements)).read()
+
setup(
name="z3c.filetype",
version="1.2.1",
@@ -25,6 +29,16 @@
packages=find_packages("src"),
package_dir={"": "src"},
include_package_data=True,
+ license='ZPL 2.1',
+ description="Get interfaces for objects based on their content, "\
+ "filename or mime-type.",
+ long_description=(
+ '.. contents::' +
+ read('src', 'z3c', 'filetype', 'README.txt') +
+ read('src', 'z3c', 'filetype', 'magic.txt') +
+ read('src', 'z3c', 'filetype', 'TODO.txt') +
+ read('CHANGES.txt')
+ ),
install_requires=[
"setuptools",
"zope.cachedescriptors",
Modified: z3c.filetype/trunk/src/z3c/filetype/README.txt
===================================================================
--- z3c.filetype/trunk/src/z3c/filetype/README.txt 2010-08-16 06:44:53 UTC (rev 115687)
+++ z3c.filetype/trunk/src/z3c/filetype/README.txt 2010-08-16 06:45:29 UTC (rev 115688)
@@ -167,7 +167,7 @@
>>> notify(ObjectCreatedEvent(foo))
>>> sorted(eventtesting.getEvents())
[<z3c.filetype.event.FileTypeModifiedEvent object at ...>,
- <zope.app.event.objectevent.ObjectCreatedEvent object at ...>]
+ <zope.lifecycleevent.ObjectCreatedEvent object at ...>]
The object now implements the according interface. This is achieved by
the evennthandler which calls applyInterfaces.
@@ -189,13 +189,13 @@
>>> foo.data = file(os.path.join(testData,'test.flv'), 'rb')
>>> eventtesting.clearEvents()
- >>>
+ >>>
>>> notify(ObjectModifiedEvent(foo))
Now we have two events, one we fired and one from our handler.
>>> eventtesting.getEvents()
- [<zope.app.event.objectevent.ObjectModifiedEvent object at ...>,
+ [<zope.lifecycleevent.ObjectModifiedEvent object at ...>,
<z3c.filetype.event.FileTypeModifiedEvent object at ...>]
Now the file should implement another filetype.
Modified: z3c.filetype/trunk/src/z3c/filetype/TODO.txt
===================================================================
--- z3c.filetype/trunk/src/z3c/filetype/TODO.txt 2010-08-16 06:44:53 UTC (rev 115687)
+++ z3c.filetype/trunk/src/z3c/filetype/TODO.txt 2010-08-16 06:45:29 UTC (rev 115688)
@@ -2,9 +2,9 @@
TODOs
=====
-Add more filetypes, espacially test xls and msword
+- Add more filetypes, espacially test xls and msword
-Adapters from IFileType to IImage, IFile
+- Adapters from IFileType to IImage, IFile
-Freeze api and write interface
+- Freeze api and write interface
Modified: z3c.filetype/trunk/src/z3c/filetype/tests.py
===================================================================
--- z3c.filetype/trunk/src/z3c/filetype/tests.py 2010-08-16 06:44:53 UTC (rev 115687)
+++ z3c.filetype/trunk/src/z3c/filetype/tests.py 2010-08-16 06:45:29 UTC (rev 115688)
@@ -1,22 +1,19 @@
import doctest
import unittest
-from zope.testing.doctestunit import DocFileSuite, DocTestSuite
def test_suite():
-
return unittest.TestSuite(
(
- DocFileSuite('README.txt',
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
- ),
- DocFileSuite('magic.txt',
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
- ),
- DocTestSuite('z3c.filetype.api',
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
- ),
- ))
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
-
+ doctest.DocFileSuite(
+ 'README.txt',
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+ ),
+ doctest.DocFileSuite(
+ 'magic.txt',
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+ ),
+ doctest.DocTestSuite(
+ 'z3c.filetype.api',
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+ ),
+ ))
More information about the checkins
mailing list