@@ -23,17 +23,26 @@ The resulting wheel is written to `target/wheels`.
2323
2424## Version changes
2525
26- Keep these versions synchronized :
26+ ` Cargo.toml ` is the single source of truth for the package version :
2727
28- - ` pyproject.toml ` : Python distribution version
29- - ` Cargo.toml ` : native extension version
30- - ` src/dotenvx/__version__.py ` : Python runtime version
28+ ``` toml
29+ [package ]
30+ version = " 2.0.1"
31+ ```
32+
33+ Maturin uses that value for the PyPI distribution because ` pyproject.toml `
34+ declares ` version ` as dynamic. At runtime, ` dotenvx.__version__ ` reads the
35+ installed distribution metadata. ` Cargo.lock ` is generated from
36+ ` Cargo.toml ` .
37+
38+ After changing the version, refresh the lockfile:
3139
32- Unlike npm, Python packaging has no built-in ` npm version patch ` equivalent.
33- Update all three files to the chosen semantic version before tagging.
40+ ``` sh
41+ cargo check
42+ ```
3443
35- The ` dotenvx-primitives ` dependency version in ` Cargo.toml ` is independent. It
36- should identify the crate release that this Python package embeds .
44+ The ` dotenvx-primitives ` dependency version is independent. Change it only
45+ when this package should embed a newer primitives release .
3746
3847## Publishing
3948
@@ -53,5 +62,4 @@ git tag v0.0.0
5362git push origin v0.0.0
5463```
5564
56- The tag version must match ` pyproject.toml ` , ` Cargo.toml ` , and
57- ` src/dotenvx/__version__.py ` .
65+ The tag version must match ` Cargo.toml ` .
0 commit comments