pypa / flit

Simplified packaging of Python modules
https://flit.pypa.io/
BSD 3-Clause "New" or "Revised" License
2.15k stars 131 forks source link

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

Open icncsx opened 3 years ago

icncsx commented 3 years ago

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.

takluyver commented 3 years ago

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