components/python/cython/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Thu, 23 Feb 2017 13:46:52 -0800
changeset 7687 1093e2a9adbd
parent 7478 1f0889220ac6
permissions -rw-r--r--
25590368 Userland components should include "upstream" release tracking information
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
#
7687
1093e2a9adbd 25590368 Userland components should include "upstream" release tracking information
Rich Burridge <rich.burridge@oracle.com>
parents: 7478
diff changeset
    22
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
7298
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
7478
1f0889220ac6 25171936 Update Cython to 0.25.1
jmcp <James.McPherson@oracle.com>
parents: 7298
diff changeset
    30
COMPONENT_VERSION=	0.25.1
7298
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=		\
7478
1f0889220ac6 25171936 Update Cython to 0.25.1
jmcp <James.McPherson@oracle.com>
parents: 7298
diff changeset
    34
    sha256:e0941455769335ec5afb17dee36dc3833b7edc2ae20a8ed5806c58215e4b6669
7298
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
7687
1093e2a9adbd 25590368 Userland components should include "upstream" release tracking information
Rich Burridge <rich.burridge@oracle.com>
parents: 7478
diff changeset
    38
COMPONENT_ANITYA_ID=	12679
7298
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    39
7478
1f0889220ac6 25171936 Update Cython to 0.25.1
jmcp <James.McPherson@oracle.com>
parents: 7298
diff changeset
    40
TPNO=			32538
7298
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    41
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    42
# 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
    43
# 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
    44
# for details.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    45
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
    46
CFLAGS +=		$(CPPFLAGS)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    47
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    48
include $(WS_MAKE_RULES)/prep.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    49
include $(WS_MAKE_RULES)/ips.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    50
include $(WS_MAKE_RULES)/setup.py.mk
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    51
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    52
# Since each version of the package delivers the same
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    53
# 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
    54
# 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
    55
# suffix.
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    56
COMPONENT_POST_INSTALL_ACTION += \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    57
        (cd $(PROTO_DIR)/usr/bin ; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    58
         if [[ "$(PYTHON_VERSION)" == "2.7" && "$(BITS)" == "64" ]]; then \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    59
            $(MKDIR) $(PROTO_DIR)/usr/bin/$(MACH64); \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    60
            for c in cython cythonize cygdb; do \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    61
                $(MV) $$c $(MACH64)/$$c-$(PYTHON_VERSION) ; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    62
            done; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    63
         else \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    64
	    for c in cython cythonize cygdb; do \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    65
	         $(MV) $$c $$c-$(PYTHON_VERSION) ; \
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    66
	    done; fi )
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
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    69
COMPONENT_TEST_ENV += PREREQ_MAKEFILE=
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    70
COMPONENT_TEST_DIR =    $(SOURCE_DIR)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    71
COMPONENT_TEST_CMD =    ./runtests.py
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    72
COMPONENT_TEST_ARGS=
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    73
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    74
build:		$(BUILD_32_and_64)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    75
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    76
install:	$(INSTALL_32_and_64)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    77
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    78
test:		$(TEST_32_and_64)
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    79
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    80
REQUIRED_PACKAGES += system/library
705f281f391f PSARC/2016/592 Cython v0.25
jmcp <James.McPherson@oracle.com>
parents:
diff changeset
    81
REQUIRED_PACKAGES += developer/debug/gdb