# # This file and its contents are supplied under the terms of the # Common Development and Distribution License ("CDDL"), version 1.0. # You may only use this file in accordance with the terms of version # 1.0 of the CDDL. # # A full copy of the text of the CDDL should have accompanied this # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # # # Copyright 2025 Marcel Telka # %include-2% # https://github.com/astral-sh/uv/issues/16849 TEST_STYLE = custom %include-3% # https://github.com/astral-sh/uv/issues/16849 COMPONENT_TEST_CMD = $(CARGO) test COMPONENT_TEST_ARGS += --release COMPONENT_TEST_ARGS += --offline COMPONENT_TEST_ARGS += -p uv-build-backend COMPONENT_TEST_TARGETS = # skip failing tests # see https://github.com/astral-sh/uv/issues/16849 COMPONENT_TEST_ARGS += -- COMPONENT_TEST_ARGS += --skip tests::built_by_uv_building COMPONENT_TEST_ARGS += --skip wheel::test::test_prepare_metadata # drop header COMPONENT_TEST_TRANSFORMS += "-e '0,/Finished/d'" # remove timing COMPONENT_TEST_TRANSFORMS += "-e 's/\(finished\) in [0-9]\{1,\}\.[0-9]\{2\}s\$$/\1/g'" # normalize variable hash in filename COMPONENT_TEST_TRANSFORMS += "-e 's/\(Running .* (.*-\)[0-9a-f]\{16\})/\1XXXXXXXXXXXXXXXX)/'" # sort tests COMPONENT_TEST_TRANSFORMS += "| ( while true ; do \ $(GSED) -u -e '/^running [0-9]\{1,\} tests\$$/q1' && break ; \ $(GSED) -u -e '/^\$$/Q' | $(SORT) ; \ echo "" ; \ done ) | $(COMPONENT_TEST_TRANSFORMER) -e ''" %hook-manifest% # Only LICENSE-APACHE is used automatically, but we need LICENSE-MIT too. ( printf '--- LICENSE-APACHE --------------------------------------------------------\n\n' cat "$SOURCE_DIR/LICENSE-APACHE" printf '\n\n--- LICENSE-MIT -----------------------------------------------------------\n\n' cat "$SOURCE_DIR/LICENSE-MIT" ) > "$DISTRIBUTION.license" sed -i -e '/^COMPONENT_LICENSE_FILE/d' Makefile git add "$DISTRIBUTION.license" LICENSE= detect_license LICENSE "$DISTRIBUTION.license" gsed -i -e 's/^\(COMPONENT_LICENSE =\t*\)[^\t]*$/\1'"$LICENSE"'/' Makefile git add Makefile