Skip to content

Commit 5537e58

Browse files
authored
Merge pull request #7 from dotenvx/description
update subscription
2 parents 65e2f3a + afa947d commit 5537e58

5 files changed

Lines changed: 38 additions & 63 deletions

File tree

Cargo.lock

Lines changed: 12 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "python-dotenvx-native"
33
version = "2.0.0"
44
edition = "2021"
5+
rust-version = "1.83"
56
publish = false
67

78
[lib]
@@ -11,4 +12,4 @@ path = "rust/lib.rs"
1112

1213
[dependencies]
1314
dotenvx-primitives = "=2.1.1"
14-
pyo3 = { version = "0.22", features = ["abi3-py38"] }
15+
pyo3 = { version = "0.29", features = ["abi3-py38"] }

DEVELOPMENT.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5362
git 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`.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ build-backend = "maturin"
44

55
[project]
66
name = "python-dotenvx"
7-
version = "2.0.0"
8-
description = "A better dotenv, backed by dotenvx Rust primitives"
7+
dynamic = ["version"]
8+
description = "a secure dotenv–from the creator of `dotenv`"
99
readme = "README.md"
1010
requires-python = ">=3.8"
1111
license = { text = "BSD-3-Clause" }

src/dotenvx/__version__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
from importlib.metadata import version
2+
13
__title__ = "python-dotenvx"
2-
__description__ = "[dotenvx.com] a better dotenv–from the creator of `dotenv`"
4+
__description__ = "a secure dotenv–from the creator of `dotenv`"
35
__url__ = "https://github.com/dotenvx/python-dotenvx"
4-
__version__ = "2.0.0"
6+
__version__ = version("python-dotenvx")
57
__author__ = "dotenv"
68
__author_email__ = "mot@dotenvx.com"
79
__license__ = "BSD-3-Clause"

0 commit comments

Comments
 (0)