git: switch to Python 2.7
[unleashed-userland.git] / components / logilab-astng / Makefile
blob8a906919a8fd9ccea0909db417e75bd932f3955c
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
26 include ../../make-rules/shared-macros.mk
28 COMPONENT_NAME= logilab-astng
29 COMPONENT_VERSION= 0.24.0
30 COMPONENT_PROJECT_URL= http://www.logilab.org/project/logilab-astng/
31 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
33 COMPONENT_ARCHIVE_HASH= \
34 sha256:2d9413fa338ccf8b3f4b86520b385e9d35e848117dc7602b3994972a3163647f
35 COMPONENT_ARCHIVE_URL= http://pkgs.fedoraproject.org/repo/pkgs/python-logilab-astng/$(COMPONENT_ARCHIVE)/9383047bfe2be4405af491fbe5c7f1c6/$(COMPONENT_ARCHIVE)
36 COMPONENT_BUGDB= python-mod/logilab-astng
38 include ../../make-rules/prep.mk
39 include ../../make-rules/ips.mk
40 include ../../make-rules/setup.py.mk
42 # common targets
44 build: $(BUILD_NO_ARCH)
46 install: $(INSTALL_NO_ARCH)
48 # The tests are run using python 2.7 only and require that
49 # the python-27 package is installed (does not have to be the default python).
50 # Testing using python-26 is done manually, since it requires
51 # downloading and installing the unittest2 component (not part of Solaris).
52 # which provides python 2.7 functionality to the unittest python library
53 # in the python2.6 package.
55 # Use the python 2.7 libraries for testing.
56 test: PYTHON_VERSION=2.7
58 # logilab-common is a runtime dependency of logilab-astng,
59 # and we need to use its latest version from the workspace.
60 # We can't just add its install target as a dependency here,
61 # so just run "gmake install" in the logilab-common component directory
62 # before running logilab-astng tests.
63 COMPONENT_PRE_TEST_ACTION = ( $(GMAKE) -C \
64 $(COMPONENT_DIR)/../logilab-common install )
66 COMPONENT_TEST_ENV = PYTHONPATH=$(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES)
68 # Run pytest-2.7 from logilab-common's proto area for now, until the
69 # new version of logilab-common containing pytest is in CBE.
70 # Then we can change it to /usr/bin/pytest-$(PYTHON_VERSION).
71 COMPONENT_TEST_CMD = $(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)/usr/bin/pytest-$(PYTHON_VERSION)
72 COMPONENT_TEST_ARGS =
74 # Expected failures for test target:
75 # sparc:
76 # 242 test cases, 2 failures, 6 skipped
77 # 8 modules OK (1 failed)
78 # failures: unittest_builder [2/55]
79 # x86:
80 # 242 test cases, 4 failures, 8 skipped
81 # 6 modules OK (3 failed)
82 # failures: unittest_builder [2/55], unittest_lookup [1/21],
83 # unittest_inference [1/75]
85 test: $(TEST_NO_ARCH)
87 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
89 include ../../make-rules/depend.mk