components/python/numpy/Makefile
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 19 Sep 2016 00:22:44 -0700
changeset 6954 bdf0b42d8cef
child 7687 1093e2a9adbd
permissions -rw-r--r--
23245488 Move numpy 1.9.0 to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6954
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
#
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
BUILD_BITS = 		32_and_64
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
include ../../../make-rules/shared-macros.mk
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_NAME=		numpy
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_VERSION=	1.9.0
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	\
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
    sha256:f7e6cede959ec7d26dc242150839f3193b4ec16d733f1a4bff623c4ed0d27ff5
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
COMPONENT_ARCHIVE_URL=	http://downloads.sourceforge.net/numpy/$(COMPONENT_ARCHIVE)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
COMPONENT_PROJECT_URL=	http://www.numpy.org/
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
COMPONENT_BUGDB=	python-mod/numpy
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
TPNO=			19933
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
BUILD_STYLE= setup.py
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
# Have not been able to get consistent test results yet, needs more work
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
TEST_TARGET = $(SKIP_TEST)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
include $(WS_MAKE_RULES)/common.mk
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
COMPONENT_BUILD_ARGS.studio 	+= --compiler=sun$(BITS) --fcompiler=sun$(BITS)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
COMPONENT_BUILD_ARGS.gcc	+= --compiler=gnu --fcompiler=gnu95
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
COMPONENT_BUILD_ARGS 		+= $(COMPONENT_BUILD_ARGS.$(COMPILER))
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
studio_XBITS.i386.32 		+= -xarch=sse2
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
PYTHON_ENV +=   CC="$(CC) $(CC_BITS)"
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
PYTHON_ENV +=   PATH="$(SPRO_VROOT)/bin:$(PATH)"
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    56
PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*.py
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*/*.py
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    58
PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*/*/*.py
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    59
PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*/*/*/*.py
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    60
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    61
# Merge 32-bit & 64-bit versions of header with different SIZEOF values
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    62
install: $(BUILD_DIR)/.merged-header
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    63
$(BUILD_DIR)/.merged-header:	PYTHON_VERSION=2.7
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
NUMPYCONFIG_H = $(PYTHON_VENDOR_PACKAGES.32)/numpy/core/include/numpy/_numpyconfig.h
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
$(BUILD_DIR)/.merged-header: $(BUILD_DIR)/$(MACH32)-2.7/.installed $(BUILD_DIR)/$(MACH64)-2.7/.installed
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
	-$(RM) $(PROTO_DIR)/$(NUMPYCONFIG_H)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
	print '#include <sys/isa_defs.h>' > $(PROTO_DIR)/$(NUMPYCONFIG_H)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    69
	$(GDIFF) -D _LP64 \
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    70
	    $(BUILD_DIR)/$(MACH32)-2.7/src.solaris-*.32bit-2.7/numpy/core/include/numpy/_numpyconfig.h \
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    71
	    $(BUILD_DIR)/$(MACH64)-2.7/src.solaris-*.64bit-2.7/numpy/core/include/numpy/_numpyconfig.h \
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    72
	    >> $(PROTO_DIR)/$(NUMPYCONFIG_H) ; \
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    73
	diffstatus=$$? ; \
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    74
	if (( $$diffstatus != 1 )) ; then exit $$diffstatus ; fi
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    75
	touch $@
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    76
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    77
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    78
COMPONENT_TEST_DIR  = $(COMPONENT_DIR)
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    79
COMPONENT_TEST_ARGS = -c 'import numpy; numpy.test()'
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    80
COMPONENT_TEST_ENV += PYTHONPATH="$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)"
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    81
COMPONENT_TEST_ENV += F77="$(SPRO_VROOT)/bin/f77 -m$(BITS)"
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    82
COMPONENT_TEST_ENV += F90="$(SPRO_VROOT)/bin/f90 -m$(BITS)"
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    83
COMPONENT_TEST_TRANSFORMS += '-e "s|^\\(Ran [0-9]* tests\\) in .*s|\1|"'
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
COMPONENT_TEST_TRANSFORMS += '-e "s|$(PROTO_DIR)|\\$$(PROTO_DIR)|g"'
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    85
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
REQUIRED_PACKAGES += library/python/nose
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    87
REQUIRED_PACKAGES += system/library
bdf0b42d8cef 23245488 Move numpy 1.9.0 to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    88
REQUIRED_PACKAGES += system/library/math