flit
flit copied to clipboard
flit install ignores the "exclude" specified in tool.flit.sdist
Let's say I have a pyproject.toml that looks like this:
# ...
[tool.flit.sdist]
exclude = ["src/mypackage/foo.py"]
When I flit install
, I noticed that I am still able to import the foo
module. I can get around this with flit build
and pip installing the wheel since the sdist correctly excludes foo.py.
Just wondering if it's expected that flit install does not take the sdist exclude into consideration.
It's sort of expected, because flit install
builds a wheel and then asks pip to install it. But it probably shouldn't be.
Does it exclude the file if you do pip install .
instead? One day, flit install
will probably go away in favour of pip install .
.