Poetry: Allow building sdist and wheel with different files

Created on 30 Apr 2019  路  2Comments  路  Source: python-poetry/poetry

Poetry has an include setting in pyproject.toml that allows specifying additional files to be included in the distribution (e.g. tests, docs, config files). This works, but it seems what you specify here will be included in both the source distribution and the wheel.

A common practice is to put stuff like tests into the source distribution only, but not into the wheel. You can achieve this with distutils by putting this additional stuff into MANIFEST.in which will be used only for the source distribution. I currently see no way to achieve the same with poetry. Can this be added as a feature? Or am I overlooking something?

Feature Packaging

Most helpful comment

Like I said in #1109, I plan on making the packages section of the pyproject.toml file support specifying the format for which the package should be included (no format meaning all of them).

[tool.poetry]
# ...
packages = [
    { include = "my_package" },
    { include = "tests", format = "sdist" },
]

All 2 comments

Like I said in #1109, I plan on making the packages section of the pyproject.toml file support specifying the format for which the package should be included (no format meaning all of them).

[tool.poetry]
# ...
packages = [
    { include = "my_package" },
    { include = "tests", format = "sdist" },
]

This has been added in #1133

Was this page helpful?
0 / 5 - 0 ratings