summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authortavis_rudd <tavis_rudd>2001-10-10 06:59:45 +0000
committertavis_rudd <tavis_rudd>2001-10-10 06:59:45 +0000
commitc7d48b5be6d3fefb089fb7b5bfa1942ad136dbf3 (patch)
tree1c5eceda36902cdf2a7008af52f47fcf3ad9db89 /setup.py
parentbf8408daf1f1a27e0f8bd69eb2acaa8d6e1eb01d (diff)
downloadpython-cheetah-c7d48b5be6d3fefb089fb7b5bfa1942ad136dbf3.tar.gz
further merges of the DEVEL_BRANCH code
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py109
1 files changed, 5 insertions, 104 deletions
diff --git a/setup.py b/setup.py
index 2f06a36..3b7e18a 100755
--- a/setup.py
+++ b/setup.py
@@ -1,110 +1,11 @@
#!/usr/bin/env python
-# $Id: setup.py,v 1.8 2001/10/10 06:18:30 tavis_rudd Exp $
-"""A setup module for the Cheetah package, based on the disutils module
+# $Id: setup.py,v 1.10 2001/10/10 06:59:45 tavis_rudd Exp $
-Meta-Data
-==========
-Author: Tavis Rudd <tavis@calrudd.com>
-License: This software is released for unlimited distribution under the
- terms of the Python license.
-Version: $Revision: 1.8 $
-Start Date: 2001/03/30
-Last Revision Date: $Date: 2001/10/10 06:18:30 $
-"""
-__author__ = "Tavis Rudd <tavis@calrudd.com>"
-__version__ = "$Revision: 1.8 $"[11:-2]
+import SetupTools
+import SetupConfig
+configurations = (SetupConfig,)
+SetupTools.run_setup( configurations )
-##################################################
-## DEPENDENCIES ##
-from distutils.core import setup, Extension
-from distutils.command.sdist import sdist
-
-import os
-import os.path
-import re
-
-##################################################
-## CONSTANTS & GLOBALS ##
-
-True = (1==1)
-False = (0==1)
-
-
-##################################################
-## CLASSES ##
-
-class sdist_docs(sdist):
- """a setup command that will rebuild Users Guide"""
- def run(self):
- try:
- from src.Version import version
-
- currentDir = os.getcwd()
- os.chdir(os.path.join(currentDir,'docs','src'))
- fp = open('users_guide.tex','r')
- originalTexCode = fp.read()
- fp.close()
-
- newTexCode = re.sub(r'(?<=\\release\{)[0-9\.]*',str(version), originalTexCode)
-
- fp = open('users_guide.tex','w')
- fp.write(newTexCode)
- fp.close()
-
- os.system('make -f Makefile')
- os.chdir(currentDir)
- except:
- print "The sdist_docs command couldn't rebuild the Users Guide"
- os.chdir(currentDir)
-
- sdist.run(self)
-
-
-##################################################
-## if run from the command line ##
-
-if __name__ == '__main__':
- from src.Version import version
-
- from src import __doc__
- README = open('README','w')
- README.write(__doc__)
- README.close()
- synopsis = __doc__.split('\n')[0]
-
- if os.name == 'posix':
- ext_modules=[Extension("Cheetah/_namemapper", ["src/_namemapper.c"]),
- Extension("Cheetah/Foo", ["src/Foo.c"])]
- else:
- ext_modules=[]
-
- packages = ['Cheetah',
- 'Cheetah.Templates',
- 'Cheetah.Plugins',
- 'Cheetah.Macros',
- 'Cheetah.Tests',
- 'Cheetah.Tools',
- ]
-
- setup (name = "Cheetah",
- author = "The Cheetah Development Team",
- author_email = "cheetahtemplate-devel@sourceforge.net",
- version = version,
- license = "The Python License",
- description = synopsis,
- long_description = __doc__,
- maintainer = "Tavis Rudd",
- url = "http://www.cheetahtemplate.org",
- packages = packages,
- package_dir = {'Cheetah':'src'},
-
- ext_modules=ext_modules,
-
- scripts = ['bin/cheetah-compile',],
-
- cmdclass = { 'sdist_docs' : sdist_docs },
- )
-