2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2023 Marcel Telka
16 %patch% 01-setuptools-2to3.patch
17 %patch% 02-test-fixes.patch
18 %patch% 03-test-locals.patch
19 %patch% 04-test-coverage.patch
20 %patch% 05-test-twisted.patch
21 %patch% 06-DefaultPluginManager.patch
24 # nose uses custom testing via the selftest.py script
27 # Support for 2to3 was removed in setuptools 58.0.0 so we cannot rely on
28 # use_2to3 and we need to convert the code explicitly here.
29 COMPONENT_PRE_BUILD_ACTION += 2to3-$(PYTHON_VERSION) --write --nobackups --no-diffs $(@D) ;
31 # We need to convert tests from Python 2 syntax to Python 3 syntax before we
32 # run them. See selftest.py for details.
33 COMPONENT_PRE_TEST_ACTION = \
34 cd $(@D) ; $(PYTHON) setup.py --no-user-cfg build_tests ;
37 COMPONENT_TEST_CMD = $(PYTHON) selftest.py
39 COMPONENT_TEST_TARGETS =
41 # Get verbose test results
42 COMPONENT_TEST_ENV += NOSE_VERBOSE=2
45 COMPONENT_TEST_TRANSFORMS += "-e 's/0x[0-9a-f]\{12\}/\$$(POINTER)/g'"
47 # teamcity-messages pollutes test report and causes test_issue135 to fail
48 TEST_CONFLICTING_PACKAGES.python += library/python/teamcity-messages
50 # Manually added test dependencies
51 TEST_REQUIRED_PACKAGES.python += library/python/twisted
53 cat "$SOURCE_DIR/lgpl.txt" > "$DISTRIBUTION.license"
54 # The lgpl.txt file contains "Franklin St" instead of "Franklin Street" so
55 # license-detector fails
56 LICENSE="LGPL-2.1-only"