python/cryptography: native 64-bit build
[unleashed-userland.git] / components / python / numpy / Makefile
blob881c34a2f045714ae7745f43e26c05808b5e47ec
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Alexander Pyhalov
16 include ../../../make-rules/shared-macros.mk
18 COMPONENT_NAME= numpy
19 COMPONENT_VERSION= 1.11.1
20 COMPONENT_REVISION= 1
21 COMPONENT_FMRI= library/python/numpy
22 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
23 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
24 COMPONENT_ARCHIVE_HASH= \
25 sha256:dc4082c43979cc856a2bf352a8297ea109ccb3244d783ae067eb2ee5b0d577cd
26 COMPONENT_ARCHIVE_URL= \
27 http://sourceforge.net/projects/$(COMPONENT_NAME)/files/NumPy/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)/download
28 COMPONENT_PROJECT_URL = http://numpy.scipy.org/
29 COMPONENT_CLASSIFICATION= Development/Python
30 COMPONENT_SUMMARY= Numerical-Python
31 COMPONENT_LICENSE= BSD
32 COMPONENT_LICENSE_FILE= $(COMPONENT_NAME).license
34 PYTHON_VERSIONS= 2.7
36 include $(WS_TOP)/make-rules/prep.mk
37 include $(WS_TOP)/make-rules/setup.py.mk
38 include $(WS_TOP)/make-rules/ips.mk
40 LD_OPTIONS += -lm
42 COMPONENT_PRE_BUILD_ACTION += $(CLONEY) $(SOURCE_DIR) $(@D) ;
44 # This ugly hack is necessary to compile 64-bit modules
45 # http://mail.scipy.org/pipermail/numpy-discussion/2010-June/051189.html
46 COMPONENT_PRE_BUILD_ACTION += echo '\#!/bin/sh' > $(BUILD_DIR)/fake_cc ;
47 COMPONENT_PRE_BUILD_ACTION += echo 'gcc -m$(BITS) $$@' >> $(BUILD_DIR)/fake_cc ;
48 COMPONENT_PRE_BUILD_ACTION += chmod 755 $(BUILD_DIR)/fake_cc
50 COMPONENT_PRE_INSTALL_ACTION += echo '\#!/bin/sh' > $(BUILD_DIR)/fake_cc ;
51 COMPONENT_PRE_INSTALL_ACTION += echo 'gcc -m$(BITS) $$@' >> $(BUILD_DIR)/fake_cc ;
52 COMPONENT_PRE_INSTALL_ACTION += chmod 755 $(BUILD_DIR)/fake_cc
54 COMPONENT_POST_BUILD_ACTION = $(RM) $(BUILD_DIR)/fake_cc
55 COMPONENT_POST_INSTALL_ACTION = $(RM) $(BUILD_DIR)/fake_cc
57 CC=$(BUILD_DIR)/fake_cc
59 COMPONENT_BUILD_ARGS = --fcompiler=gnu95
61 NUMPY_WRONG_HASHBANG =\
62 fft/tests/test_helper.py\
63 testing/print_coercion_tables.py\
64 testing/setup.py\
65 setup.py\
66 f2py/use_rules.py\
67 f2py/common_rules.py\
68 f2py/capi_maps.py\
69 f2py/auxfuncs.py\
70 f2py/f2py2e.py\
71 f2py/__init__.py\
72 f2py/cfuncs.py\
73 f2py/func2subr.py\
74 f2py/rules.py\
75 f2py/cb_rules.py\
76 f2py/crackfortran.py\
77 f2py/f90mod_rules.py\
78 f2py/diagnose.py\
79 f2py/setup.py\
80 f2py/docs/usersguide/setup_example.py\
81 ma/setup.py\
82 matrixlib/setup.py\
83 distutils/tests/f2py_ext/setup.py\
84 distutils/tests/test_misc_util.py\
85 distutils/tests/setup.py\
86 distutils/tests/f2py_f90_ext/setup.py\
87 distutils/tests/pyrex_ext/setup.py\
88 distutils/tests/gen_ext/setup.py\
89 distutils/tests/swig_ext/setup.py\
90 distutils/exec_command.py\
91 distutils/setup.py\
92 distutils/cpuinfo.py\
93 distutils/system_info.py\
94 compat/setup.py
96 COMPONENT_POST_INSTALL_ACTION = ( $(GSED) -i '' -e 's:\#!/usr/bin/amd64/python$(PYTHON_VERSION):\#!/usr/bin/python$(PYTHON_VERSION):' \
97 $(PROTO_DIR)/usr/bin/f2py$(PYTHON_VERSION) && \
98 ( for file in $(NUMPY_WRONG_HASHBANG); do $(GSED) -i '' -e 's:\#!/usr/bin/env python:\#!/usr/bin/python$(PYTHON_VERSION):' \
99 $(PROTO_DIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/numpy/$${file}; done; ) );
101 build: $(BUILD_32_and_64)
103 install: $(INSTALL_32_and_64)
105 REQUIRED_PACKAGES += library/math/openblas
106 REQUIRED_PACKAGES += runtime/python-27
107 REQUIRED_PACKAGES += system/library
108 REQUIRED_PACKAGES += system/library/math