Skip to content

At pyproject.toml file Include section does not respect packages section #3285

@castalheiro

Description

@castalheiro
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions