components/python/logilab-common/Makefile
changeset 6938 64f04bb4c3c3
parent 5107 b5545e1bba48
child 7687 1093e2a9adbd
equal deleted inserted replaced
6936:b7d04c4c9133 6938:64f04bb4c3c3
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 
    26 include ../../../make-rules/shared-macros.mk
    26 include ../../../make-rules/shared-macros.mk
    27 
    27 
    28 COMPONENT_NAME=		logilab-common
    28 COMPONENT_NAME=		logilab-common
    29 COMPONENT_VERSION=	0.63.2
    29 COMPONENT_VERSION=	1.2.2
    30 COMPONENT_PROJECT_URL=	http://www.logilab.org/project/logilab-common/
    30 COMPONENT_PROJECT_URL=	http://www.logilab.org/project/logilab-common/
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    33 COMPONENT_ARCHIVE_HASH=	\
    33 COMPONENT_ARCHIVE_HASH=	\
    34 	sha256:603ba00c9bb09219a3bd2906c214d9455481110dacc472f450b53d5ae90f28e7
    34 	sha256:62b0d88d9276e86b48c7188cea8d91d8ff1744d046ea6323d40359aa53aef708
    35 COMPONENT_ARCHIVE_URL=	$(call pypi_url)
    35 COMPONENT_ARCHIVE_URL=	$(call pypi_url)
    36 COMPONENT_BUGDB=	python-mod/logilab-common
    36 COMPONENT_BUGDB=	python-mod/logilab-common
    37 
    37 
    38 TPNO=			22842
    38 TPNO=			31342
    39 
       
    40 # Syntax issues: not Python 3 ready. pyorbit not 3.4 ready.
       
    41 PYTHON_VERSIONS=	2.7
       
    42 
    39 
    43 include $(WS_MAKE_RULES)/prep.mk
    40 include $(WS_MAKE_RULES)/prep.mk
    44 include $(WS_MAKE_RULES)/ips.mk
    41 include $(WS_MAKE_RULES)/ips.mk
    45 include $(WS_MAKE_RULES)/setup.py.mk
    42 include $(WS_MAKE_RULES)/setup.py.mk
    46 
    43 
    53 	(cd $(PROTO_DIR)/usr/bin ; $(MV) -f pytest pytest-$(PYTHON_VERSION)) ; \
    50 	(cd $(PROTO_DIR)/usr/bin ; $(MV) -f pytest pytest-$(PYTHON_VERSION)) ; \
    54 	($(PYTHON) -m compileall $(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES))
    51 	($(PYTHON) -m compileall $(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES))
    55 
    52 
    56 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    53 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    57 
    54 
    58 # common targets
       
    59 
       
    60 build:		$(BUILD_NO_ARCH)
    55 build:		$(BUILD_NO_ARCH)
    61 
    56 
    62 install:	$(INSTALL_NO_ARCH)
    57 install:	$(INSTALL_NO_ARCH)
    63 	
       
    64 # The tests are run using python 2.7 only and require that the
       
    65 # python-27 package is installed (does not have to be the default python). 
       
    66 
       
    67 # Use the python 2.7 libraries (via PYTHONPATH setting) for testing.
       
    68 test: PYTHON_VERSION=2.7
       
    69 
    58 
    70 # The test output contains details from each test, in whatever order they
    59 # The test output contains details from each test, in whatever order they
    71 # complete. Use nawk to extract just the sections that summarizes the test result.
    60 # complete. Use nawk to extract just the sections that summarizes the test
    72 COMPONENT_TEST_CMD = $(PROTOUSRBINDIR)/pytest-2.7
    61 # result.
       
    62 COMPONENT_TEST_CMD = $(PROTOUSRBINDIR)/pytest-$(PYTHON_VERSION)
    73 COMPONENT_TEST_ARGS =
    63 COMPONENT_TEST_ARGS =
    74 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
       
    75 COMPONENT_TEST_TRANSFORMER =	$(NAWK)
    64 COMPONENT_TEST_TRANSFORMER =	$(NAWK)
    76 COMPONENT_TEST_TRANSFORMS = "'/Ran (.+) test cases/{ sub(/in(.+)\)/, \"\"); print }/(.+) modules OK/'"
    65 COMPONENT_TEST_TRANSFORMS = "'/Ran (.+) test cases/{ sub(/in(.+)\)/, \"\"); print }/(.+) modules OK/'"
    77 
    66 
    78 # This modutils test should expect the logilab module to be found under the
    67 # This modutils test should expect the logilab module to be found under the
    79 # standard /usr/lib/python* location when we test installed system bits,
    68 # standard /usr/lib/python* location when we test installed system bits,
    89 	$(MV) $(COMPONENT_SRC)/test/unittest_modutils.py-orig $(COMPONENT_SRC)/test/unittest_modutils.py
    78 	$(MV) $(COMPONENT_SRC)/test/unittest_modutils.py-orig $(COMPONENT_SRC)/test/unittest_modutils.py
    90 
    79 
    91 test:	$(TEST_NO_ARCH)
    80 test:	$(TEST_NO_ARCH)
    92 
    81 
    93 system-test:    $(SYSTEM_TEST_NO_ARCH)
    82 system-test:    $(SYSTEM_TEST_NO_ARCH)
    94 
       
    95 REQUIRED_PACKAGES += library/python/pyorbit-27
       
    96 REQUIRED_PACKAGES += library/python/six-27