components/python/pep8/Makefile
author John Beck <John.Beck@Oracle.COM>
Fri, 13 Jun 2014 12:36:52 -0700
changeset 1948 2d1537e7942d
parent 1434 c782e620dd26
child 2044 bd546952feea
permissions -rw-r--r--
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1187
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
28a8efc39260 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
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
28a8efc39260 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
28a8efc39260 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").
28a8efc39260 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.
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
28a8efc39260 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
28a8efc39260 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.
28a8efc39260 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
28a8efc39260 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.
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
28a8efc39260 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
28a8efc39260 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.
28a8efc39260 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
28a8efc39260 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
28a8efc39260 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]
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
28a8efc39260 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
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1434
diff changeset
    23
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
1187
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
28a8efc39260 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
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
28a8efc39260 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
1233
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    29
COMPONENT_VERSION=	1.4.4
1187
28a8efc39260 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)
28a8efc39260 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
28a8efc39260 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
28a8efc39260 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=	\
1233
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    34
    sha256:a39adf83fdeab6072117087dd5b7daa8b6a5ec254730e1c4756f1d5687145258
1187
28a8efc39260 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)
28a8efc39260 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
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1434
diff changeset
    38
TPNO=			12771
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1434
diff changeset
    39
1187
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
include $(WS_TOP)/make-rules/prep.mk
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
include $(WS_TOP)/make-rules/setup.py.mk
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
include $(WS_TOP)/make-rules/ips.mk
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
28a8efc39260 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.
28a8efc39260 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 = \
28a8efc39260 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 \
28a8efc39260 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)/' "{}" \; ;
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
1233
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    49
# Put the correct pep8 version number on the .TH line in the man page in
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    50
# the proto area.
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    51
COMPONENT_POST_INSTALL_ACTION += \
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    52
	($(MKDIR) $(PROTO_DIR)/usr/share/man/man1; \
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    53
	$(GSED) -e 's/XXX/$(COMPONENT_VERSION)/' \
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    54
	    $(COMPONENT_DIR)/files/pep8.1 > \
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    55
	    $(PROTO_DIR)/usr/share/man/man1/pep8.1);
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    56
4817abd9e86b 16425619 Request to update pep8 to the latest version in s12
Rich Burridge <rich.burridge@oracle.com>
parents: 1187
diff changeset
    57
COMPONENT_POST_INSTALL_ACTION += \
1187
28a8efc39260 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))
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
1434
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1310
diff changeset
    60
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1310
diff changeset
    61
1187
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
# common targets
1310
ed3f9d06a78b 16828763 Pure python should build with its own macros, not _32/_64
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1233
diff changeset
    63
build:		$(BUILD_NO_ARCH)
1187
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
1310
ed3f9d06a78b 16828763 Pure python should build with its own macros, not _32/_64
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1233
diff changeset
    65
install:	$(INSTALL_NO_ARCH)
1187
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
test:		$(NO_TESTS)
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
28a8efc39260 PSARC 2012/301 pep8 version 1.3.3 - Python Style Guide Checker
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
include $(WS_TOP)/make-rules/depend.mk