setup.py 1.46 KB
Newer Older
1
#############################################################################
2
#
3
# Copyright (c) 2005 Zope Corporation and Contributors.
4 5 6
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
Jim Fulton's avatar
Jim Fulton committed
7
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
8 9 10 11 12 13 14 15
# 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.
#
##############################################################################

import os
16 17 18 19 20 21
import site
import sys

here = os.path.dirname(os.path.abspath(__file__))
buildsupport = os.path.join(here, "buildsupport")

22 23
# Add 'buildsupport' to sys.path and process *.pth files from 'buildsupport':
last = len(sys.path)
24
site.addsitedir(buildsupport)
25 26 27 28 29 30
if len(sys.path) > last:
    # Move all appended directories to the start.
    # Make sure we use ZConfig shipped with the distribution
    new = sys.path[last:]
    del sys.path[last:]
    sys.path[:0] = new
31

32 33
import zpkgsetup.package
import zpkgsetup.publication
Fred Drake's avatar
Fred Drake committed
34
import zpkgsetup.setup
35

36
# Note that release.py must be able to recognize the VERSION line.
Tim Peters's avatar
Tim Peters committed
37
VERSION = "3.6.0a3"
38

39
context = zpkgsetup.setup.SetupContext(
40
    "ZODB", VERSION, __file__)
41

Fred Drake's avatar
Fred Drake committed
42
context.load_metadata(
43 44 45
    os.path.join(here,
                 zpkgsetup.publication.PUBLICATION_CONF))

46
context.walk_packages("src")
Fred Drake's avatar
Fred Drake committed
47
context.setup()