Skip to content

Instantly share code, notes, and snippets.

@schwehr
Created April 1, 2014 13:20
Show Gist options
  • Save schwehr/9913835 to your computer and use it in GitHub Desktop.
Save schwehr/9913835 to your computer and use it in GitHub Desktop.
first couple changes to start cheetah towards python 3.4
diff --git a/SetupConfig.py b/SetupConfig.py
index 5620416..60bfb8d 100644
--- a/SetupConfig.py
+++ b/SetupConfig.py
@@ -14,8 +14,8 @@ packages = ['Cheetah',
'Cheetah.Tools',
'Cheetah.Utils',
]
-classifiers = [line.strip() for line in '''\
- #Development Status :: 4 - Beta
+classifiers = [line.strip() for line in
+''' #Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: System Administrators
@@ -29,7 +29,6 @@ classifiers = [line.strip() for line in '''\
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: User Interfaces
Topic :: Text Processing'''.splitlines() if not line.strip().startswith('#')]
-del line
package_dir = {'Cheetah':'cheetah'}
diff --git a/SetupTools.py b/SetupTools.py
index 6608d17..31732f3 100644
--- a/SetupTools.py
+++ b/SetupTools.py
@@ -47,13 +47,13 @@ class mod_build_ext(build_ext):
def run(self):
try:
build_ext.run(self)
- except DistutilsPlatformError, x:
+ except DistutilsPlatformError as x:
raise BuildFailed(x)
def build_extension(self, ext):
try:
build_ext.build_extension(self, ext)
- except ext_errors, x:
+ except ext_errors as x:
raise BuildFailed(x)
@@ -156,7 +156,7 @@ def run_setup(configurations):
# Invoke distutils setup
try:
setup(**kws)
- except BuildFailed, x:
+ except BuildFailed as x:
print("One or more C extensions failed to build.")
print("Details: %s" % x)
if os.environ.get('CHEETAH_C_EXTENSIONS_REQUIRED'):
diff --git a/cheetah/__init__.py b/cheetah/__init__.py
index 910574b..5f12ab2 100644
--- a/cheetah/__init__.py
+++ b/cheetah/__init__.py
@@ -17,4 +17,4 @@ Subscribe at
http://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
'''
-from Version import *
+from .Version import *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment