This is known to be broken since a long time. See https://github.com/pypa/pip/issues/3246 and https://github.com/pypa/pip/issues/562.
In the second link it is mentioned that some developers covered their use case with replacing --target
by --src
. I have not tried this myself though.