z3c.ptcompat-1.0.1/0000775000177100020040000000000011716773050015173 5ustar menesismenesis00000000000000z3c.ptcompat-1.0.1/setup.py0000664000177100020040000000257411716773020016712 0ustar menesismenesis00000000000000import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() version = '1.0.1' tests_require = [ 'zope.testing', 'zope.configuration', ], setup(name='z3c.ptcompat', version=version, description="Zope-compatible page template engine based on Chameleon.", long_description=( ".. contents::\n\n" + read('README.txt') + "\n\n" + read("CHANGES.txt") ), classifiers=[ "Framework :: Plone", "Framework :: Zope2", "Framework :: Zope3", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", ], keywords='zpt template zope', url='http://pypi.python.org/pypi/z3c.ptcompat', author='Zope Corporation and Contributors', author_email='zope-dev@zope.org', license='ZPL', packages=find_packages('src'), package_dir={'': 'src'}, namespace_packages=['z3c'], include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'z3c.pt >= 2.1', 'zope.pagetemplate >= 3.6.2', 'zope.traversing', ], extras_require=dict( test=tests_require, ), tests_require=tests_require, test_suite="z3c.ptcompat", ) z3c.ptcompat-1.0.1/CHANGES.txt0000664000177100020040000000555211716773020017010 0ustar menesismenesis00000000000000Changelog ========= 1.0.1 (2012-02-15) ------------------ - Move ``zope.testing`` to test dependencies, add undeclared dependencies. 1.0 (2011-10-10) ---------------- - Update implementation to use component-based template engine configuration, plugging directly into the Zope Toolkit framework. The package no longer provides template classes, or ZCML directives; you should import directly from the ZTK codebase. Also, note that the ``PREFER_Z3C_PT`` environment option has been rendered obsolete; instead, this is now managed via component configuration. - Upgrade to Chameleon 2.x. 0.5.7 (2010-11-25) ------------------ - Added not yet declared test dependency on ``zope.testing``. - Fixed test tear down so tests can be run multiple times. 0.5.6 (2010-04-19) ------------------ - Remove broken templates from registry during engine migration. In some testing situation, stale templates would be tracked in the regsitry. - Existing template instances are now migrated to the right engine when using the ``enable`` and ``disable`` methods. [malthe] 0.5.5 (2009-07-24) ------------------ - Make tests pass in a binary release by not relying on the pacakge structure. 0.5.4 (2009-07-23) ------------------ - Added a test requirement explicitely. 0.5.3 (2009-05-28) ------------------ - Added support for browser:addform, browser:editform, browser:form, and browser:schemadisplay directives. 0.5.2 (2009-03-09) ------------------ - Fixing brown-bag release 0.5.1. 0.5.1 (2009-03-09) ------------------ - Added missing ``lxml`` test dependency. - Fixed tests to work with current version of z3c.pt. - Fixed autor e-mail address. - Added doctests and change log to long description to show up at pypi homepage. - Reformatted release dates in change log to use iso dates. 0.5 (2009-02-16) ---------------- - Added module which patches ``zope.app.pagetemplate`` such that template classes depend on ``z3c.pt`` for rendering (import optional). [malthe] 0.4 (2009-02-10) ---------------- - Rename project to z3c.ptcompat to deal with setuptools issues (as discussed on zope-dev http://mail.zope.org/pipermail/zope-dev/2008-December/033820.html) - Added optional option ``doctest`` for output checker to allow usage with alternative implementations, e.g. the Zope doctest module. [malthe] - Added tests for meta-directives and fixed some minor errors. [malthe] - Added update-tool to walk a source tree and automatically rewrite template import statements in each file. [malthe] - Added meta-directives for browser pages and viewlets. These build upon the original implementations, but make sure that the Chameleon template engine is used. [malthe] - Added ``PageTemplateFile``. [malthe] 0.3 (2008-10-02) ---------------- - Various changes. 0.2 (2008-09-13) ---------------- - Various changes. 0.1 (2008-09-09) ---------------- - Initial release. z3c.ptcompat-1.0.1/PKG-INFO0000664000177100020040000001163311716773050016274 0ustar menesismenesis00000000000000Metadata-Version: 1.1 Name: z3c.ptcompat Version: 1.0.1 Summary: Zope-compatible page template engine based on Chameleon. Home-page: http://pypi.python.org/pypi/z3c.ptcompat Author: Zope Corporation and Contributors Author-email: zope-dev@zope.org License: ZPL Description: .. contents:: Overview ======== This package provides a page template engine implementation based on Chameleon. It plugs into the `zope.pagetemplate `_ package and has an explicit dependency on this package. You can use the package to replace Zope's reference template engine with Chameleon in an application based on the Zope Toolkit. Configuration ------------- The package is configured via ZCML. Changelog ========= 1.0.1 (2012-02-15) ------------------ - Move ``zope.testing`` to test dependencies, add undeclared dependencies. 1.0 (2011-10-10) ---------------- - Update implementation to use component-based template engine configuration, plugging directly into the Zope Toolkit framework. The package no longer provides template classes, or ZCML directives; you should import directly from the ZTK codebase. Also, note that the ``PREFER_Z3C_PT`` environment option has been rendered obsolete; instead, this is now managed via component configuration. - Upgrade to Chameleon 2.x. 0.5.7 (2010-11-25) ------------------ - Added not yet declared test dependency on ``zope.testing``. - Fixed test tear down so tests can be run multiple times. 0.5.6 (2010-04-19) ------------------ - Remove broken templates from registry during engine migration. In some testing situation, stale templates would be tracked in the regsitry. - Existing template instances are now migrated to the right engine when using the ``enable`` and ``disable`` methods. [malthe] 0.5.5 (2009-07-24) ------------------ - Make tests pass in a binary release by not relying on the pacakge structure. 0.5.4 (2009-07-23) ------------------ - Added a test requirement explicitely. 0.5.3 (2009-05-28) ------------------ - Added support for browser:addform, browser:editform, browser:form, and browser:schemadisplay directives. 0.5.2 (2009-03-09) ------------------ - Fixing brown-bag release 0.5.1. 0.5.1 (2009-03-09) ------------------ - Added missing ``lxml`` test dependency. - Fixed tests to work with current version of z3c.pt. - Fixed autor e-mail address. - Added doctests and change log to long description to show up at pypi homepage. - Reformatted release dates in change log to use iso dates. 0.5 (2009-02-16) ---------------- - Added module which patches ``zope.app.pagetemplate`` such that template classes depend on ``z3c.pt`` for rendering (import optional). [malthe] 0.4 (2009-02-10) ---------------- - Rename project to z3c.ptcompat to deal with setuptools issues (as discussed on zope-dev http://mail.zope.org/pipermail/zope-dev/2008-December/033820.html) - Added optional option ``doctest`` for output checker to allow usage with alternative implementations, e.g. the Zope doctest module. [malthe] - Added tests for meta-directives and fixed some minor errors. [malthe] - Added update-tool to walk a source tree and automatically rewrite template import statements in each file. [malthe] - Added meta-directives for browser pages and viewlets. These build upon the original implementations, but make sure that the Chameleon template engine is used. [malthe] - Added ``PageTemplateFile``. [malthe] 0.3 (2008-10-02) ---------------- - Various changes. 0.2 (2008-09-13) ---------------- - Various changes. 0.1 (2008-09-09) ---------------- - Initial release. Keywords: zpt template zope Platform: UNKNOWN Classifier: Framework :: Plone Classifier: Framework :: Zope2 Classifier: Framework :: Zope3 Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules z3c.ptcompat-1.0.1/bootstrap.py0000664000177100020040000000336611716773020017567 0ustar menesismenesis00000000000000############################################################################## # # Copyright (c) 2006 Zope Foundation 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: bootstrap.py 71627 2006-12-20 16:46:11Z jim $ """ 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) z3c.ptcompat-1.0.1/COPYRIGHT.txt0000664000177100020040000000004011716773020017273 0ustar menesismenesis00000000000000Zope Foundation and Contributorsz3c.ptcompat-1.0.1/src/0000775000177100020040000000000011716773050015762 5ustar menesismenesis00000000000000z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/0000775000177100020040000000000011716773050022001 5ustar menesismenesis00000000000000z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/PKG-INFO0000664000177100020040000001163311716773043023104 0ustar menesismenesis00000000000000Metadata-Version: 1.1 Name: z3c.ptcompat Version: 1.0.1 Summary: Zope-compatible page template engine based on Chameleon. Home-page: http://pypi.python.org/pypi/z3c.ptcompat Author: Zope Corporation and Contributors Author-email: zope-dev@zope.org License: ZPL Description: .. contents:: Overview ======== This package provides a page template engine implementation based on Chameleon. It plugs into the `zope.pagetemplate `_ package and has an explicit dependency on this package. You can use the package to replace Zope's reference template engine with Chameleon in an application based on the Zope Toolkit. Configuration ------------- The package is configured via ZCML. Changelog ========= 1.0.1 (2012-02-15) ------------------ - Move ``zope.testing`` to test dependencies, add undeclared dependencies. 1.0 (2011-10-10) ---------------- - Update implementation to use component-based template engine configuration, plugging directly into the Zope Toolkit framework. The package no longer provides template classes, or ZCML directives; you should import directly from the ZTK codebase. Also, note that the ``PREFER_Z3C_PT`` environment option has been rendered obsolete; instead, this is now managed via component configuration. - Upgrade to Chameleon 2.x. 0.5.7 (2010-11-25) ------------------ - Added not yet declared test dependency on ``zope.testing``. - Fixed test tear down so tests can be run multiple times. 0.5.6 (2010-04-19) ------------------ - Remove broken templates from registry during engine migration. In some testing situation, stale templates would be tracked in the regsitry. - Existing template instances are now migrated to the right engine when using the ``enable`` and ``disable`` methods. [malthe] 0.5.5 (2009-07-24) ------------------ - Make tests pass in a binary release by not relying on the pacakge structure. 0.5.4 (2009-07-23) ------------------ - Added a test requirement explicitely. 0.5.3 (2009-05-28) ------------------ - Added support for browser:addform, browser:editform, browser:form, and browser:schemadisplay directives. 0.5.2 (2009-03-09) ------------------ - Fixing brown-bag release 0.5.1. 0.5.1 (2009-03-09) ------------------ - Added missing ``lxml`` test dependency. - Fixed tests to work with current version of z3c.pt. - Fixed autor e-mail address. - Added doctests and change log to long description to show up at pypi homepage. - Reformatted release dates in change log to use iso dates. 0.5 (2009-02-16) ---------------- - Added module which patches ``zope.app.pagetemplate`` such that template classes depend on ``z3c.pt`` for rendering (import optional). [malthe] 0.4 (2009-02-10) ---------------- - Rename project to z3c.ptcompat to deal with setuptools issues (as discussed on zope-dev http://mail.zope.org/pipermail/zope-dev/2008-December/033820.html) - Added optional option ``doctest`` for output checker to allow usage with alternative implementations, e.g. the Zope doctest module. [malthe] - Added tests for meta-directives and fixed some minor errors. [malthe] - Added update-tool to walk a source tree and automatically rewrite template import statements in each file. [malthe] - Added meta-directives for browser pages and viewlets. These build upon the original implementations, but make sure that the Chameleon template engine is used. [malthe] - Added ``PageTemplateFile``. [malthe] 0.3 (2008-10-02) ---------------- - Various changes. 0.2 (2008-09-13) ---------------- - Various changes. 0.1 (2008-09-09) ---------------- - Initial release. Keywords: zpt template zope Platform: UNKNOWN Classifier: Framework :: Plone Classifier: Framework :: Zope2 Classifier: Framework :: Zope3 Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/dependency_links.txt0000664000177100020040000000000111716773043026051 0ustar menesismenesis00000000000000 z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/namespace_packages.txt0000664000177100020040000000000411716773043026330 0ustar menesismenesis00000000000000z3c z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/not-zip-safe0000664000177100020040000000000111716773020024224 0ustar menesismenesis00000000000000 z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/top_level.txt0000664000177100020040000000000411716773043024527 0ustar menesismenesis00000000000000z3c z3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/requires.txt0000664000177100020040000000015311716773043024402 0ustar menesismenesis00000000000000setuptools z3c.pt >= 2.1 zope.pagetemplate >= 3.6.2 zope.traversing [test] zope.testing zope.configurationz3c.ptcompat-1.0.1/src/z3c.ptcompat.egg-info/SOURCES.txt0000664000177100020040000000101011716773043023657 0ustar menesismenesis00000000000000CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt bootstrap.py buildout.cfg setup.py src/z3c/__init__.py src/z3c.ptcompat.egg-info/PKG-INFO src/z3c.ptcompat.egg-info/SOURCES.txt src/z3c.ptcompat.egg-info/dependency_links.txt src/z3c.ptcompat.egg-info/namespace_packages.txt src/z3c.ptcompat.egg-info/not-zip-safe src/z3c.ptcompat.egg-info/requires.txt src/z3c.ptcompat.egg-info/top_level.txt src/z3c/ptcompat/__init__.py src/z3c/ptcompat/configure.zcml src/z3c/ptcompat/engine.py src/z3c/ptcompat/tests.py tools/update.pyz3c.ptcompat-1.0.1/src/z3c/0000775000177100020040000000000011716773050016461 5ustar menesismenesis00000000000000z3c.ptcompat-1.0.1/src/z3c/ptcompat/0000775000177100020040000000000011716773050020310 5ustar menesismenesis00000000000000z3c.ptcompat-1.0.1/src/z3c/ptcompat/configure.zcml0000664000177100020040000000026311716773020023156 0ustar menesismenesis00000000000000 z3c.ptcompat-1.0.1/src/z3c/ptcompat/tests.py0000664000177100020040000000106711716773020022025 0ustar menesismenesis00000000000000import unittest from zope.pagetemplate.tests import test_htmltests as reference def test_suite(): return unittest.makeSuite(HTMLTests) class HTMLTests(reference.HTMLTests): def setUp(self): import z3c.ptcompat import zope.component.testing import zope.configuration.xmlconfig zope.component.testing.setUp(self) zope.configuration.xmlconfig.XMLConfig( 'configure.zcml', z3c.ptcompat)() super(HTMLTests, self).setUp() if __name__ == '__main__': unittest.TextTestRunner().run(test_suite()) z3c.ptcompat-1.0.1/src/z3c/ptcompat/engine.py0000664000177100020040000000314311716773020022125 0ustar menesismenesis00000000000000############################################################################## # # Copyright (c) 2005 Zope Foundation 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. # ############################################################################## __docformat__ = "reStructuredText" from zope.interface import implements from zope.interface import classProvides from zope.pagetemplate.interfaces import IPageTemplateEngine from zope.pagetemplate.interfaces import IPageTemplateProgram from z3c.pt.pagetemplate import PageTemplate as ChameleonPageTemplate from chameleon.tal import RepeatDict class Program(object): implements(IPageTemplateProgram) classProvides(IPageTemplateEngine) def __init__(self, template): self.template = template def __call__(self, context, macros, tal=True, **options): if tal is False: return self.template.body context.vars['repeat'] = RepeatDict(context.repeat_vars) return self.template.render(**context.vars) @classmethod def cook(cls, source_file, text, engine, content_type): template = ChameleonPageTemplate( text, filename=source_file, keep_body=True, ) return cls(template), template.macros z3c.ptcompat-1.0.1/src/z3c/ptcompat/__init__.py0000664000177100020040000000124111716773020022414 0ustar menesismenesis00000000000000############################################################################## # # Copyright (c) 2005 Zope Foundation 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. # ############################################################################## __docformat__ = "reStructuredText" z3c.ptcompat-1.0.1/src/z3c/__init__.py0000664000177100020040000000036411716773020020572 0ustar menesismenesis00000000000000# 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__) z3c.ptcompat-1.0.1/tools/0000775000177100020040000000000011716773050016333 5ustar menesismenesis00000000000000z3c.ptcompat-1.0.1/tools/update.py0000775000177100020040000000673511716773020020202 0ustar menesismenesis00000000000000#!/usr/bin/python2.5 import os import re import sys import difflib import optparse import subprocess parser = optparse.OptionParser() parser.add_option("-n", "--dry-run", action="store_true", dest="dry_run", default=False, help="Don't actually make any changes.") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="Verbose output.") re_vptf_sub = ( re.compile( r'^from zope\.app\.pagetemplate(\.viewpagetemplatefile)? import ViewPageTemplateFile$', re.M), r'from z3c.ptcompat import ViewPageTemplateFile') re_ptf_sub = ( re.compile( r'^from zope\.pagetemplate(\.pagetemplatefile)? import PageTemplateFile$', re.M), r'from z3c.ptcompat import PageTemplateFile') def log(msg): for line in msg.split('\n'): print ">>> %s" % line def status(msg): for line in msg.split('\n'): print " %s" % line def main(options, args): if options.dry_run: status("Warning: Dry run---no changes will be made to the file-system.") path = os.getcwd() status("Working directory: %s" % path) log("Analyzing source-code...") registry = {} count = 0 for arg, dirname, names in os.walk(path): for name in names: base, ext = os.path.splitext(name) if ext != '.py': continue if options.verbose and count > 0 and count % 500 == 0: status("Processed %d files." % count) count += 1 filename = os.path.join(arg, name) diff = create_diff(filename) if diff is not None: registry[filename] = diff status("%d files processed" % count) log("Updating import-statements in %d files..." % len(registry.keys())) if options.dry_run: queue = ['patch', '-p0', '--dry-run'], else: queue = ['patch', '-p0', '--dry-run'], ['patch', '-p0'] for args in queue: if options.verbose: args.append('--verbose') else: args.append('--quiet') proc = subprocess.Popen( " ".join(args), shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, ) diffs = [] for filename, body in registry.iteritems(): if options.verbose: changes = body.count('+++ ') status("%s (%d %s)." % ( filename, changes, 'changes' if (changes > 1) else 'change')) diffs.append(body) if not diffs: break output, err = proc.communicate("\n".join(diffs)+'\n') if proc.returncode != 0: map(status, output.split('\n')) status("An error occurred while applying patches.") break else: status("Succesfully patched files.") if '--dry-run' in args: status("No files were changed.") sys.exit(proc.returncode) def create_diff(filename): original = open(filename).read() new = original # process regular expression substitutions for exp, replacement in (re_vptf_sub, re_ptf_sub): new = exp.sub(replacement, new) if original != new: return "\n".join(map(str.rstrip, difflib.unified_diff( original.split('\n'), new.split('\n'), filename, filename))) if __name__ == "__main__": main(*parser.parse_args()) z3c.ptcompat-1.0.1/buildout.cfg0000664000177100020040000000024711716773020017503 0ustar menesismenesis00000000000000[buildout] develop = . parts = test versions = versions [versions] z3c.pt = 2.1.4 Chameleon = 2.4.5 [test] recipe = zc.recipe.testrunner eggs = z3c.ptcompat [test] z3c.ptcompat-1.0.1/README.txt0000664000177100020040000000066611716773020016676 0ustar menesismenesis00000000000000Overview ======== This package provides a page template engine implementation based on Chameleon. It plugs into the `zope.pagetemplate `_ package and has an explicit dependency on this package. You can use the package to replace Zope's reference template engine with Chameleon in an application based on the Zope Toolkit. Configuration ------------- The package is configured via ZCML. z3c.ptcompat-1.0.1/setup.cfg0000664000177100020040000000007311716773050017014 0ustar menesismenesis00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 z3c.ptcompat-1.0.1/LICENSE.txt0000664000177100020040000000402611716773020017015 0ustar menesismenesis00000000000000Zope Public License (ZPL) Version 2.1 A copyright notice accompanies this license document that identifies the copyright holders. This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.