components/python/pylint/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Tue, 20 Sep 2016 16:27:38 -0700
changeset 6938 64f04bb4c3c3
parent 5682 94c0ca64c022
child 7084 09540c7edf7c
permissions -rw-r--r--
PSARC 2016/506 lazy-object-proxy - version 1.2.2 PSARC 2016/507 isort - version 4.2.5 22353452 update pylint to 1.6.4 22353645 upgrade astroid to 1.4.8 23093943 Upgrade logilab-common to version 1.2.2 24479271 logilab-common lists unnecessary dependency on pyorbit 24507743 Add lazy-object-proxy version 1.2.2 to userland 24508347 Add isort version 4.2.5 to userland

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS= NO_ARCH
include ../../../make-rules/shared-macros.mk

COMPONENT_NAME=		pylint
COMPONENT_VERSION=	1.6.4
COMPONENT_ARCHIVE_HASH=		\
	sha256:ef901a34b62ed7a734370ba5b162d890231ba8822abe88c6dda1268e2575f5f1
COMPONENT_ARCHIVE_URL=	$(call pypi_url)
COMPONENT_PROJECT_URL=  https://bitbucket.org/logilab/pylint

TPNO=			31351

BUILD_STYLE= setup.py
include $(WS_MAKE_RULES)/common.mk

ASLR_MODE = $(ASLR_NOT_APPLICABLE)

# Use the logilab-common, lazy-object-proxy, astroid and isort that are in the
# gate until the new versions are on the Userland build machines.
LLC = $(WS_COMPONENTS)/python/logilab-common/build/prototype/$(MACH)/$(PYTHON_LIB)
LOP = $(WS_COMPONENTS)/python/lazy-object-proxy/build/prototype/$(MACH)/$(PYTHON_LIB)
ASTROID = $(WS_COMPONENTS)/python/astroid/build/prototype/$(MACH)/$(PYTHON_LIB)
ISORT = $(WS_COMPONENTS)/python/isort/build/prototype/$(MACH)/$(PYTHON_LIB)

COMPONENT_BUILD_ENV +=		PYTHONPATH=$(LLC):$(LOP):$(ASTROID):$(ISORT)
COMPONENT_INSTALL_ENV +=	PYTHONPATH=$(LLC):$(LOP):$(ASTROID):$(ISORT)

# There are several pylint documentation files that setup.py isn't installing
# but are present in the pylint package on other distributions. Copy them into
# the proto area "manually", so they can be included in the package.
PDOC_PYLINT =		$(PROTOUSRSHAREDOCDIR)/pylint
PDOC_PYLINT_EXAMPLES =	$(PDOC_PYLINT)/examples

COMPONENT_POST_INSTALL_ACTION += \
	$(MKDIR) $(PDOC_PYLINT) ;
COMPONENT_POST_INSTALL_ACTION += \
	$(CP) $(COMPONENT_SRC)/README.rst $(PDOC_PYLINT) ;

COMPONENT_POST_INSTALL_ACTION += \
	$(MKDIR) $(PDOC_PYLINT_EXAMPLES) ;
COMPONENT_POST_INSTALL_ACTION += \
	$(CP) $(COMPONENT_SRC)/examples/custom.py $(PDOC_PYLINT_EXAMPLES) ;
COMPONENT_POST_INSTALL_ACTION += \
	$(CP) $(COMPONENT_SRC)/examples/custom_raw.py $(PDOC_PYLINT_EXAMPLES) ;
COMPONENT_POST_INSTALL_ACTION += \
	$(CP) $(COMPONENT_SRC)/elisp/pylint.el $(PDOC_PYLINT_EXAMPLES) ;
COMPONENT_POST_INSTALL_ACTION += \
	$(CP) $(COMPONENT_SRC)/examples/pylintrc_camelcase $(PDOC_PYLINT_EXAMPLES) ;
COMPONENT_POST_INSTALL_ACTION += \
	$(CP) $(COMPONENT_SRC)/examples/pylintrc $(PDOC_PYLINT_EXAMPLES) ;
COMPONENT_POST_INSTALL_ACTION += \
	(cd $(PROTO_DIR)/usr/bin; $(MV) epylint epylint-$(PYTHON_VERSION)) ;
COMPONENT_POST_INSTALL_ACTION += \
	(cd $(PROTO_DIR)/usr/bin; $(MV) pylint pylint-$(PYTHON_VERSION)) ;
COMPONENT_POST_INSTALL_ACTION += \
	(cd $(PROTO_DIR)/usr/bin; $(MV) pylint-gui pylint-gui-$(PYTHON_VERSION)) ;
COMPONENT_POST_INSTALL_ACTION += \
	(cd $(PROTO_DIR)/usr/bin; $(MV) pyreverse pyreverse-$(PYTHON_VERSION)) ;
COMPONENT_POST_INSTALL_ACTION += \
	(cd $(PROTO_DIR)/usr/bin; $(MV) symilar symilar-$(PYTHON_VERSION)) ;

COMPONENT_POST_INSTALL_ACTION += \
	$(PYTHON) -m py_compile $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION)/vendor-packages/pylint/testutils.py

COMPONENT_TEST_ENV = PYTHONPATH=$(LLC):$(LOP):$(ASTROID):$(ISORT):$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES)

COMPONENT_TEST_CMD = $(LLC)/../../../bin/pytest-$(PYTHON_VERSION)
COMPONENT_TEST_ARGS =

# The test output contains details from each test, in whatever order they
# complete. Use nawk to extract just the sections that summarizes the test
# result.
COMPONENT_TEST_TRANSFORMER =	$(NAWK)
COMPONENT_TEST_TRANSFORMS = "'/Ran (.+) test cases/{ sub(/in(.+)\)/, \"\"); print }/All (.+) modules OK/'"

COMPONENT_SYSTEM_TEST_CMD = /usr/bin/pytest-$(PYTHON_VERSION)
COMPONENT_SYSTEM_TEST_ARGS =