https://github.com/artisanofcode/poetry-stickywheel-plugin
A poetry plugin to pin local folder dependencies to specific versions when building packages.
https://github.com/artisanofcode/poetry-stickywheel-plugin
poetry poetry-plugin python python-package
Last synced: 7 months ago
JSON representation
A poetry plugin to pin local folder dependencies to specific versions when building packages.
- Host: GitHub
- URL: https://github.com/artisanofcode/poetry-stickywheel-plugin
- Owner: artisanofcode
- Created: 2022-06-17T13:21:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T00:38:07.000Z (over 1 year ago)
- Last Synced: 2024-11-30T16:11:42.682Z (7 months ago)
- Topics: poetry, poetry-plugin, python, python-package
- Language: Python
- Homepage:
- Size: 153 KB
- Stars: 15
- Watchers: 3
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Poetry StickyWheel Plugin
A poetry plugin to pin version dependencies when building packages with local folder dependencies.## 🛠 Installing
```
poetry self add poetry-stickywheel-plugin
```## 📚 Help
This plugin will rewrite folder dependencies in your poetry projects dependencies with version dependencies.
The version will be extracted from the dependencies pyproject.toml and applied as a semver match.
Assuming a `pyproject.toml` such as:
```
[tool.poetry]
name = "a"
version = "0.1.0"
description = ""
authors = []
readme = "README.md"[tool.poetry.dependencies]
b = {path = "../b", develop = true}
```and the dependency `pyproject.toml`
```
[tool.poetry]
name = "b"
version = "1.2.3"
description = ""
authors = []
readme = "README.md"
```the dependency will be rewritten as if it had been defined as:
```
b = "^1.2.3"
```## Configuration
You can define a section in your `pyproject.toml` file named `tool.stickywheel`, to configure various options.
### Dependency constraint strategy
The default strategy is `semver` (described in the "Help" section above), but there are other choices:
| strategy | version | result |
|-----------|---------|-----------|
| `semver` | `1.2.3` | `^1.2.3` |
| `minimum` | `1.2.3` | `>=1.2.3` |
| `exact` | `1.2.3` | `1.2.3` |To override the default, add `strategy` to the configuration. For example:
```toml
[tool.stickywheel]
strategy = "exact"
```## ⚖️ Licence
This project is licensed under the [MIT licence][mit_licence].
All documentation and images are licenced under the
[Creative Commons Attribution-ShareAlike 4.0 International License][cc_by_sa].## 📝 Meta
This project uses [Semantic Versioning][semvar].
[discussions]: https://github.com/artisanofcode/poetry-stickywheel-plugin/discussions
[mit_licence]: http://dan.mit-license.org/
[cc_by_sa]: https://creativecommons.org/licenses/by-sa/4.0/
[semvar]: http://semver.org/