Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bendingspoons/poetry-cached-url-deps-plugin
https://github.com/bendingspoons/poetry-cached-url-deps-plugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/bendingspoons/poetry-cached-url-deps-plugin
- Owner: BendingSpoons
- Created: 2023-03-10T10:15:24.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-03T12:30:25.000Z (over 1 year ago)
- Last Synced: 2024-04-24T08:56:45.729Z (8 months ago)
- Language: Python
- Size: 39.1 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# poetry-cached-url-deps-plugin
This [Poetry](https://python-poetry.org/) plugin implements a hackish way of solving https://github.com/python-poetry/poetry/issues/2415, i.e. [url dependencies](https://python-poetry.org/docs/dependency-specification/#url-dependencies) not being cached by Poetry dependency resolution.
## Installation
Until the plugin is published on PyPI, you can install it as:
```bash
poetry self add git+https://github.com/BendingSpoons/poetry-cached-url-deps-plugin.git#1.0.0
```## How does it work
The plugin is really an hack over the Poetry codebase and not a perfect one, for which more intrusive changes would need to be performed.
The hack consists of creating a fake `_url` cache repository (you'll see it when running `poetry cache list` as soon as an object got cached) and using that when downloading url dependencies. As a consequence, you'll still see `Downloading...` your url dependencies every time although they will be read from the filesystem - it's an extra filesystem operation that will be avoided with a better solution.
Because of the unintrusive change, url dependencies will be cached only during the dependency resolution phase. You'll experience an additional download when _installing_ the dependency in your environment. This will again be fixed through a better solution in the official codebase.
## Compatibility
Since the plugin mocks Poetry internals, we pin the version of Poetry with which this plugin is compatible to an exact version. Future releases of Poetry may possibly require a rework of this plugin or render the hack impossible to achieve. As we are supporting the Poetry community with contributions to the main repo, we hope they will be integrated in future releases, making this plugin ideally useless.