components/python/pep8/Makefile
author John Beck <John.Beck@Oracle.COM>
Mon, 27 Mar 2017 15:35:14 -0700
branchs11u3-sru
changeset 7811 9126e6f58cd8
parent 3996 20c0f21bbe1e
permissions -rw-r--r--
PSARC 2014/190 Python 2.6 EOF 21136303 Python 2.6 EOF 25552242 downrevved cherrypy-26 package in s12 will block update from s11.3 25552335 library/python/idna-26 (only in s11.3 SRU14+) prevents upgrade to S12 25552353 library/python/ipaddress-26 (only in s11.3 SRU14+) prevents upgrade to S12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
3723
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    23
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
include ../../../make-rules/shared-macros.mk
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		pep8
3723
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    29
COMPONENT_VERSION=	1.5.7
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
COMPONENT_PROJECT_URL=  http://pypi.python.org/pypi/pep8
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	\
3723
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    34
    sha256:15b42131b25f376165d195fe4e17b0a28311182aaf9330d5eb575bbeda5a6989
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	http://pypi.python.org/packages/source/p/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
COMPONENT_BUGDB=	python-mod/pep8
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
3723
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    38
TPNO=			20014
3661
47545fb8aed4 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 2693
diff changeset
    39
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3723
diff changeset
    40
include $(WS_MAKE_RULES)/prep.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3723
diff changeset
    41
include $(WS_MAKE_RULES)/setup.py.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3723
diff changeset
    42
include $(WS_MAKE_RULES)/ips.mk
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
# Replace "#!/usr/bin/env ..." shebang lines with properly versioned ones.
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
COMPONENT_PRE_BUILD_ACTION = \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
	/usr/bin/find $(SOURCE_DIR) -name *.py \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
		-exec $(GSED) -i -e 's/env python/python$(PYTHON_VERSION)/' "{}" \; ;
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
# Put the correct pep8 version number on the .TH line in the man page in
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
# the proto area.
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
COMPONENT_POST_INSTALL_ACTION += \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
	($(MKDIR) $(PROTO_DIR)/usr/share/man/man1; \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
	$(GSED) -e 's/XXX/$(COMPONENT_VERSION)/' \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
	    $(COMPONENT_DIR)/files/pep8.1 > \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
	    $(PROTO_DIR)/usr/share/man/man1/pep8.1);
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
COMPONENT_POST_INSTALL_ACTION += \
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
	(cd $(PROTO_DIR)/usr/bin ; $(MV) -f pep8 pep8-$(PYTHON_VERSION))
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
3723
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    60
COMPONENT_TEST_DIR =	$(SOURCE_DIR)
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    61
COMPONENT_TEST_ARGS =	pep8.py --testsuite testsuite
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    62
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    63
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    64
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
# common targets
2693
2aa48dc32866 16828763 Pure python should build with its own macros, not _32/_64
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 2582
diff changeset
    66
build:		$(BUILD_NO_ARCH)
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
2693
2aa48dc32866 16828763 Pure python should build with its own macros, not _32/_64
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 2582
diff changeset
    68
install:	$(INSTALL_NO_ARCH)
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
3723
1cc872b933c9 18331082 Update pep8 to the latest version and hookup 'gmake test'
Rich Burridge <rich.burridge@oracle.com>
parents: 3661
diff changeset
    70
test:		$(TEST_NO_ARCH)
2582
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
bb7506e1881b PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3723
diff changeset
    73
REQUIRED_PACKAGES += library/python/setuptools-27
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3723
diff changeset
    74
REQUIRED_PACKAGES += library/python/setuptools-34