[Zope-Checkins] CVS: Zope - setup.py:1.22
Fred L. Drake, Jr.
fred@zope.com
Wed, 26 Mar 2003 13:23:48 -0500
Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv19229
Added Files:
setup.py
Log Message:
Move the distutils setup.py script to the usual location.
=== Zope/setup.py 1.21 => 1.22 === (967/1067 lines abridged)
--- /dev/null Wed Mar 26 13:23:48 2003
+++ Zope/setup.py Wed Mar 26 13:23:17 2003
@@ -0,0 +1,1064 @@
+#! /usr/bin/env python
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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
+#
+##############################################################################
+
+"""
+Distutils setup for Zope
+
+ In-place building
+
+ This builds extension modules in-place, much like build_extensions.py
+ does. Use 'setup.py' like this::
+
+ python setup.py build_ext -i
+
+ Installation
+
+ This builds extension modules, compiles python modules, and installs
+ everything needed to support Zope instances in the directory of
+ your choosing. For example, to use '/usr/local/lib/zope'::
+
+ python setup.py install \
+ --home=/usr/local/lib/zope \
+ --install-platlib=/usr/local/lib/zope \
+ --install-purelib=/usr/local/lib/zope
+
+ Note that with this method, all packages and scripts (including
+ ZServer and z2.py) go in the same directory as Zope modules, which
+ are distributed in lib/python. You will need to set both ZOPE_HOME
+ and SOFTWARE_HOME to point to your destination directory in order
+ for Zope to work in this configuration.
+"""
+
+import glob
+import os
+import sys
+
+import distutils.core
[-=- -=- -=- 967 lines omitted -=- -=- -=-]
+ author=AUTHOR,
+
+ packages=setup_info.get('packages', []),
+ data_files=setup_info.get('data_files', []),
+ headers=setup_info.get('headers', []),
+ ext_modules=setup_info.get('ext_modules', []),
+ scripts=setup_info.get('scripts', []),
+ distclass=ZopeDistribution,
+ )
+
+distutils.core.setup(
+ name='Zope',
+ author=AUTHOR,
+ py_modules=setup_info.get('py_modules', []),
+ distclass=ZopeDistribution,
+ )
+
+# The rest of these modules live in the root of the source tree
+os.chdir(BASE_DIR)
+
+def skel_visit(skel, dirname, names):
+ if "CVS" in names:
+ names.remove("CVS")
+ L = []
+ for name in names:
+ if os.path.isfile(os.path.join(dirname, name)):
+ L.append("%s/%s" % (dirname, name))
+ skel.append(("../../" + dirname, L))
+
+installed_data_files = [
+ ["../../doc", ['doc/*.txt']],
+ ["../../doc/changenotes", ['doc/changenotes/*.stx']],
+ ["../../import", ['import/*.zexp']],
+ # These may change in the future:
+ ["../../utilities", ['utilities/README.txt',
+ 'utilities/check_catalog.py',
+ 'utilities/load_site.py',
+ 'utilities/requestprofiler.py']],
+ ]
+os.path.walk("skel", skel_visit, installed_data_files)
+
+distutils.core.setup(
+ name='Zope',
+ author=AUTHOR,
+
+ data_files=installed_data_files,
+ scripts=["bin/runzope.py", "bin/zopectl.py",
+ "bin/mkzeoinstance", "bin/mkzopeinstance"],
+ distclass=ZopeDistribution,
+ )