setup.py revision 2339
290N/A# The contents of this file are subject to the terms of the 290N/A# Common Development and Distribution License (the "License"). 290N/A# You may not use this file except in compliance with the License. 290N/A# See the License for the specific language governing permissions 290N/A# and limitations under the License. 290N/A# When distributing Covered Code, include this CDDL HEADER in each 290N/A# If applicable, add the following below this CDDL HEADER, with the 290N/A# fields enclosed by brackets "[]" replaced with your own identifying 290N/A# information: Portions Copyright [yyyy] [name of copyright owner] 3158N/A# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 1660N/A# 3rd party software required for the build 395N/A# Unbuffer stdout and stderr. This helps to ensure that subprocess output 430N/A# is properly interleaved with output from this program. 395N/A# A list of source, destination tuples of modules which should be hardlinked 849N/A# together if the os supports it and otherwise copied. 2867N/A# Runs lint on the extension module source code 2523N/A # Make string shell-friendly 2310N/A # Insert tests directory onto sys.path so any custom checkers 3237N/A # assumes pylint is accessible on the sys.path 2310N/A # For some reason, the load-plugins option, when used in the 2310N/A # rcfile, does not work, so we put it here instead, to load 2852N/A # Unfortunately, pylint seems pretty fragile and will crash if 2852N/A # we try to run it over all the current pkg source. Hence for 2852N/A # now we only run it over a subset of the source. As source 2852N/A # files are made pylint clean they should be added to the 2852N/A# Runs lint on the extension module source code 2508N/A # Make string shell-friendly 3053N/A # assumes lint is on the $PATH 2339N/A# Runs both C and Python lint 2339N/A # Make string shell-friendly 2828N/A # PRIVATE_BUILD set in the environment tells us to put the build 2828N/A # directory into the .pyc files, rather than the final 2828N/A # This is used when installing scripts, below, but it isn't a 2828N/A # standard distutils variable. 2828N/A At the end of the install function, we need to rename some files 2828N/A because distutils provides no way to rename files as they are 2828N/A placed in their install locations. 2828N/A Also, make sure that cherrypy and other external dependencies 3253N/A # to ensure that this builds and runs on older 290N/A # Remove some bits that we're not going to package, but be sure 290N/A # not to complain if we try to remove them twice. 3026N/A "Please retrieve the file " \
3026N/A # remove a partial download or error message from proxy 290N/A # extractall doesn't exist until python 2.5 591N/A # If there are patches, apply them now. 506N/A """ Run python's compiler over the file, and discard the results. 506N/A Arrange to generate an exception if the file does not compile. 395N/A This is needed because distutil's own use of pycompile (in the 2535N/A distutils.utils module) is broken, and doesn't stop on error. """ 2561N/A # Assume it's a tuple of (filename, lineno, col, code) 2561N/A # override the build_module method to do VERSION substitution on pkg/__init__.py 2561N/A # Grab the previously-built version out of the build 2535N/A # If the versions haven't changed, there's no need to 2535N/A print "doing version substitution: ", v
2535N/A # Will raise a DistutilsError on failure. 2688N/A # list of options stored in initialize_options below. The first entry 3158N/A # in each tuple must be the exact name of a member variable. 3177N/A (
"archivedir=",
'a',
"archive failed tests <dir>"),
3143N/A (
"baselinefile=",
'b',
"baseline file <file>"),
3158N/A (
"coverage",
"c",
"collect code coverage data"),
849N/A (
"genbaseline",
'g',
"generate test baseline"),
2688N/A (
"only=",
"o",
"only <regex>"),
2688N/A (
"parseable",
'p',
"parseable output"),
290N/A (
"port=",
"z",
"lowest port to start a depot on"),
2535N/A (
"timing",
"t",
"timing file <file>"),
2535N/A (
"verbosemode",
'v',
"run tests in verbose mode"),
2597N/A (
"stoponerr",
'x',
"stop when a baseline mismatch occurs"),
2597N/A (
"debugoutput",
'd',
"emit debugging output"),
2597N/A (
"showonexpectedfail",
'f',
2535N/A "show all failure info, even for expected fails"),
2535N/A (
"startattest=",
's',
"start at indicated test"),
3246N/A (
"pkg=",
None,
"Component package name")
2688N/A print "-D SOURCE_VER=%s -D PKG_VER=%s " \
2688N/A# These are set to real values based on the platform, down below 2688N/A# all builds of IPS should have manpages 3143N/A # Solaris-specific extensions are added here 2826N/A # Unix platforms which the elf extension has been ported to 2826N/A # are specified here, so they are built automatically 2826N/A # Solaris has built-in md library and Solaris-specific arch extension 2826N/A # All others use OpenSSL and cross-platform arch module