whitelist python/pycparser
[unleashed-userland.git] / components / python / pycparser / Makefile
blob8c9288ff61a5b677ee3a033ff69cc18d44a7f9c2
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
26 include ../../../make-rules/shared-macros.mk
28 COMPONENT_NAME= pycparser
29 COMPONENT_VERSION= 2.14
30 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
31 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
32 COMPONENT_ARCHIVE_HASH= \
33 sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73
34 COMPONENT_ARCHIVE_URL= $(call pypi_url)
35 COMPONENT_PROJECT_URL= https://github.com/eliben/pycparser
36 COMPONENT_BUGDB= python-mod/pycparser
38 TPNO= 28876
40 PYTHON_VERSIONS= 2.7
42 include $(WS_MAKE_RULES)/prep.mk
43 include $(WS_MAKE_RULES)/setup.py.mk
44 include $(WS_MAKE_RULES)/ips.mk
46 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
48 COMPONENT_TEST_DIR = $(SOURCE_DIR)
49 COMPONENT_TEST_CMD = py.test-$(PYTHON_VERSION)
50 COMPONENT_TEST_ARGS = --resultlog $(@D)/testresults
51 COMPONENT_TEST_ARGS += -p no:codechecker
52 COMPONENT_TEST_ENV += PATH=$$PATH:$(BUILD_DIR)/bin
54 $(SOURCE_DIR)/pycparser/ply/lex.py: $(SOURCE_DIR)/.prep
56 $(BUILD_DIR)/license.ply: $(SOURCE_DIR)/pycparser/ply/lex.py
57 nawk '/^# Copyright / {p=1} /^# ---/ {p=0} p == 1 {print substr($$0, 3)}' $< > $@
59 # common targets
60 build: $(BUILD_NO_ARCH)
62 install: $(INSTALL_NO_ARCH) $(BUILD_DIR)/license.ply
64 test: $(TEST_NO_ARCH)
66 REQUIRED_PACKAGES += runtime/python-27
67 REQUIRED_PACKAGES += runtime/python-34