summaryrefslogtreecommitdiff
path: root/SetupTools.py
diff options
context:
space:
mode:
authortavis_rudd <tavis_rudd>2006-01-01 23:40:54 +0000
committertavis_rudd <tavis_rudd>2006-01-01 23:40:54 +0000
commit1c92ffd43492980e175e76185c168977968f2484 (patch)
tree8bed7213cd36d431577b7eca023a6cb6297f6efc /SetupTools.py
parent4eac1e3ca3748dd8651c91edb4b725d985761240 (diff)
downloadpython-cheetah-1c92ffd43492980e175e76185c168977968f2484.tar.gz
added optional support for pje's setuptools
Diffstat (limited to 'SetupTools.py')
-rw-r--r--SetupTools.py34
1 files changed, 14 insertions, 20 deletions
diff --git a/SetupTools.py b/SetupTools.py
index a74206f..21dfb5d 100644
--- a/SetupTools.py
+++ b/SetupTools.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# $Id: SetupTools.py,v 1.7 2005/08/17 18:45:21 tavis_rudd Exp $
+# $Id: SetupTools.py,v 1.8 2006/01/01 23:40:54 tavis_rudd Exp $
"""Some tools for extending and working with distutils
CREDITS: This module borrows code and ideas from M.A. Lemburg's excellent setup
@@ -8,33 +8,29 @@ tools for the mxBase package.
"""
__author__ = "Tavis Rudd <tavis@damnsimple.com>"
-__version__ = "$Revision: 1.7 $"[11:-2]
-
-##################################################
-## DEPENDENCIES ##
-
-from distutils.core import setup
-## this bit is experimental:
-#try:
-# # use http://peak.telecommunity.com/DevCenter/setuptools if it's installed
-# # requires Py >=2.3
-# from setuptools import setup
-#except ImportError:
-# from distutils.core import setup
-
-from distutils.core import Command
-from distutils.command.install_data import install_data
+__version__ = "$Revision: 1.8 $"[11:-2]
import os
from os import listdir
import os.path
from os.path import exists, isdir, isfile, join, splitext
-
import types
import glob
import string
import traceback
+from distutils.core import setup
+if 'CHEETAH_USE_SETUPTOOLS' in os.environ:
+ try:
+ # use http://peak.telecommunity.com/DevCenter/setuptools if it's installed
+ # requires Py >=2.3
+ from setuptools import setup
+ except ImportError:
+ from distutils.core import setup
+
+from distutils.core import Command
+from distutils.command.install_data import install_data
+
#imports from Cheetah ...
from src.FileUtils import findFiles
@@ -42,7 +38,6 @@ from src.FileUtils import findFiles
## CLASSES ##
class mod_install_data(install_data):
-
"""A modified version of the disutils install_data command that allows data
files to be included directly in the installed Python package tree.
"""
@@ -106,7 +101,6 @@ class mod_install_data(install_data):
## FUNCTIONS ##
def run_setup(configurations):
-
""" Run distutils setup.
The parameters passed to setup() are extracted from the list of modules,