gcc-6: don't ship info pages
[unleashed-userland.git] / components / python / python36 / Makefile
blobc9314d51d2d8e7da7e291274b2802d3bc3f67fab
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
23 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
26 include ../../../make-rules/shared-macros.mk
28 COMPONENT_NAME= Python
29 COMPONENT_VERSION= 3.6.4
30 COMPONENT_PROJECT_URL= http://python.org/
31 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz
33 COMPONENT_ARCHIVE_HASH= \
34 sha256:7dc453e1a93c083388eb1a23a256862407f8234a96dc4fae0fc7682020227486
35 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
36 COMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).asc
37 COMPONENT_BUGDB= utility/python
39 include $(WS_TOP)/make-rules/prep.mk
40 include $(WS_TOP)/make-rules/configure.mk
41 include $(WS_TOP)/make-rules/ips.mk
43 # Need to preserve timestamp for Grammar files. If the pickle files are older,
44 # Python will try to rebuild them.
45 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
46 PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
48 # We patch auto* files, so regenerate headers and configure
49 COMPONENT_PREP_ACTION = \
50 (cd $(@D) ; autoheader ; autoconf)
52 # dtrace needs to be in PATH
53 PATH:=$(PATH):/usr/sbin
55 # we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
56 # python-config
57 CC += $(CFLAGS)
59 C99MODE=
60 CPPFLAGS += -IPython
62 # to find the ncurses headers
63 CPPFLAGS += -I/usr/include/ncurses
64 # enable large files how they did in JDS
65 CPPFLAGS += -D_LARGEFILE64_SOURCE
67 # libffi for _ctypes
68 CPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
70 # because python links with $(CC) ... $(LDFLAGS) ...
71 LDFLAGS = $(CC_BITS) $(CC_PIC)
73 # build pic
74 CFLAGS += $(CC_PIC)
76 # The python build is profile-guided for studio; to see the benefits of that,
77 # Python must be compiled with -xO5 and a different build target must be used.
78 # Use of xprofile requires that the same options be used during compilation and
79 # linking. The targets chosen are based on Solaris 11 minimum supported system
80 # requirements.
81 #COMPONENT_BUILD_TARGETS = profile-opt
82 #XPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile
83 #PYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
84 #PYFLAGS.sparc =
85 #CFLAGS += -xO5 $(PYFLAGS.$(MACH))
86 #LDFLAGS += -xO5 $(PYFLAGS.$(MACH))
88 # add /usr/gnu/lib to the library search/run path
89 LDFLAGS.32 = -R/usr/gnu/lib -L/usr/gnu/lib
90 LDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64)
91 LDFLAGS += $(LDFLAGS.$(BITS))
93 # Python puts its header files in a special place.
94 LINT_FLAGS += -I$(SOURCE_DIR)/Include
96 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
97 CONFIGURE_OPTIONS += --enable-shared
98 #CONFIGURE_OPTIONS += --with-dtrace
99 CONFIGURE_OPTIONS += --with-system-expat
100 CONFIGURE_OPTIONS += --with-system-ffi
101 CONFIGURE_OPTIONS += --without-gcc
102 CONFIGURE_OPTIONS += --without-ensurepip
103 CONFIGURE_OPTIONS += --enable-ipv6
104 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
105 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
106 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
107 CONFIGURE_OPTIONS += DFLAGS="-$(BITS)"
109 COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)"
111 # Some tests have non-ASCII characters encoded for international domain names;
112 # the publish step will fail in 'pkgdepend generate' without this:
113 COMPONENT_PUBLISH_ENV += LC_ALL=en_US.UTF-8
115 # parallel building of dtrace probes is not safe
116 #COMPONENT_BUILD_ARGS =
118 # 64 bit shared objects need to go in a 64-bit directory
119 COMPONENT_INSTALL_ARGS += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python3.6/lib-dynload
121 ASLR_MODE = $(ASLR_ENABLE)
123 # common targets
124 $(INSTALL_32): $(INSTALL_64)
125 build: $(BUILD_64)
126 install: $(INSTALL_64)
128 # Using "-uall,-network" ensures all tests are run except the network tests.
129 # The network tests contain many expected failures when run behind a firewall.
130 # The "-v" ensures verbose mode. You can set TESTOPTS_PYTHON_TEST to a
131 # particular test if you want to run just one test. For example,
132 # $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
133 # Note that when a test succeeds, the builds/*/.tested file gets created. You
134 # may need to remove these files, or run "gmake clobber" or "gmake clean"
135 # between tests.
137 COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
138 # Prevent the tests from getting stuck waiting for input.
139 COMPONENT_TEST_TARGETS = test < /dev/null
141 test: $(TEST_64)
143 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
145 include $(WS_TOP)/make-rules/depend.mk
147 REQUIRED_PACKAGES += compress/bzip2
148 REQUIRED_PACKAGES += compress/xz
149 REQUIRED_PACKAGES += database/sqlite-3
150 REQUIRED_PACKAGES += developer/object-file
151 REQUIRED_PACKAGES += library/database/gdbm
152 REQUIRED_PACKAGES += library/expat
153 REQUIRED_PACKAGES += library/libffi
154 REQUIRED_PACKAGES += library/ncurses
155 REQUIRED_PACKAGES += library/readline
156 REQUIRED_PACKAGES += library/libressl
157 REQUIRED_PACKAGES += library/zlib
158 REQUIRED_PACKAGES += runtime/python-36
159 REQUIRED_PACKAGES += system/library
160 REQUIRED_PACKAGES += system/library/math