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