setup.py revision 1715
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] 814N/A# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 20N/A# Use is subject to license terms. 382N/A# 3rd party software required for the build 382N/A# No hash, since we always fetch the latest 1431N/A# Unbuffer stdout and stderr. This helps to ensure that subprocess output 1191N/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 'pkg.client.transport',
858N/A# Runs lint on the extension module source code 1431N/A # Make string shell-friendly 1431N/A # assumes lint is on the $PATH 1191N/A # Insert tests directory onto sys.path so any custom checkers 1191N/A # assumes pylint is accessible on the sys.path 1431N/A # specify the filenames of the scripts, in addition 1431N/A # to the package names themselves 1431N/A # For some reason, the load-plugins option, when used in the 1431N/A # rcfile, does not work, so we put it here instead, to load 765N/A # PRIVATE_BUILD set in the environment tells us to put the build 765N/A # directory into the .pyc files, rather than the final 765N/A # installation directory. 765N/A # This is used when installing scripts, below, but it isn't a 765N/A # standard distutils variable. 157N/A At the end of the install function, we need to rename some files 382N/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 429N/A for e
in [
".py",
".pyc"]:
812N/A # make scripts executable 812N/A # Take cacerts in cacert_dir and install them in 812N/A # proto-area-relative cacert_install_dir 873N/A # to ensure that this builds and runs on older 873N/A # nevada builds, before openssl moved out of /usr/sfw. 1475N/A # Remove some bits that we're not going to package, but be sure 975N/A # not to complain if we try to remove them twice. 386N/A # Call openssl to create hash symlink 812N/A cmd = [
"openssl",
"x509",
"-noout",
"-hash",
"-in",
812N/A "Please retrieve the file " \
812N/A # remove a partial download or error message from proxy 812N/A # extractall doesn't exist until python 2.5 812N/A # If there are patches, apply them now. 466N/A "install failed and returned %d." %
ret 1431N/A """ Run python's compiler over the file, and discard the results. 1431N/A Arrange to generate an exception if the file does not compile. 1431N/A This is needed because distutil's own use of pycompile (in the 1431N/A distutils.utils module) is broken, and doesn't stop on error. """ 1431N/A # override the build_module method to do VERSION substitution on pkg/__init__.py 1431N/A # Grab the previously-built version out of the build 1542N/A # If the versions haven't changed, there's no need to 1542N/A print "doing version substitution: ", v
1431N/A # Will raise a DistutilsError on failure. 451N/A # list of options stored in initialize_options below. The first entry 451N/A # in each tuple must be the exact name of a member variable. 451N/A (
"archivedir=",
'a',
"archive failed tests <dir>"),
814N/A (
"baselinefile=",
'b',
"baseline file <file>"),
1431N/A (
"coverage",
"c",
"collect code coverage data"),
466N/A (
"genbaseline",
'g',
"generate test baseline"),
873N/A (
"only=",
"o",
"only <regex>"),
812N/A (
"parseable",
'p',
"parseable output"),
812N/A (
"timing",
"t",
"timing file <file>"),
873N/A (
"verbosemode",
'v',
"run tests in verbose mode"),
812N/A (
"stoponerr",
'x',
"stop when a baseline mismatch occurs"),
(
"debugoutput",
'd',
"emit debugging output"),
(
"show_on_expected_fail",
'f',
"show all failure info, even for expected fails"),
(
"startattest=",
's',
"start at indicated test"),
# Reconstruct the cmdline and send that to run.py # These are set to real values based on the platform, down below if osname in (
"sunos",
"linux",
"darwin"):
# 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