247N/A#
247N/A# CDDL HEADER START
247N/A#
247N/A# The contents of this file are subject to the terms of the
247N/A# Common Development and Distribution License (the "License").
247N/A# You may not use this file except in compliance with the License.
247N/A#
247N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
247N/A# or http://www.opensolaris.org/os/licensing.
247N/A# See the License for the specific language governing permissions
247N/A# and limitations under the License.
247N/A#
247N/A# When distributing Covered Code, include this CDDL HEADER in each
247N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
247N/A# If applicable, add the following below this CDDL HEADER, with the
247N/A# fields enclosed by brackets "[]" replaced with your own identifying
247N/A# information: Portions Copyright [yyyy] [name of copyright owner]
247N/A#
247N/A# CDDL HEADER END
247N/A
247N/A#
3996N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
247N/A#
247N/A
247N/Ainclude ../../make-rules/shared-macros.mk
247N/A
247N/ACOMPONENT_NAME= pylint
1247N/ACOMPONENT_VERSION= 0.25.2
247N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
247N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
1247N/A sha256:757f2b97071a87fb7e4d017fc7c9eb74f26dcf412e683b614d3c5d54b217212d
1247N/ACOMPONENT_ARCHIVE_URL= http://download.logilab.org/pub/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
247N/ACOMPONENT_PROJECT_URL= http://www.logilab.org/project/pylint/
1273N/ACOMPONENT_BUGDB= utility/pylint
247N/A
3661N/ATPNO= 9026
3661N/A
3778N/A# Depends on logilab-common which is not Python 3 ready.
3778N/APYTHON_VERSIONS= 2.7 2.6
3778N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
3996N/Ainclude $(WS_MAKE_RULES)/setup.py.mk
247N/A
714N/A# There are several pylint documentation files that setup.py isn't installing
714N/A# but are present in the pylint package on other distributions. Copy them into
714N/A# the proto area "manually", so they can be included in the package.
714N/APDOC = $(PROTO_DIR)/usr/share/doc
714N/APDOC_PYLINT = $(PDOC)/pylint
714N/APDOC_PYLINT_EXAMPLES = $(PDOC_PYLINT)/examples
714N/A
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(MKDIR) $(PDOC_PYLINT) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/doc/beginner_pylint_tutorial.txt $(PDOC_PYLINT) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/doc/FAQ.txt $(PDOC_PYLINT) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/doc/features.txt $(PDOC_PYLINT) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/doc/manual.txt $(PDOC_PYLINT) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/doc/quickstart.txt $(PDOC_PYLINT) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/README $(PDOC_PYLINT) ;
714N/A
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(MKDIR) $(PDOC_PYLINT_EXAMPLES) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/examples/custom.py $(PDOC_PYLINT_EXAMPLES) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/examples/custom_raw.py $(PDOC_PYLINT_EXAMPLES) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/elisp/pylint.el $(PDOC_PYLINT_EXAMPLES) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/examples/pylintrc_camelcase $(PDOC_PYLINT_EXAMPLES) ;
714N/ACOMPONENT_POST_INSTALL_ACTION += \
714N/A $(CP) $(COMPONENT_SRC)/examples/pylintrc $(PDOC_PYLINT_EXAMPLES) ;
783N/ACOMPONENT_POST_INSTALL_ACTION += \
783N/A (cd $(PROTO_DIR)/usr/bin; $(MV) epylint epylint-$(PYTHON_VERSION)) ;
783N/ACOMPONENT_POST_INSTALL_ACTION += \
783N/A (cd $(PROTO_DIR)/usr/bin; $(MV) pylint pylint-$(PYTHON_VERSION)) ;
783N/ACOMPONENT_POST_INSTALL_ACTION += \
783N/A (cd $(PROTO_DIR)/usr/bin; $(MV) pylint-gui pylint-gui-$(PYTHON_VERSION)) ;
783N/ACOMPONENT_POST_INSTALL_ACTION += \
783N/A (cd $(PROTO_DIR)/usr/bin; $(MV) pyreverse pyreverse-$(PYTHON_VERSION)) ;
783N/ACOMPONENT_POST_INSTALL_ACTION += \
783N/A (cd $(PROTO_DIR)/usr/bin; $(MV) symilar symilar-$(PYTHON_VERSION)) ;
714N/A
714N/A
247N/A# common targets
247N/A
247N/Abuild: $(BUILD_32)
247N/A
247N/Ainstall: $(INSTALL_32)
247N/A
1247N/A# The tests are run using python 2.7 only and require that
1247N/A# the python-27 package is installed (does not have to be the default python).
1247N/A# Testing using python-26 is done manually, since it requires
1247N/A# downloading and installing the unittest2 component (not part of Solaris),
1247N/A# which provides python 2.7 functionality to the unittest python library
1247N/A# in the python2.6 package.
1247N/A
1247N/A# Use the python 2.7 libraries for testing.
1247N/Atest: PYTHON_VERSION=2.7
1247N/A
1247N/A# logilab-common and logilab-astng are runtime dependencies of pylint,
1247N/A# and we need to use their latest versions from this workspace.
1247N/A# We can't just add their install targets as dependencies here,
1247N/A# so just "gmake install" in the logilab-common and logilab-astng
1247N/A# component directories before running the pylint tests.
1247N/ACOMPONENT_PRE_TEST_ACTION = ($(GMAKE) -C \
1247N/A $(COMPONENT_DIR)/../logilab-common install; \
1247N/A $(GMAKE) -C $(COMPONENT_DIR)/../logilab-astng install )
1247N/A
1247N/ACOMPONENT_TEST_ENV = PYTHONPATH=$(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(COMPONENT_DIR)/../logilab-astng/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES)
1247N/A
1247N/A# Run pytest-2.7 from logilab-common's proto area for now, until the
1247N/A# new version of logilab-common containing pytest is in CBE.
1247N/A# Then we can change it to /usr/bin/pytest-$(PYTHON_VERSION).
1247N/ACOMPONENT_TEST_CMD = $(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)/usr/bin/pytest-$(PYTHON_VERSION)
1247N/ACOMPONENT_TEST_ARGS =
1247N/A
1247N/A# Expected failures for test target:
1247N/A# 799 test cases, 4 errors, 6 failures, 4 skipped
1247N/A# 9 modules OK (2 failed)
1247N/A# failures: smoketest [7/14], unittest_lint [3/21]
1247N/A
247N/Atest: $(TEST_32)
247N/A
247N/A
3996N/AREQUIRED_PACKAGES += runtime/python-26
3996N/AREQUIRED_PACKAGES += runtime/python-27
3996N/AREQUIRED_PACKAGES += runtime/python-34