Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 12 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "python-dotenvx-native"
version = "2.0.0"
edition = "2021"
rust-version = "1.83"
publish = false

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

[dependencies]
dotenvx-primitives = "=2.1.1"
pyo3 = { version = "0.22", features = ["abi3-py38"] }
pyo3 = { version = "0.29", features = ["abi3-py38"] }
28 changes: 18 additions & 10 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,26 @@ The resulting wheel is written to `target/wheels`.

## Version changes

Keep these versions synchronized:
`Cargo.toml` is the single source of truth for the package version:

- `pyproject.toml`: Python distribution version
- `Cargo.toml`: native extension version
- `src/dotenvx/__version__.py`: Python runtime version
```toml
[package]
version = "2.0.1"
```

Maturin uses that value for the PyPI distribution because `pyproject.toml`
declares `version` as dynamic. At runtime, `dotenvx.__version__` reads the
installed distribution metadata. `Cargo.lock` is generated from
`Cargo.toml`.

After changing the version, refresh the lockfile:

Unlike npm, Python packaging has no built-in `npm version patch` equivalent.
Update all three files to the chosen semantic version before tagging.
```sh
cargo check
```

The `dotenvx-primitives` dependency version in `Cargo.toml` is independent. It
should identify the crate release that this Python package embeds.
The `dotenvx-primitives` dependency version is independent. Change it only
when this package should embed a newer primitives release.

## Publishing

Expand All @@ -53,5 +62,4 @@ git tag v0.0.0
git push origin v0.0.0
```

The tag version must match `pyproject.toml`, `Cargo.toml`, and
`src/dotenvx/__version__.py`.
The tag version must match `Cargo.toml`.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ build-backend = "maturin"

[project]
name = "python-dotenvx"
version = "2.0.0"
description = "A better dotenv, backed by dotenvx Rust primitives"
dynamic = ["version"]
description = "a secure dotenv–from the creator of `dotenv`"
readme = "README.md"
requires-python = ">=3.8"
license = { text = "BSD-3-Clause" }
Expand Down
6 changes: 4 additions & 2 deletions src/dotenvx/__version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from importlib.metadata import version

__title__ = "python-dotenvx"
__description__ = "[dotenvx.com] a better dotenv–from the creator of `dotenv`"
__description__ = "a secure dotenv–from the creator of `dotenv`"
__url__ = "https://github.com/dotenvx/python-dotenvx"
__version__ = "2.0.0"
__version__ = version("python-dotenvx")
__author__ = "dotenv"
__author_email__ = "mot@dotenvx.com"
__license__ = "BSD-3-Clause"
Loading