At pyproject.toml file Include section does not respect packages section
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: Ubuntu 20.04
- Poetry version: 1.1.4
- Link of a Gist with the contents of your pyproject.toml file: URL
Issue
Projects that do not follow the standard python package structure (e.g. root package inside src directory) require a packages definition as follows:
packages = [
{ include = "my_package", from = "src" },
]
Under some circumstances it is also be required to create a wheel including files ignored by VCS. And that’s where it gets tricky.
The following include section definition doesn’t work (and there’s no “from” option to fix it.)
include = [
{ path = "my_package/*.py"}
]
Alternatively, the following definition clashes with the previous packages section definition (the output wheel will contain a src folder instead of the desired my_package directory).
include = [
{ path = "src/my_package/*.py"}
]
All in all, I’m unable to build the expected package wheel.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
The pyproject.toml file | Documentation | Poetry
The tool.poetry section of the pyproject.toml file is composed of multiple ... field identify a set of files that are not included when...
Read more >'tox' and 'pyproject.toml' - python - Stack Overflow
By random jiggerypokery I stumbled upon a solution - get rid of the sitepackages = True line in the tox.ini file. No idea...
Read more >The basics - Black 22.12.0 documentation
pyproject.toml is a TOML file. It contains separate sections for different tools. Black is using the · [tool.black] section. The option keys are...
Read more >PEP 518 – Specifying Minimum Build System Requirements ...
This PEP specifies how Python software packages should specify what build dependencies they have in order to execute their chosen build system. As...
Read more >A Poetic Apology. Or Why Should You Use Poetry to Manage…
If you ever spent some time trying to write a Python application you have probably ... to the tool.poetry.dependencies section of the pyproject.toml...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@audunska It will actually be fixed once there is a new release of
poetry-core
and an accompanying release of Poetry that includes these changes. That’s why we’ll leave this issue open for now.You are indeed correct – thanks for the note. Should have looked a bit deeper. Cheers –
On Thu, Mar 31, 2022 at 5:43 PM Clinton Roy @.***> wrote: