Skip to content

Commit aa71393

Browse files
authored
Remove dependency to derive crate (Jij-Inc#15)
In order to publish the `pyo3-stub-gen` crate to crates.io, `pyo3-stub-gen-derive` must be exists in crates.io even if it is optional dependency.
1 parent 5b376ad commit aa71393

File tree

10 files changed

+32
-11
lines changed

10 files changed

+32
-11
lines changed

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ members = [
77
]
88
resolver = "2"
99

10+
[workspace.package]
11+
version = "0.1.0"
12+
edition = "2021"
13+
14+
description = "Stub file (*.pyi) generator for PyO3"
15+
repository = "https://github.com/Jij-Inc/pyo3-stub-gen"
16+
keywords = ["pyo3"]
17+
license = "MIT OR Apache-2.0"
18+
1019
[workspace.dependencies]
1120
pyo3-stub-gen = { version = "0.1.0", path = "pyo3-stub-gen" }
1221
pyo3-stub-gen-derive = { version = "0.1.0", path = "pyo3-stub-gen-derive" }

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ To generate a stub file for this project, please modify it as follows:
2828

2929
```rust
3030
use pyo3::prelude::*;
31-
use pyo3_stub_gen::{derive::gen_stub_pyfunction, StubInfo};
31+
use pyo3_stub_gen::StubInfo;
32+
use pyo3_stub_gen_derive::gen_stub_pyfunction;
3233
use std::{env, path::*};
3334

3435
#[gen_stub_pyfunction] // Proc-macro attribute to register a function to stub file generator.

pyo3-stub-gen-derive/Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[package]
22
name = "pyo3-stub-gen-derive"
3-
version = "0.1.0"
4-
edition = "2021"
3+
version.workspace = true
4+
edition.workspace = true
5+
6+
description.workspace = true
7+
repository.workspace = true
8+
keywords.workspace = true
9+
license.workspace = true
510

611
[lib]
712
proc-macro = true

pyo3-stub-gen-testing-mixed/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ crate-type = ["cdylib", "rlib"]
88

99
[dependencies]
1010
pyo3-stub-gen.workspace = true
11+
pyo3-stub-gen-derive.workspace = true
1112
pyo3.workspace = true
1213

1314
[[bin]]

pyo3-stub-gen-testing-mixed/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use pyo3::prelude::*;
2-
use pyo3_stub_gen::{derive::gen_stub_pyfunction, StubInfo};
2+
use pyo3_stub_gen::StubInfo;
3+
use pyo3_stub_gen_derive::gen_stub_pyfunction;
34
use std::{env, path::*};
45

56
/// Gather information to generate stub files

pyo3-stub-gen-testing-pure/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ crate-type = ["cdylib", "rlib"]
88

99
[dependencies]
1010
pyo3-stub-gen.workspace = true
11+
pyo3-stub-gen-derive.workspace = true
1112
pyo3.workspace = true
1213

1314
[[bin]]

pyo3-stub-gen-testing-pure/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
mod readme {}
33

44
use pyo3::prelude::*;
5-
use pyo3_stub_gen::{derive::gen_stub_pyfunction, StubInfo};
5+
use pyo3_stub_gen::StubInfo;
6+
use pyo3_stub_gen_derive::gen_stub_pyfunction;
67
use std::{env, path::*};
78

89
/// Gather information to generate stub files

pyo3-stub-gen/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
[package]
22
name = "pyo3-stub-gen"
3-
version = "0.1.0"
4-
edition = "2021"
3+
version.workspace = true
4+
edition.workspace = true
5+
description.workspace = true
6+
repository.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
59

610
[dependencies]
7-
pyo3-stub-gen-derive.workspace = true
8-
911
anyhow.workspace = true
1012
inventory.workspace = true
1113
itertools.workspace = true

pyo3-stub-gen/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
pub use inventory; // re-export to use in generated code
2-
pub use pyo3_stub_gen_derive as derive;
32

43
mod generate;
54
mod pyproject;

0 commit comments

Comments
 (0)