setup.py revision 1505
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] 3339N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 20N/A# Use is subject to license terms. 382N/A# 3rd party software required for the build 0N/APOHASH =
'bd072fef8eb36241852d25a9161282a051f0a63e' 812N/A# No hash, since we always fetch the latest 466N/A# Unbuffer stdout and stderr. This helps to ensure that subprocess output 466N/A# is properly interleaved with output from this program. 429N/A 'pkg.client.transport',
382N/A# Runs the test suite with the code coverage suite (figleaf) turned on, and 3194N/A# outputs a coverage report. 3158N/A# TODO: Make the cov report format an option (html, ast, cov, etc) 812N/A # Run the test suite with coverage enabled 858N/A# Runs lint on the extension module source code 2962N/A # Make string shell-friendly 3194N/A # assumes lint is on the $PATH 2816N/A # Insert tests directory onto sys.path so any custom checkers 3194N/A # assumes pylint is accessible on the sys.path 2816N/A # specify the filenames of the scripts, in addition 2816N/A # to the package names themselves 589N/A # For some reason, the load-plugins option, when used in the 589N/A # rcfile, does not work, so we put it here instead, to load 3194N/A # PRIVATE_BUILD set in the environment tells us to put the build 589N/A # directory into the .pyc files, rather than the final 765N/A # installation directory. 1968N/A # This is used when installing scripts, below, but it isn't a 157N/A # standard distutils variable. 2028N/A At the end of the install function, we need to rename some files 429N/A because distutils provides no way to rename files as they are 429N/A placed in their install locations. 429N/A Also, make sure that cherrypy and other external dependencies 1968N/A # Take cacerts in cacert_dir and install them in 1968N/A # proto-area-relative cacert_install_dir 3194N/A # to ensure that this builds and runs on older 873N/A # Remove some bits that we're not going to package, but be sure 873N/A # not to complain if we try to remove them twice. 1968N/A # Call openssl to create hash symlink 1968N/A cmd = [
"openssl",
"x509",
"-noout",
"-hash",
"-in",
2515N/A "Please retrieve the file " \
1968N/A # remove a partial download or error message from proxy 2230N/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. 3273N/A Arrange to generate an exception if the file does not compile. 3273N/A This is needed because distutil's own use of pycompile (in the 3273N/A distutils.utils module) is broken, and doesn't stop on error. """ 1836N/A # override the build_module method to do VERSION substitution on pkg/__init__.py 812N/A # Grab the previously-built version out of the build 1968N/A # If the versions haven't changed, there's no need to 3234N/A print "doing version substitution: ", v
3339N/A # Will raise a DistutilsError on failure. 3339N/A # list of options stored in initialize_options below. The first entry 466N/A # in each tuple must be the exact name of a member variable. 1968N/A (
"genbaseline",
'g',
"generate test baseline"),
858N/A (
"parseable",
'p',
"parseable output"),
858N/A (
"timing",
"t",
"timing file <file>"),
858N/A (
"baselinefile=",
'b',
"baseline file <file>"),
858N/A (
"only=",
"o",
"only <regex>")]
3158N/A# These are set to real values based on the platform, down below 466N/A# all builds of IPS should have manpages 1968N/A # Solaris-specific extensions are added here 2028N/A # Unix platforms which the elf extension has been ported to 2028N/A # are specified here, so they are built automatically 2028N/A # Solaris has built-in md library and Solaris-specific arch extension 2515N/A # All others use OpenSSL and cross-platform arch module