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

maturin fails if [project] is specified in pyproject.toml #730

Closed
1 of 2 tasks
droundy opened this issue Dec 3, 2021 · 2 comments
Closed
1 of 2 tasks

maturin fails if [project] is specified in pyproject.toml #730

droundy opened this issue Dec 3, 2021 · 2 comments
Labels
documentation Documentation needs improvement

Comments

@droundy
Copy link

droundy commented Dec 3, 2021

Bug Description

When I include

[project]

in my pyproject.toml, maturin fails with

💥 maturin failed
  Caused by: pyproject.toml is invalid
  Caused by: pyproject.toml is not PEP 517 compliant: missing field `name` at line 9 column 1

This is confusing, because the Readme.md states that this is how to specify dependencies of the python code.

Your Python version (python -V)

Python 3.9.2

Your pip version (pip -V)

pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)

What bindings you're using

cffi

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

git clone https://github.com/droundy/latex_snippet
cd latex_snippet/
maturin build -b cffi # confirm that it builds without this
echo [project] >> pyproject.toml
maturin build -b cffi

@droundy droundy added the bug Something isn't working label Dec 3, 2021
@droundy
Copy link
Author

droundy commented Dec 3, 2021

I'll mention that perhaps the bug is in the documentation. I have no knowledge of what the proper format of pyproject.toml is, I'm just trying to address the deprecation warning that says I should specify a cffi dependency.

@messense
Copy link
Member

messense commented Dec 4, 2021

PEP 621 requires name to be statically defined in pyproject.toml if package field appears: https://www.python.org/dev/peps/pep-0621/#name

@messense messense added documentation Documentation needs improvement and removed bug Something isn't working labels Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation needs improvement
Projects
None yet
Development

No branches or pull requests

2 participants