Marcel Telka
2022-12-01 7416d1720288d6236a7e6e23b2da917e30184cb4
tools/python-resolve-deps: handle tox extras dependencies specified in deps

2 files modified
12 ■■■■■ changed files
make-rules/setup.py.mk 2 ●●●●● patch | view | raw | blame | history
tools/python-resolve-deps 10 ●●●●● patch | view | raw | blame | history
make-rules/setup.py.mk
@@ -322,6 +322,8 @@
    cd $(@D) ; \
    ( $(COMPONENT_TEST_CMD) -qq --print-deps-to=- $(COMPONENT_TEST_TARGETS) \
        | $(WS_TOOLS)/python-resolve-deps \
            PYTHONPATH=$(PROTO_DIR)/$(PYTHON_DIR)/site-packages:$(PROTO_DIR)/$(PYTHON_LIB) \
            $(PYTHON) $(WS_TOOLS)/python-requires $(COMPONENT_NAME) \
        | $(GSED) -e 's/\#.*//' -e $$'s/^[ \t]*//' -e '/^$$/d' \
            -e 's/^\([a-zA-Z0-9]\([a-zA-Z0-9._-]*[a-zA-Z0-9]\)\{0,1\}\).*/\1/' \
        | tr '[A-Z]' '[a-z]' | $(GSED) -e 's/[._-]\{1,\}/-/g' ; \
tools/python-resolve-deps
@@ -19,6 +19,16 @@
# dependencies
while read line ; do
    # some projects specify extra dependencies in form of .[extra] in deps
    # key instead of using separate extras key
    extra=${line#.[}
    extra=${extra%]}
    if [ ".[$extra]" == "$line" ] ; then
        # run the command passed in as argument(s) to handle extras
        eval "$@" $extra
        continue
    fi
    [ "${line:0:2}" == "-c" ] && continue
    [ "${line:0:12}" == "--constraint" ] && continue
    if [ "${line:0:2}" == "-r" ] ; then