flit icon indicating copy to clipboard operation
flit copied to clipboard

flit install ignores the "exclude" specified in tool.flit.sdist

Open icncsx opened this issue 3 years ago • 1 comments

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.

icncsx avatar Apr 12 '21 00:04 icncsx

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 ..

takluyver avatar Apr 12 '21 10:04 takluyver