4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
21 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
24 include ..
/..
/..
/make-rules
/shared-macros.mk
26 COMPONENT_NAME
= Python
27 COMPONENT_VERSION
= 2.7.15
28 COMPONENT_PROJECT_URL
= http
://python.org
/
29 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
30 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
31 COMPONENT_ARCHIVE_HASH
= \
32 sha256
:22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574
33 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)ftp
/python
/$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
34 COMPONENT_SIG_URL
= $(COMPONENT_ARCHIVE_URL
).asc
35 COMPONENT_BUGDB
= utility
/python
37 include $(WS_MAKE_RULES
)/prep.mk
38 include $(WS_MAKE_RULES
)/configure.mk
39 include $(WS_MAKE_RULES
)/ips.mk
41 # Need to preserve timestamp for Grammar files. If the pickle files are older,
42 # Python will try to rebuild them.
43 PKGSEND_PUBLISH_OPTIONS
+= -T \
*Grammar\
*.txt
44 PKGSEND_PUBLISH_OPTIONS
+= -T \
*Grammar\
*.pickle
46 COMPONENT_PREP_ACTION
= ( cd
$(@D
) && autoconf
)
49 # we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
56 # to find the ncurses headers
57 CPPFLAGS
+= -I
/usr
/include/ncurses
60 CPPFLAGS
+= $(shell pkg-config
--cflags-only-I libffi
)
67 # Python puts its header files in a special place.
68 LINT_FLAGS
+= -I
$(SOURCE_DIR
)/Include
70 # override CONFIGURE_OPTIONS; we don't want /amd64 paths
71 CONFIGURE_OPTIONS
= --prefix=/usr
72 CONFIGURE_OPTIONS
+= --infodir=$(CONFIGURE_INFODIR
)
73 CONFIGURE_OPTIONS
+= --enable-shared
74 CONFIGURE_OPTIONS
+= --with-system-expat
75 CONFIGURE_OPTIONS
+= --with-system-ffi
76 CONFIGURE_OPTIONS
+= --enable-ipv6
77 CONFIGURE_OPTIONS
+= CPPFLAGS
="$(CPPFLAGS)"
78 CONFIGURE_OPTIONS
+= LDFLAGS
="$(LDFLAGS)"
79 CONFIGURE_OPTIONS
+= CFLAGS
="$(CFLAGS)"
80 CONFIGURE_OPTIONS
+= DFLAGS
="-$(BITS)"
82 COMPONENT_BUILD_ENV
+= DFLAGS
="-$(BITS)"
86 install: $(INSTALL_64
)
88 # Using "-uall,-network" ensures all tests are run except the network tests.
89 # The network tests contain many expected failures when run behind a firewall.
90 # The "-v" ensures verbose mode. You can set TESTOPTS_PYTHON_TEST to a
91 # particular test if you want to run just one test. For example, run gmake with
92 # "-k" so it continues and does both 32-bit and 64-bit tests, even if there is a
94 # $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
95 # Note that when a test succeeds, the builds/*/.tested file gets created. You
96 # may need to remove these files, or run "gmake clobber" or "gmake clean"
99 COMPONENT_TEST_ENV
= EXTRATESTOPTS
="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
100 COMPONENT_TEST_TARGETS
= test
104 # Auto-generated dependencies
105 REQUIRED_PACKAGES
+= compress
/bzip2
106 REQUIRED_PACKAGES
+= database
/sqlite-3
107 REQUIRED_PACKAGES
+= library
/database
/gdbm
108 REQUIRED_PACKAGES
+= library
/expat
109 REQUIRED_PACKAGES
+= library
/libffi
110 REQUIRED_PACKAGES
+= library
/ncurses
111 REQUIRED_PACKAGES
+= library
/python-2
/pip-27
112 REQUIRED_PACKAGES
+= library
/readline
113 REQUIRED_PACKAGES
+= library
/zlib
114 REQUIRED_PACKAGES
+= runtime
/python-27
115 REQUIRED_PACKAGES
+= runtime
/python-27
/tests
116 REQUIRED_PACKAGES
+= SUNWcs
117 REQUIRED_PACKAGES
+= system
/library
118 REQUIRED_PACKAGES
+= system
/library
/math