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

[lib] section in Cargo.toml on comment line #1126

Closed
2 tasks
bicarlsen opened this issue Sep 23, 2022 · 2 comments
Closed
2 tasks

[lib] section in Cargo.toml on comment line #1126

bicarlsen opened this issue Sep 23, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@bicarlsen
Copy link

Bug Description

When initiating a new project using maturin init the Cargo.toml file is initialized as

[package]
name = "my_package"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html[lib]
name = "my_package"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.17.1", features = ["extension-module"] }

where the [lib] section header was included in the comment line. The correct file should be

[package]
name = "my_package"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "my_package"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.17.1", features = ["extension-module"] }

Your Python version (python -V)

3.9.12

Your pip version (pip -V)

22.2.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

  1. Create folder called my_package
  2. Initialize a virtualenv
  3. run maturin init
  4. Select pyo3 bindings
@bicarlsen bicarlsen added the bug Something isn't working label Sep 23, 2022
@messense
Copy link
Member

Duplicate of #1120

@messense messense added the duplicate This issue or pull request already exists label Sep 23, 2022
@bicarlsen
Copy link
Author

Sorry about that, forgot to check closed issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants