Commit 7162c0e2 authored by Fred Drake's avatar Fred Drake

Change the way the specialized distutils distribution class is knit

together; this matches the way the new-install-branch does this.
parent c20fabdb
...@@ -68,7 +68,7 @@ from distutils.command.install import install ...@@ -68,7 +68,7 @@ from distutils.command.install import install
from distutils.command.install_data import install_data from distutils.command.install_data import install_data
from distutils.util import convert_path from distutils.util import convert_path
class install_data(install_data): class ZopeInstallData(install_data):
def finalize_options(self): def finalize_options(self):
self.set_undefined_options('install', self.set_undefined_options('install',
('install_purelib', 'install_dir'), ('install_purelib', 'install_dir'),
...@@ -114,7 +114,7 @@ class install_data(install_data): ...@@ -114,7 +114,7 @@ class install_data(install_data):
(out, _) = self.copy_file(g, dir) (out, _) = self.copy_file(g, dir)
self.outfiles.append(out) self.outfiles.append(out)
class install(install): class ZopeInstall(install):
def finalize_unix (self): def finalize_unix (self):
if self.install_base is not None or self.install_platbase is not None: if self.install_base is not None or self.install_platbase is not None:
if ((self.install_lib is None and if ((self.install_lib is None and
...@@ -146,6 +146,12 @@ class install(install): ...@@ -146,6 +146,12 @@ class install(install):
self.install_platbase = self.exec_prefix self.install_platbase = self.exec_prefix
self.select_scheme("unix_prefix") self.select_scheme("unix_prefix")
class ZopeDistribution(distutils.core.Distribution):
def __init__(self, attrs):
distutils.core.Distribution.__init__(self, attrs)
self.cmdclass["install"] = ZopeInstall
self.cmdclass["install_data"] = ZopeInstallData
AUTHOR = 'Zope Corporation and Contributors' AUTHOR = 'Zope Corporation and Contributors'
ZOPE_ROOT = os.path.abspath(os.getcwd()) ZOPE_ROOT = os.path.abspath(os.getcwd())
EXTENSIONCLASS_ROOT = os.path.join(ZOPE_ROOT, 'lib', 'Components', 'ExtensionClass') EXTENSIONCLASS_ROOT = os.path.join(ZOPE_ROOT, 'lib', 'Components', 'ExtensionClass')
...@@ -941,15 +947,14 @@ distutils.core.setup( ...@@ -941,15 +947,14 @@ distutils.core.setup(
data_files=setup_info.get('data_files', []), data_files=setup_info.get('data_files', []),
headers=setup_info.get('headers', []), headers=setup_info.get('headers', []),
ext_modules=setup_info.get('ext_modules', []), ext_modules=setup_info.get('ext_modules', []),
distclass=ZopeDistribution,
cmdclass={'install': install, 'install_data': install_data}
) )
distutils.core.setup( distutils.core.setup(
name='Zope', name='Zope',
author=AUTHOR, author=AUTHOR,
py_modules=setup_info.get('py_modules', []), py_modules=setup_info.get('py_modules', []),
cmdclass={'install': install, 'install_data': install_data} distclass=ZopeDistribution,
) )
setup_info = {} setup_info = {}
...@@ -1013,13 +1018,12 @@ distutils.core.setup( ...@@ -1013,13 +1018,12 @@ distutils.core.setup(
data_files=setup_info.get('data_files', []), data_files=setup_info.get('data_files', []),
headers=setup_info.get('headers', []), headers=setup_info.get('headers', []),
ext_modules=setup_info.get('ext_modules', []), ext_modules=setup_info.get('ext_modules', []),
distclass=ZopeDistribution,
cmdclass={'install': install, 'install_data': install_data}
) )
distutils.core.setup( distutils.core.setup(
name='Zope', name='Zope',
author=AUTHOR, author=AUTHOR,
py_modules=setup_info.get('py_modules', []), py_modules=setup_info.get('py_modules', []),
cmdclass={'install': install, 'install_data': install_data} distclass=ZopeDistribution,
) )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment