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

pyproject.toml is not PEP 517 compliant #1615

Closed
2 tasks done
Jinnkunn opened this issue May 18, 2023 · 2 comments · Fixed by #1616
Closed
2 tasks done

pyproject.toml is not PEP 517 compliant #1615

Jinnkunn opened this issue May 18, 2023 · 2 comments · Fixed by #1616
Labels
bug Something isn't working

Comments

@Jinnkunn
Copy link

Jinnkunn commented May 18, 2023

Bug Description

The execution of 'maturin develop' can be flawless and error-free with maturin version 0.14.0. However, upgrading to maturin 0.15.0 will result in an error when running 'maturin develop'.

💥 maturin failed
  Caused by: pyproject.toml is invalid
  Caused by: pyproject.toml is not PEP 517 compliant: TOML parse error at line 1, column 1
  |
1 | [build-system]
  | ^
invalid type: sequence, expected string or map

Your maturin version (maturin --version)

0.15.0

Your Python version (python -V)

Python 3.9.6

Your pip version (pip -V)

pip 23.1.2

What bindings you're using

pyo3

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

Here is a sample structure I have in my pyproject.toml file. The ellipsis ("...") represents additional content that is not shown in the provided snippet.

[build-system]
requires = [ "maturin>=0.14", "numpy", "wheel", "patchelf",]
build-backend = "maturin"

[project]
name = "..."
license-files = [ "license.txt",]
requires-python = ">=3.8"
requires-dist = [ "maturin>=0.14", "...",]
dependencies = [ "packaging", "...",]
zip-safe = false
version = "..."
readme = "..."
description = "..."
classifiers = [ "...",]
[[project.authors]]
name = "..."
email = "..."

[project.urls]
homepage = "..."
documentation = "..."
repository = "..."

[project.optional-dependencies]
test = [ "coverage", "...",]
docs = [ "sphinx", "sphinx-rtd-theme",]
devel = []

[tool.maturin]
include = [ "...",]
bindings = "pyo3"
compatability = "manylinux2014"

[tool.pytest.ini_options]
testpaths = [ "...",]
addopts = "--color=yes --tb=native --cov-report term --cov-report html:docs/dist_coverage --cov=aisdb --doctest-modules --envfile .env"
RUST_LOG=maturin=debug maturin build

2023-05-18T01:12:41.314803Z DEBUG maturin::project_layout: Found pyproject.toml in working directory at ".../pyproject.toml"
💥 maturin failed
  Caused by: pyproject.toml is invalid
  Caused by: pyproject.toml is not PEP 517 compliant: TOML parse error at line 1, column 1
  |
1 | [build-system]
  | ^
invalid type: sequence, expected string or map
@Jinnkunn Jinnkunn added the bug Something isn't working label May 18, 2023
@messense
Copy link
Member

cc @konstin, probably due to pep440_rs/pep508_rs integration?

@konstin
Copy link
Member

konstin commented May 18, 2023

It's the license-files key, i think the PEP has been updated in that regard: https://peps.python.org/pep-0639/#add-license-files-key . I've opened #1616 to fix the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants