Makefile revision 5105
4812N/A#
4812N/A# CDDL HEADER START
4812N/A#
4812N/A# The contents of this file are subject to the terms of the
4812N/A# Common Development and Distribution License (the "License").
4812N/A# You may not use this file except in compliance with the License.
4812N/A#
4812N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4812N/A# or http://www.opensolaris.org/os/licensing.
4812N/A# See the License for the specific language governing permissions
4812N/A# and limitations under the License.
4812N/A#
4812N/A# When distributing Covered Code, include this CDDL HEADER in each
4812N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4812N/A# If applicable, add the following below this CDDL HEADER, with the
4812N/A# fields enclosed by brackets "[]" replaced with your own identifying
4812N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4812N/A#
4812N/A# CDDL HEADER END
4812N/A
4812N/A#
4812N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4812N/A#
4812N/A
4812N/Ainclude ../../../make-rules/shared-macros.mk
4812N/A
4812N/ACOMPONENT_NAME= pylint
4812N/ACOMPONENT_VERSION= 1.4.3
4812N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4812N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4812N/ACOMPONENT_ARCHIVE_HASH= \
4812N/A sha256:1dce8c143a5aa15e0638887c2b395e2e823223c63ebaf8d5f432a99e44b29f60
4845N/ACOMPONENT_ARCHIVE_URL= $(call pypi_url)
4812N/ACOMPONENT_PROJECT_URL= https://bitbucket.org/logilab/pylint
4812N/ACOMPONENT_BUGDB= utility/pylint
4812N/A
4812N/ATPNO= 22903
4812N/A
4812N/A# Since Pylint 1.4, it only supports Python 2.7+ and Python 3.3+.
4812N/APYTHON_VERSIONS= 2.7
4812N/A
4812N/Ainclude $(WS_MAKE_RULES)/prep.mk
4812N/Ainclude $(WS_MAKE_RULES)/ips.mk
4812N/Ainclude $(WS_MAKE_RULES)/setup.py.mk
4812N/A
4812N/A# There are several pylint documentation files that setup.py isn't installing
4812N/A# but are present in the pylint package on other distributions. Copy them into
4812N/A# the proto area "manually", so they can be included in the package.
4812N/APDOC = $(PROTO_DIR)/usr/share/doc
4812N/APDOC_PYLINT = $(PDOC)/pylint
4812N/APDOC_PYLINT_EXAMPLES = $(PDOC_PYLINT)/examples
4812N/A
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(MKDIR) $(PDOC_PYLINT) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/README $(PDOC_PYLINT) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/README.Python3 $(PDOC_PYLINT) ;
4812N/A
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(MKDIR) $(PDOC_PYLINT_EXAMPLES) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/examples/custom.py $(PDOC_PYLINT_EXAMPLES) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/examples/custom_raw.py $(PDOC_PYLINT_EXAMPLES) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/elisp/pylint.el $(PDOC_PYLINT_EXAMPLES) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/examples/pylintrc_camelcase $(PDOC_PYLINT_EXAMPLES) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A $(CP) $(COMPONENT_SRC)/examples/pylintrc $(PDOC_PYLINT_EXAMPLES) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A (cd $(PROTO_DIR)/usr/bin; $(MV) epylint epylint-$(PYTHON_VERSION)) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A (cd $(PROTO_DIR)/usr/bin; $(MV) pylint pylint-$(PYTHON_VERSION)) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A (cd $(PROTO_DIR)/usr/bin; $(MV) pylint-gui pylint-gui-$(PYTHON_VERSION)) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A (cd $(PROTO_DIR)/usr/bin; $(MV) pyreverse pyreverse-$(PYTHON_VERSION)) ;
4812N/ACOMPONENT_POST_INSTALL_ACTION += \
4812N/A (cd $(PROTO_DIR)/usr/bin; $(MV) symilar symilar-$(PYTHON_VERSION)) ;
4812N/A
4812N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
4812N/A
4812N/A# common targets
4812N/A
4812N/Abuild: $(BUILD_NO_ARCH)
4812N/A
4812N/Ainstall: $(INSTALL_NO_ARCH)
4812N/A $(PYTHON.2.7.32) -m py_compile $(PROTO_DIR)/usr/lib/python2.7/vendor-packages/pylint/testutils.py
4812N/A
4812N/A# The tests are run using python 2.7 only and require that
4812N/A# the python-27 package is installed (does not have to be the default python).
4812N/A
4812N/A# Use the python 2.7 libraries for testing.
4812N/Atest: PYTHON_VERSION=2.7
4812N/A
4812N/A# logilab-common and astroid are runtime dependencies of pylint,
4812N/A# and we need to use their latest versions from this workspace.
4812N/A# We can't just add their install targets as dependencies here,
4812N/A# so just "gmake install" in the logilab-common and astroid
4812N/A# component directories before running the pylint tests.
4812N/ACOMPONENT_PRE_TEST_ACTION = ($(GMAKE) -C \
4812N/A $(COMPONENT_DIR)/../logilab-common install; \
4812N/A $(GMAKE) -C $(COMPONENT_DIR)/../astroid install )
4812N/A
4812N/ACOMPONENT_TEST_ENV = PYTHONPATH=$(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(COMPONENT_DIR)/../astroid/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES)
4812N/A
4812N/A# The test output contains details from each test, in whatever order they
4812N/A# complete. Use nawk to extract just the sections that summarizes the test result.
4812N/ACOMPONENT_TEST_CMD = /usr/bin/pytest-$(PYTHON_VERSION)
4812N/ACOMPONENT_TEST_ARGS =
4812N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
4812N/ACOMPONENT_TEST_TRANSFORMER = $(NAWK)
4812N/ACOMPONENT_TEST_TRANSFORMS = "'/Ran (.+) test cases/{ sub(/in(.+)\)/, \"\"); print }/All (.+) modules OK/'"
4812N/A
5105N/A
5105N/ACOMPONENT_SYSTEM_TEST_CMD = /usr/bin/pytest-$(PYTHON_VERSION)
5105N/ACOMPONENT_SYSTEM_TEST_ARGS =
4812N/A
4812N/Atest: $(TEST_NO_ARCH)
4812N/A
5105N/Asystem-test: $(SYSTEM_TEST_NO_ARCH)
4812N/A
4812N/AREQUIRED_PACKAGES += library/python/logilab-common-27
4812N/AREQUIRED_PACKAGES += library/python/astroid-27
4812N/AREQUIRED_PACKAGES += library/python/six-27