components/python/cffi/Makefile
author John Beck <John.Beck@Oracle.COM>
Tue, 29 Sep 2015 14:11:08 -0700
changeset 4912 0b79e9575718
parent 4894 7219201c1b0d
child 4984 7145b15b7f0d
permissions -rw-r--r--
PSARC 2015/414 Python 3.5 21918688 Python 3.5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     1
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     3
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     7
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    12
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    18
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    20
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    21
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    22
#
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    23
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    24
#
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    25
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    26
include ../../../make-rules/shared-macros.mk
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    27
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		cffi
4894
7219201c1b0d 21157026 CFFI should be updated to >1.1.0
Erik Trauschke <Erik.Trauschke@oracle.com>
parents: 4426
diff changeset
    29
COMPONENT_VERSION=	1.1.2
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    30
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    31
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	\
4894
7219201c1b0d 21157026 CFFI should be updated to >1.1.0
Erik Trauschke <Erik.Trauschke@oracle.com>
parents: 4426
diff changeset
    33
    sha256:390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    34
COMPONENT_ARCHIVE_URL=	$(call pypi_url)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    35
COMPONENT_PROJECT_URL=	http://cffi.readthedocs.org/
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    36
COMPONENT_BUGDB=	python-mod/cffi
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    37
4894
7219201c1b0d 21157026 CFFI should be updated to >1.1.0
Erik Trauschke <Erik.Trauschke@oracle.com>
parents: 4426
diff changeset
    38
TPNO=			24051
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1846
diff changeset
    39
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    40
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    41
include $(WS_MAKE_RULES)/setup.py.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    42
include $(WS_MAKE_RULES)/ips.mk
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    43
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    44
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    45
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    46
COMPONENT_TEST_DIR =	$(@D)/tests
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    47
COMPONENT_TEST_ENV =	$(PYTHON_ENV)
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    48
COMPONENT_TEST_ENV +=	PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB)
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    49
COMPONENT_TEST_ENV +=	TESTOWNLIB_CC="$(CC) %s $(CC_BITS) -G -KPIC -o %s"
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    50
COMPONENT_TEST_CMD =	$(PYTHON.$(BITS)) /usr/bin/py.test-$(PYTHON_VERSION)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    51
COMPONENT_TEST_ARGS =	--resultlog $(@D)/testresults
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    52
COMPONENT_TEST_ARGS +=	-p no:codechecker
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    53
COMPONENT_TEST_ARGS +=	$(TEST_SKIPS)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    54
COMPONENT_TEST_ARGS +=	c testing
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    55
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    56
# Copy the tests and a few of the source files they read into a scratch
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    57
# directory so running the tests don't leave turds in the source directory.
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    58
COMPONENT_PRE_TEST_ACTION = \
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    59
	$(MKDIR) $(@D)/tests/doc/source; \
4894
7219201c1b0d 21157026 CFFI should be updated to >1.1.0
Erik Trauschke <Erik.Trauschke@oracle.com>
parents: 4426
diff changeset
    60
	$(CP) -r $(SOURCE_DIR)/c $(SOURCE_DIR)/testing $(SOURCE_DIR)/cffi $(@D)/tests; \
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    61
	$(CP) $(SOURCE_DIR)/setup.py $(@D)/tests; \
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    62
	$(CP) \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    63
	    $(SOURCE_DIR)/doc/source/conf.py \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    64
	    $(SOURCE_DIR)/doc/source/index.rst \
4894
7219201c1b0d 21157026 CFFI should be updated to >1.1.0
Erik Trauschke <Erik.Trauschke@oracle.com>
parents: 4426
diff changeset
    65
	    $(SOURCE_DIR)/doc/source/installation.rst \
3998
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    66
	    $(@D)/tests/doc/source
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    67
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    68
# common targets
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    69
build:		$(BUILD_32_and_64)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    70
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    71
install:	$(INSTALL_32_and_64)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    72
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    73
test:		$(TEST_32_and_64)
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    74
4339
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 3998
diff changeset
    75
system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 3998
diff changeset
    76
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    77
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    78
REQUIRED_PACKAGES += library/libffi
4426
b03ef4b53f3e 21129534 missing required packages for cffi and xattr
Danek Duvall <danek.duvall@oracle.com>
parents: 4339
diff changeset
    79
REQUIRED_PACKAGES += library/python/pycparser-26
b03ef4b53f3e 21129534 missing required packages for cffi and xattr
Danek Duvall <danek.duvall@oracle.com>
parents: 4339
diff changeset
    80
REQUIRED_PACKAGES += library/python/pycparser-27
b03ef4b53f3e 21129534 missing required packages for cffi and xattr
Danek Duvall <danek.duvall@oracle.com>
parents: 4339
diff changeset
    81
REQUIRED_PACKAGES += library/python/pycparser-34
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents: 4894
diff changeset
    82
REQUIRED_PACKAGES += library/python/pycparser-35
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    83
REQUIRED_PACKAGES += system/library