components/python/cython/Makefile
author jmcp <James.McPherson@oracle.com>
Mon, 14 Nov 2016 17:17:49 -0800
changeset 7298 705f281f391f
child 7478 1f0889220ac6
permissions -rw-r--r--
PSARC/2016/592 Cython v0.25 15803336 Include python tool cython in Solaris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7298
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     1
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     3
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     7
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    12
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    18
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    20
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    21
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    22
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    23
#
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    24
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    25
COMPILER =		gcc
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    26
BUILD_BITS =		32_and_64
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    27
include ../../../make-rules/shared-macros.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    28
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    29
COMPONENT_NAME=		Cython
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    30
COMPONENT_VERSION=	0.25
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH=		\
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    34
    sha256:c651eeec6bdcb57de59527e8765c9d2c4970c56bf96731893df66dda17aba46b
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	$(call pypi_url)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    36
COMPONENT_PROJECT_URL=  http://cython.org/
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    37
COMPONENT_BUGDB=	python-mod/cython
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    38
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    39
TPNO=			32405
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    40
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    41
# Avoid warnings about use of the deprecated NumPy API. Please see
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    42
# http://docs.cython.org/en/latest/src/reference/compilation.html#configuring-the-c-build
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    43
# for details.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    44
CPPFLAGS +=		-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    45
CFLAGS +=		$(CPPFLAGS)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    46
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    47
include $(WS_MAKE_RULES)/prep.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    48
include $(WS_MAKE_RULES)/ips.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    49
include $(WS_MAKE_RULES)/setup.py.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    50
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    51
# Since each version of the package delivers the same
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    52
# files to usr/bin, we need mediation. This is enabled
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    53
# by making a copy of the script with an appropriate
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    54
# suffix.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    55
COMPONENT_POST_INSTALL_ACTION += \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    56
        (cd $(PROTO_DIR)/usr/bin ; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    57
         if [[ "$(PYTHON_VERSION)" == "2.7" && "$(BITS)" == "64" ]]; then \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    58
            $(MKDIR) $(PROTO_DIR)/usr/bin/$(MACH64); \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    59
            for c in cython cythonize cygdb; do \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    60
                $(MV) $$c $(MACH64)/$$c-$(PYTHON_VERSION) ; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    61
            done; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    62
         else \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    63
	    for c in cython cythonize cygdb; do \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    64
	         $(MV) $$c $$c-$(PYTHON_VERSION) ; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    65
	    done; fi )
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    66
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    67
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    68
COMPONENT_TEST_ENV += PREREQ_MAKEFILE=
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    69
COMPONENT_TEST_DIR =    $(SOURCE_DIR)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    70
COMPONENT_TEST_CMD =    ./runtests.py
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    71
COMPONENT_TEST_ARGS=
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    72
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    73
build:		$(BUILD_32_and_64)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    74
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    75
install:	$(INSTALL_32_and_64)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    76
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    77
test:		$(TEST_32_and_64)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    78
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    79
REQUIRED_PACKAGES += system/library
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    80
REQUIRED_PACKAGES += developer/debug/gdb