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

Enable extension-module feature in pyproject.toml in project templates #1479

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

messense
Copy link
Member

Implements #325 (comment).

Thanks for the idea @jmhodges!

@messense messense added bindings/pyo3 pyo3 bindings bindings/rust-cpython rust-cpython bindings configuration Configuration labels Feb 13, 2023
@netlify
Copy link

netlify bot commented Feb 13, 2023

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 739430b
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/63ea291f2e2d1100080cafb8
😎 Deploy Preview https://deploy-preview-1479--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@messense
Copy link
Member Author

This has the benefits of that cargo test will work out of the box for non-Python related tests written in Rust. I guess we can also add maturin test command that invokes cargo test with auto-initialize feature enabled to support testing Python related tests written in Rust?

What do you guys think? @konstin @davidhewitt

@messense messense force-pushed the update-template-extension-modules branch from 5293cb6 to b1a931d Compare February 13, 2023 08:48
@messense messense force-pushed the update-template-extension-modules branch from b1a931d to 72fa5b3 Compare February 13, 2023 08:50
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea!

@messense
Copy link
Member Author

bors r=konstin

bors bot added a commit that referenced this pull request Feb 13, 2023
1479: Enable `extension-module` feature in `pyproject.toml` in project templates r=konstin a=messense

Implements #325 (comment).

Thanks for the idea `@jmhodges!`

Co-authored-by: messense <[email protected]>
```
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minijinja-0.30.3/src/value/mod.rs:111:43
    |
111 | use std::sync::atomic::{self, AtomicBool, AtomicU64};
    |                                           ^^^^^^^^^
    |                                           |
    |                                           no `AtomicU64` in `sync::atomic`
    |                                           help: a similar name exists in the module: `AtomicU8`

```
@bors
Copy link
Contributor

bors bot commented Feb 13, 2023

Canceled.

@messense
Copy link
Member Author

bors retry

@bors
Copy link
Contributor

bors bot commented Feb 13, 2023

@bors bors bot merged commit f69fdcc into PyO3:main Feb 13, 2023
@messense messense deleted the update-template-extension-modules branch February 13, 2023 13:05
@davidhewitt
Copy link
Member

This has the benefits of that cargo test will work out of the box for non-Python related tests written in Rust. I guess we can also add maturin test command that invokes cargo test with auto-initialize feature enabled to support testing Python related tests written in Rust?

I think it's less necessary, because it's easy to add a pyo3 dev-dependency with the auto-initialize feature. Plus, not all projects use auto-initialize, some use custom interpreter setup at the beginning of each test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings/pyo3 pyo3 bindings bindings/rust-cpython rust-cpython bindings configuration Configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants