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