components/python/python34/Makefile
author pkidd <patrick.kidd@oracle.com>
Fri, 24 Feb 2017 07:31:04 -0800
branchs11u3-sru
changeset 7693 789db572fc03
parent 5806 b6d54fc7632a
permissions -rw-r--r--
build metadata for S11.3SRU18.3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
#
3791
1504f7bde5fd 20334734 several Python 3.4 tests trigger core dumps on sparc
John Beck <John.Beck@Oracle.COM>
parents: 3789
diff changeset
    23
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
include ../../../make-rules/shared-macros.mk
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_NAME=		Python
3876
da37433d5103 20605341 update Python to 3.4.3
John Beck <John.Beck@Oracle.COM>
parents: 3795
diff changeset
    29
COMPONENT_VERSION=	3.4.3
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://python.org/
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	\
3876
da37433d5103 20605341 update Python to 3.4.3
John Beck <John.Beck@Oracle.COM>
parents: 3795
diff changeset
    34
    sha256:b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
3876
da37433d5103 20605341 update Python to 3.4.3
John Beck <John.Beck@Oracle.COM>
parents: 3795
diff changeset
    36
COMPONENT_SIG_URL=	$(COMPONENT_ARCHIVE_URL).asc
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
COMPONENT_BUGDB=	utility/python
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    38
3876
da37433d5103 20605341 update Python to 3.4.3
John Beck <John.Beck@Oracle.COM>
parents: 3795
diff changeset
    39
TPNO=			21686
3779
d01825f968e9 19004593 update Python to 3.4.1
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    40
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
    41
include $(WS_MAKE_RULES)/prep.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
    42
include $(WS_MAKE_RULES)/configure.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
    43
include $(WS_MAKE_RULES)/ips.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
    44
include $(WS_MAKE_RULES)/lint-libraries.mk
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
# Need to preserve timestamp for Grammar files.  If the pickle files are older,
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
# Python will try to rebuild them.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    51
# We patch auto* files, so regenerate headers and configure
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    52
COMPONENT_PREP_ACTION = \
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    53
	(cd $(@D) ; autoheader ; autoconf)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    54
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    55
# The DTrace patch needs this file to be mode 0755.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    56
COMPONENT_PRE_BUILD_ACTION=($(CHMOD) +x \
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    57
    $(SOURCE_DIR)/Include/pydtrace_offsets.sh)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    58
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    60
# python-config
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    61
CC +=	$(CFLAGS)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    63
C99MODE=
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    64
CPPFLAGS +=	-IPython
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    65
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    66
# to find the ncurses headers
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    67
CPPFLAGS +=	-I/usr/include/ncurses
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    68
# enable large files how they did in JDS
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    69
CPPFLAGS +=	-D_LARGEFILE64_SOURCE
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    70
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    71
# libffi for _ctypes
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    72
CPPFLAGS +=	$(shell pkg-config --cflags-only-I libffi)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    73
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    74
# because python links with $(CC) ... $(LDFLAGS) ...
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    75
LDFLAGS =	$(CC_BITS) $(CC_PIC)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    76
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    77
# build pic
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    78
CFLAGS +=	$(CC_PIC)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    79
3791
1504f7bde5fd 20334734 several Python 3.4 tests trigger core dumps on sparc
John Beck <John.Beck@Oracle.COM>
parents: 3789
diff changeset
    80
# 16-byte memory alignment + interpretation of non-alignment prevents SIGBUS.
1504f7bde5fd 20334734 several Python 3.4 tests trigger core dumps on sparc
John Beck <John.Beck@Oracle.COM>
parents: 3789
diff changeset
    81
studio_ALIGN.sparc.64 = -xmemalign=16i
1504f7bde5fd 20334734 several Python 3.4 tests trigger core dumps on sparc
John Beck <John.Beck@Oracle.COM>
parents: 3789
diff changeset
    82
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    83
# The python build is profile-guided for studio; to see the benefits of that,
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    84
# Python must be compiled with -xO5 and a different build target must be used.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    85
# Use of xprofile requires that the same options be used during compilation and
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    86
# linking.  The targets chosen are based on Solaris 11 minimum supported system
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    87
# requirements.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    88
COMPONENT_BUILD_TARGETS = profile-opt
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    89
XPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    90
PYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    91
PYFLAGS.sparc =
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    92
CFLAGS += -xO5 $(PYFLAGS.$(MACH))
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    93
LDFLAGS += -xO5 $(PYFLAGS.$(MACH))
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    94
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    95
# Python puts its header files in a special place.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    96
LINT_FLAGS +=	-I$(SOURCE_DIR)/Include
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    97
3793
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
    98
# PYTHONPATH in the environment can be harmful, but setting it to empty via
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
    99
# _INSTALL_ENV causes problems too, so just ignore the entire environment.
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   100
# Because of this, we need to specify PATH in multiple places below.
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   101
ENV +=				-i
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   102
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   103
CONFIGURE_ENV +=		PATH="$(PATH)"
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   104
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   105
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   106
CONFIGURE_OPTIONS  +=		--enable-shared
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   107
CONFIGURE_OPTIONS  +=		--with-dtrace
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   108
CONFIGURE_OPTIONS  +=		--with-system-expat
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   109
CONFIGURE_OPTIONS  +=		--with-system-ffi
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   110
CONFIGURE_OPTIONS  +=		--without-gcc
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   111
CONFIGURE_OPTIONS  +=		--without-ensurepip
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   112
CONFIGURE_OPTIONS  +=		--enable-ipv6
3784
d6eabdbf55cb 19714339 Python 3.4 utilities use incorrect shebang path
John Beck <John.Beck@Oracle.COM>
parents: 3783
diff changeset
   113
CONFIGURE_OPTIONS  +=		--bindir=/usr/bin
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   114
CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   115
CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   116
CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   117
CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   118
CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   119
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   120
COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   121
COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
3793
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   122
COMPONENT_BUILD_ENV  +=		PATH="$(PATH)"
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   123
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   124
# Some tests have non-ASCII characters encoded for international domain names;
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   125
# the publish step will fail in 'pkgdepend generate' without this:
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   126
COMPONENT_PUBLISH_ENV  +=	LC_ALL=en_US.UTF-8
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   127
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   128
# 64 bit shared objects need to go in a 64-bit directory
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   129
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python3.4/lib-dynload
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   130
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   131
ASLR_MODE = $(ASLR_ENABLE)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   132
3789
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   133
# Simplify the definitions of CC, CXX, CFLAGS and LDFLAGS so they hard-code
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   134
# neither paths from our build systems nor Studio-specific options.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   135
COMPONENT_PRE_INSTALL_ACTION= \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   136
    (cd $(@D) ; \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   137
     $(GSED) -i -e 's/^CC=.*/CC=\t\tcc/' -e 's/^CXX=.*/CXX=\t\tCC/' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   138
	-e 's/^CFLAGS=.*/CFLAGS=\t\t\$$\(BASECFLAGS) \$$\(OPT) \$$\(EXTRA_CFLAGS)/' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   139
	-e 's|^LDFLAGS=.*|LDFLAGS=|' Makefile)
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   140
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   141
# Because we stripped the Makefile above, we need to pass several things in the
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   142
# environment, and use -e to tell gmake to pay attention to the environment.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   143
COMPONENT_INSTALL_ENV +=	CC="$(CC)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   144
COMPONENT_INSTALL_ENV +=	CXX="$(CXX)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   145
COMPONENT_INSTALL_ENV +=	CFLAGS="$(CFLAGS)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   146
COMPONENT_INSTALL_ENV +=	LDFLAGS="$(LDFLAGS)"
3793
7befd73326eb 20396493 environment influences python2.7 and python3.4 builds
John Beck <John.Beck@Oracle.COM>
parents: 3791
diff changeset
   147
COMPONENT_INSTALL_ENV +=	PATH="$(PATH)"
3789
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   148
COMPONENT_INSTALL_ARGS +=	-e
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   149
5806
b6d54fc7632a 21389899 pkg://solaris/runtime/python-34 is not pkg verify clean
John Beck <John.Beck@Oracle.COM>
parents: 3996
diff changeset
   150
# Strip build machine paths from _sysconfigdata.py & config/Makefile,
b6d54fc7632a 21389899 pkg://solaris/runtime/python-34 is not pkg verify clean
John Beck <John.Beck@Oracle.COM>
parents: 3996
diff changeset
   151
# then (re)compile _sysconfigdata.py since we just updated it.
3789
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   152
COMPONENT_POST_INSTALL_ACTION= \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   153
    (cd $(PROTOUSRLIBDIR)/python3.4 ; \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   154
     $(GSED) -i -e 's|$(SOURCE_DIR)|.|g' -e 's|$(COMPONENT_DIR)|..|g' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   155
	-e 's|$(SPRO_VROOT)/bin/||g' lib-dynload/64/_sysconfigdata.py \
5806
b6d54fc7632a 21389899 pkg://solaris/runtime/python-34 is not pkg verify clean
John Beck <John.Beck@Oracle.COM>
parents: 3996
diff changeset
   156
	config-3.4m/Makefile; \
b6d54fc7632a 21389899 pkg://solaris/runtime/python-34 is not pkg verify clean
John Beck <John.Beck@Oracle.COM>
parents: 3996
diff changeset
   157
	$(PYTHON.3.4) -m py_compile lib-dynload/64/_sysconfigdata.py)
3789
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3786
diff changeset
   158
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   159
# common targets
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   160
build:		$(BUILD_64)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   161
install:	$(INSTALL_64)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   162
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   163
# Using "-uall,-network" ensures all tests are run except the network tests.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   164
# The network tests contain many expected failures when run behind a firewall.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   165
# The "-v" ensures verbose mode.  You can set TESTOPTS_PYTHON_TEST to a
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   166
# particular test if you want to run just one test.  For example,
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   167
# $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   168
# Note that when a test succeeds, the builds/*/.tested file gets created.  You
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   169
# may need to remove these files, or run "gmake clobber" or "gmake clean"
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   170
# between tests.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   171
#
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   172
COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
3795
cfd59dfe98a2 20463707 Python's distutils test need compiler in PATH
John Beck <John.Beck@Oracle.COM>
parents: 3793
diff changeset
   173
# The distutils tests need $CC in $PATH.
cfd59dfe98a2 20463707 Python's distutils test need compiler in PATH
John Beck <John.Beck@Oracle.COM>
parents: 3793
diff changeset
   174
COMPONENT_TEST_ENV += PATH="$(SPRO_VROOT)/bin:$(PATH)"
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   175
# Prevent the tests from getting stuck waiting for input.
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   176
COMPONENT_TEST_TARGETS = test < /dev/null
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   177
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   178
test:				$(TEST_64)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   179
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   180
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   181
REQUIRED_PACKAGES += compress/bzip2
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   182
REQUIRED_PACKAGES += compress/xz
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   183
REQUIRED_PACKAGES += database/sqlite-3
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   184
REQUIRED_PACKAGES += library/database/gdbm
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   185
REQUIRED_PACKAGES += library/expat
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   186
REQUIRED_PACKAGES += library/libffi
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   187
REQUIRED_PACKAGES += library/ncurses
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   188
REQUIRED_PACKAGES += library/readline
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   189
REQUIRED_PACKAGES += library/security/openssl
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   190
REQUIRED_PACKAGES += library/zlib
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   191
REQUIRED_PACKAGES += runtime/tcl-8
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   192
REQUIRED_PACKAGES += runtime/tk-8
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   193
REQUIRED_PACKAGES += system/library
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   194
REQUIRED_PACKAGES += system/library/math
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   195
REQUIRED_PACKAGES += system/linker
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3978
diff changeset
   196
REQUIRED_PACKAGES += x11/library/libx11