|
1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
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. |
|
7 # |
|
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. |
|
12 # |
|
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] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 |
|
22 # |
|
23 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 BUILD_BITS = 32_and_64 |
|
26 include ../../../make-rules/shared-macros.mk |
|
27 |
|
28 COMPONENT_NAME= numpy |
|
29 COMPONENT_VERSION= 1.9.0 |
|
30 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
31 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
32 COMPONENT_ARCHIVE_HASH= \ |
|
33 sha256:f7e6cede959ec7d26dc242150839f3193b4ec16d733f1a4bff623c4ed0d27ff5 |
|
34 COMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/numpy/$(COMPONENT_ARCHIVE) |
|
35 COMPONENT_PROJECT_URL= http://www.numpy.org/ |
|
36 COMPONENT_BUGDB= python-mod/numpy |
|
37 |
|
38 TPNO= 19933 |
|
39 |
|
40 BUILD_STYLE= setup.py |
|
41 |
|
42 # Have not been able to get consistent test results yet, needs more work |
|
43 TEST_TARGET = $(SKIP_TEST) |
|
44 |
|
45 include $(WS_MAKE_RULES)/common.mk |
|
46 |
|
47 COMPONENT_BUILD_ARGS.studio += --compiler=sun$(BITS) --fcompiler=sun$(BITS) |
|
48 COMPONENT_BUILD_ARGS.gcc += --compiler=gnu --fcompiler=gnu95 |
|
49 COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(COMPILER)) |
|
50 |
|
51 studio_XBITS.i386.32 += -xarch=sse2 |
|
52 |
|
53 PYTHON_ENV += CC="$(CC) $(CC_BITS)" |
|
54 PYTHON_ENV += PATH="$(SPRO_VROOT)/bin:$(PATH)" |
|
55 |
|
56 PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*.py |
|
57 PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*/*.py |
|
58 PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*/*/*.py |
|
59 PYTHON_SCRIPTS += $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES.32)/numpy/*/*/*/*.py |
|
60 |
|
61 # Merge 32-bit & 64-bit versions of header with different SIZEOF values |
|
62 install: $(BUILD_DIR)/.merged-header |
|
63 $(BUILD_DIR)/.merged-header: PYTHON_VERSION=2.7 |
|
64 |
|
65 NUMPYCONFIG_H = $(PYTHON_VENDOR_PACKAGES.32)/numpy/core/include/numpy/_numpyconfig.h |
|
66 $(BUILD_DIR)/.merged-header: $(BUILD_DIR)/$(MACH32)-2.7/.installed $(BUILD_DIR)/$(MACH64)-2.7/.installed |
|
67 -$(RM) $(PROTO_DIR)/$(NUMPYCONFIG_H) |
|
68 print '#include <sys/isa_defs.h>' > $(PROTO_DIR)/$(NUMPYCONFIG_H) |
|
69 $(GDIFF) -D _LP64 \ |
|
70 $(BUILD_DIR)/$(MACH32)-2.7/src.solaris-*.32bit-2.7/numpy/core/include/numpy/_numpyconfig.h \ |
|
71 $(BUILD_DIR)/$(MACH64)-2.7/src.solaris-*.64bit-2.7/numpy/core/include/numpy/_numpyconfig.h \ |
|
72 >> $(PROTO_DIR)/$(NUMPYCONFIG_H) ; \ |
|
73 diffstatus=$$? ; \ |
|
74 if (( $$diffstatus != 1 )) ; then exit $$diffstatus ; fi |
|
75 touch $@ |
|
76 |
|
77 |
|
78 COMPONENT_TEST_DIR = $(COMPONENT_DIR) |
|
79 COMPONENT_TEST_ARGS = -c 'import numpy; numpy.test()' |
|
80 COMPONENT_TEST_ENV += PYTHONPATH="$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)" |
|
81 COMPONENT_TEST_ENV += F77="$(SPRO_VROOT)/bin/f77 -m$(BITS)" |
|
82 COMPONENT_TEST_ENV += F90="$(SPRO_VROOT)/bin/f90 -m$(BITS)" |
|
83 COMPONENT_TEST_TRANSFORMS += '-e "s|^\\(Ran [0-9]* tests\\) in .*s|\1|"' |
|
84 COMPONENT_TEST_TRANSFORMS += '-e "s|$(PROTO_DIR)|\\$$(PROTO_DIR)|g"' |
|
85 |
|
86 REQUIRED_PACKAGES += library/python/nose |
|
87 REQUIRED_PACKAGES += system/library |
|
88 REQUIRED_PACKAGES += system/library/math |