components/python/cffi/Makefile
author Danek Duvall <danek.duvall@oracle.com>
Thu, 21 May 2015 10:02:30 -0700
changeset 4426 b03ef4b53f3e
parent 4339 6501cf9c29f9
child 4894 7219201c1b0d
permissions -rw-r--r--
21129534 missing required packages for cffi and xattr
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
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION=	0.8.2
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=	\
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    33
    sha256:8192393640f7bc304ce82669b35eb90592566a30abbb4924456f52079afc18e2
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
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1846
diff changeset
    38
TPNO=			16913
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
# The following tests cause core dumps on SPARC (bus error, illegal hardware
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    56
# instruction).  We don't skip test_install_and_reload_module{,_package}, which
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    57
# fail on both 64-bit platforms, since those don't cause the interpreter to
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    58
# crash.
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    59
$(BUILD_DIR)/sparcv7-%/.tested: TEST_SKIPS = -k "not test_callback_return_type and not test_struct_packed and not test_opaque_integer_as_function_result"
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    60
$(BUILD_DIR)/sparcv9-%/.tested: TEST_SKIPS = -k "not test_callback and not test_a_lot_of_callbacks and not test_struct_packed and not test_opaque_integer_as_function_result and not test_wchar"
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    61
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    62
# 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
    63
# 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
    64
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
    65
	$(MKDIR) $(@D)/tests/doc/source; \
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    66
	$(CP) -r $(SOURCE_DIR)/c $(SOURCE_DIR)/testing $(@D)/tests; \
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    67
	$(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
    68
	$(CP) \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    69
	    $(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
    70
	    $(SOURCE_DIR)/doc/source/index.rst \
5bd484384122 PSARC 2015/110 OpenStack service updates for Juno
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    71
	    $(@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
    72
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    73
# common targets
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    74
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
    75
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    76
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
    77
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    78
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
    79
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
    80
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
    81
1846
df40919e04fa PSARC/2014/110 CFFI: foreign function interface for Python calling C code
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    82
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    83
REQUIRED_PACKAGES += library/libffi
4426
b03ef4b53f3e 21129534 missing required packages for cffi and xattr
Danek Duvall <danek.duvall@oracle.com>
parents: 4339
diff changeset
    84
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
    85
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
    86
REQUIRED_PACKAGES += library/python/pycparser-34
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    87
REQUIRED_PACKAGES += system/library