Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug? tool.poetry.packages[0] must not contain {'to'} properties #177

Closed
jamesbraza opened this issue May 23, 2024 · 4 comments · Fixed by SchemaStore/schemastore#3807
Closed

Comments

@jamesbraza
Copy link

From https://python-poetry.org/docs/pyproject/#packages:

The to parameter is designed to specify the relative destination path where the package will be located upon installation. This allows for greater control over the organization of packages within your project’s structure.

However, when I have a to in my pyproject.toml's packages like this:

[tool.poetry]
packages = [
    {from = "app", include = "apples", to = "foo/app"},
    {include = "app/*.py", to = "foo"},
    {include = "app/py.typed", to = "foo"},
]

With validate-pyproject v0.18 I get:

Invalid file: pyproject.toml
[ERROR] `tool.poetry.packages[0]` must not contain {'to'} properties

Is this a bug in validate-pyproject? And if not, why is to disallowed?

@abravalheri
Copy link
Owner

I believe in this case, the definitions are coming from https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/partial-poetry.json .

It might be worth it to double-check if that spec makes sense (sorry, I have not used poetry many times).

@henryiii
Copy link
Collaborator

The is fairly new: https://python-poetry.org/history/#180---2024-02-25 and needs to be updated in SchemaStore. Contributions usually welcome (also can open an issue there).

@jamesbraza
Copy link
Author

Made SchemaStore/schemastore#3807 to match python-poetry/poetry-core#672, closing this out

@henryiii
Copy link
Collaborator

Synced: https://github.com/henryiii/validate-pyproject-schema-store/releases/tag/2024.05.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants